action — each action requires a
different set of fields.
Route: POST /api/external/v1/transactions/create
Headers
| Header | Required | Description |
|---|---|---|
Content-Type | Yes | Must be application/json |
x-magna-api-token | Yes | Your Magna API token |
Body parameters
Theaction field selects the operation:
INITIALIZE
Initializes a distribution contract.
| Field | Type | Required | Description |
|---|---|---|---|
action | "INITIALIZE" | Yes | Operation type |
contractId | string (uuid) | Yes | Contract to initialize |
adminWalletId | string (uuid) | Yes | Admin wallet that will sign |
START_DISTRIBUTION
Starts (and funds) a distribution for the given allocations.
| Field | Type | Required | Description |
|---|---|---|---|
action | "START_DISTRIBUTION" | Yes | Operation type |
contractId | string (uuid) | Yes | Contract the allocations belong to |
tokenId | string (uuid) | Yes | Token of the allocations |
allocationIds | string[] (uuid) | Yes | Allocations to start (min 1) |
adminWalletId | string (uuid) | No | Admin wallet that will sign |
fundTill | string (ISO date) | No | Fund the distribution up to this date |
memo | string | No | Optional memo |
FUND_DISTRIBUTION
Funds a direct-transfer distribution.
| Field | Type | Required | Description |
|---|---|---|---|
action | "FUND_DISTRIBUTION" | Yes | Operation type |
tokenId | string (uuid) | Yes | Token of the allocations |
data | array | Yes | List of { allocationId, amount } (min 1) |
data[].allocationId | string (uuid) | Yes | Allocation to fund |
data[].amount | number | Yes | Amount to fund (positive) |
isTest | boolean | No | Run as a test transaction |
Request example
Response example
transactionId with
Transaction Signing Parameters,
then track progress with Transaction Status.