POST /api/external/v1/schedules/create
Headers
| Header | Required | Description |
|---|---|---|
Content-Type | Yes | Must be application/json |
x-magna-api-token | Yes | Your Magna API token |
Body parameters
| Field | Type | Required | Description |
|---|---|---|---|
tokenId | string (uuid) | Yes | The token this schedule belongs to |
name | string | null | No | Display name |
description | string | null | No | Description |
unlockAtStart | number | No | Portion unlocked immediately at start |
cliff | object | null | No | Cliff config — see below |
roundingMode | enum | No | FLOOR |
pieces | array | No | Schedule pieces — see below |
cliff
| Field | Type | Description |
|---|---|---|
value | number | null | Portion released at the cliff |
duration | number | Cliff length (in period units) |
period | enum | HOUR · DAY · WEEK · MONTH · YEAR |
pieces[]
| Field | Type | Description |
|---|---|---|
type | enum | PERIODIC or ONE_OFF |
name | string | null | Piece name |
portion | number | null | Portion of the allocation this piece releases |
startDelay | object | null | { value, period } delay before the piece begins |
oneOffPieceConfiguration | object | null | For ONE_OFF: { offset: { value, period }, dayOfMonth } |
periodicPieceConfiguration | object | null | For PERIODIC: { length: { value, period }, frequency: { value, period }, dayOfMonth } |