Create Allocation
curl --request POST \
--url https://app.magna.so/api/external/v1/allocations/create \
--header 'Content-Type: application/json' \
--header 'x-magna-api-token: <api-key>' \
--data '
{
"amount": 123,
"contractId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tokenId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stakeholder": {
"name": "<string>",
"email": "[email protected]",
"xHandle": "<string>",
"employeeNumber": "<string>"
},
"category": "<string>",
"key": "<string>",
"description": "<string>",
"unlockScheduleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"unlockStartAt": "<string>",
"vestingScheduleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"vestingStartAt": "<string>",
"walletAddress": "<string>",
"receivedOffMagna": 123,
"cancellable": true,
"projectWalletId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customAttributes": [
{
"key": "<string>",
"value": "<string>"
}
]
}
'import requests
url = "https://app.magna.so/api/external/v1/allocations/create"
payload = {
"amount": 123,
"contractId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tokenId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stakeholder": {
"name": "<string>",
"email": "[email protected]",
"xHandle": "<string>",
"employeeNumber": "<string>"
},
"category": "<string>",
"key": "<string>",
"description": "<string>",
"unlockScheduleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"unlockStartAt": "<string>",
"vestingScheduleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"vestingStartAt": "<string>",
"walletAddress": "<string>",
"receivedOffMagna": 123,
"cancellable": True,
"projectWalletId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customAttributes": [
{
"key": "<string>",
"value": "<string>"
}
]
}
headers = {
"x-magna-api-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-magna-api-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 123,
contractId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
tokenId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
stakeholder: {
name: '<string>',
email: '[email protected]',
xHandle: '<string>',
employeeNumber: '<string>'
},
category: '<string>',
key: '<string>',
description: '<string>',
unlockScheduleId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
unlockStartAt: '<string>',
vestingScheduleId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
vestingStartAt: '<string>',
walletAddress: '<string>',
receivedOffMagna: 123,
cancellable: true,
projectWalletId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
customAttributes: [{key: '<string>', value: '<string>'}]
})
};
fetch('https://app.magna.so/api/external/v1/allocations/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.magna.so/api/external/v1/allocations/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => 123,
'contractId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'tokenId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'stakeholder' => [
'name' => '<string>',
'email' => '[email protected]',
'xHandle' => '<string>',
'employeeNumber' => '<string>'
],
'category' => '<string>',
'key' => '<string>',
'description' => '<string>',
'unlockScheduleId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'unlockStartAt' => '<string>',
'vestingScheduleId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'vestingStartAt' => '<string>',
'walletAddress' => '<string>',
'receivedOffMagna' => 123,
'cancellable' => true,
'projectWalletId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'customAttributes' => [
[
'key' => '<string>',
'value' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-magna-api-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.magna.so/api/external/v1/allocations/create"
payload := strings.NewReader("{\n \"amount\": 123,\n \"contractId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"tokenId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"stakeholder\": {\n \"name\": \"<string>\",\n \"email\": \"[email protected]\",\n \"xHandle\": \"<string>\",\n \"employeeNumber\": \"<string>\"\n },\n \"category\": \"<string>\",\n \"key\": \"<string>\",\n \"description\": \"<string>\",\n \"unlockScheduleId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"unlockStartAt\": \"<string>\",\n \"vestingScheduleId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"vestingStartAt\": \"<string>\",\n \"walletAddress\": \"<string>\",\n \"receivedOffMagna\": 123,\n \"cancellable\": true,\n \"projectWalletId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"customAttributes\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-magna-api-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.magna.so/api/external/v1/allocations/create")
.header("x-magna-api-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 123,\n \"contractId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"tokenId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"stakeholder\": {\n \"name\": \"<string>\",\n \"email\": \"[email protected]\",\n \"xHandle\": \"<string>\",\n \"employeeNumber\": \"<string>\"\n },\n \"category\": \"<string>\",\n \"key\": \"<string>\",\n \"description\": \"<string>\",\n \"unlockScheduleId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"unlockStartAt\": \"<string>\",\n \"vestingScheduleId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"vestingStartAt\": \"<string>\",\n \"walletAddress\": \"<string>\",\n \"receivedOffMagna\": 123,\n \"cancellable\": true,\n \"projectWalletId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"customAttributes\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.magna.so/api/external/v1/allocations/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-magna-api-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 123,\n \"contractId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"tokenId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"stakeholder\": {\n \"name\": \"<string>\",\n \"email\": \"[email protected]\",\n \"xHandle\": \"<string>\",\n \"employeeNumber\": \"<string>\"\n },\n \"category\": \"<string>\",\n \"key\": \"<string>\",\n \"description\": \"<string>\",\n \"unlockScheduleId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"unlockStartAt\": \"<string>\",\n \"vestingScheduleId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"vestingStartAt\": \"<string>\",\n \"walletAddress\": \"<string>\",\n \"receivedOffMagna\": 123,\n \"cancellable\": true,\n \"projectWalletId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"customAttributes\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"isProcessed": true,
"result": {
"id": "becf2391-0b8b-4bdf-ae4a-fb6c0d103554",
"key": "A-DC574CI5YB",
"amount": "50000",
"receivedOffMagna": null,
"funded": null,
"received": "0",
"state": "NOT_STARTED",
"status": "NOT_STARTED",
"isWalletSubmitted": null,
"releaseMode": null,
"description": "Employee equity allocation",
"releasable": "0",
"claimable": null,
"pendingRelease": null,
"vaultId": null,
"grantId": null,
"custodyType": "CONTRACT",
"projectId": "c74e6bdb-f496-42c7-aaa7-be184ee64913",
"tokenId": "054d0c03-d20e-477e-81c0-9c2e4453d4a6",
"stakeholderId": "38f390cc-6e37-46e4-97c1-8a80ca282519",
"walletId": "d20b6cc1-76f8-46cb-b196-d7eeb872ebf2",
"categoryId": "61650035-a002-4367-b470-e4cd04209492",
"createdAt": "2025-07-30T11:15:24.327Z",
"updatedAt": "2025-07-30T11:15:24.327Z",
"cancelledAt": null,
"scheduledCancelAt": null,
"unlockScheduleId": "6ef4a3b5-eaa7-4158-9dea-557d4715a72c",
"unlockStartAt": "2024-04-15T00:00:00.000Z",
"vestingScheduleId": null,
"vestingStartAt": null
}
}Allocations
Create Allocation
POST
/
api
/
external
/
v1
/
allocations
/
create
Create Allocation
curl --request POST \
--url https://app.magna.so/api/external/v1/allocations/create \
--header 'Content-Type: application/json' \
--header 'x-magna-api-token: <api-key>' \
--data '
{
"amount": 123,
"contractId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tokenId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stakeholder": {
"name": "<string>",
"email": "[email protected]",
"xHandle": "<string>",
"employeeNumber": "<string>"
},
"category": "<string>",
"key": "<string>",
"description": "<string>",
"unlockScheduleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"unlockStartAt": "<string>",
"vestingScheduleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"vestingStartAt": "<string>",
"walletAddress": "<string>",
"receivedOffMagna": 123,
"cancellable": true,
"projectWalletId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customAttributes": [
{
"key": "<string>",
"value": "<string>"
}
]
}
'import requests
url = "https://app.magna.so/api/external/v1/allocations/create"
payload = {
"amount": 123,
"contractId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tokenId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stakeholder": {
"name": "<string>",
"email": "[email protected]",
"xHandle": "<string>",
"employeeNumber": "<string>"
},
"category": "<string>",
"key": "<string>",
"description": "<string>",
"unlockScheduleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"unlockStartAt": "<string>",
"vestingScheduleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"vestingStartAt": "<string>",
"walletAddress": "<string>",
"receivedOffMagna": 123,
"cancellable": True,
"projectWalletId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customAttributes": [
{
"key": "<string>",
"value": "<string>"
}
]
}
headers = {
"x-magna-api-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-magna-api-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 123,
contractId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
tokenId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
stakeholder: {
name: '<string>',
email: '[email protected]',
xHandle: '<string>',
employeeNumber: '<string>'
},
category: '<string>',
key: '<string>',
description: '<string>',
unlockScheduleId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
unlockStartAt: '<string>',
vestingScheduleId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
vestingStartAt: '<string>',
walletAddress: '<string>',
receivedOffMagna: 123,
cancellable: true,
projectWalletId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
customAttributes: [{key: '<string>', value: '<string>'}]
})
};
fetch('https://app.magna.so/api/external/v1/allocations/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.magna.so/api/external/v1/allocations/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => 123,
'contractId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'tokenId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'stakeholder' => [
'name' => '<string>',
'email' => '[email protected]',
'xHandle' => '<string>',
'employeeNumber' => '<string>'
],
'category' => '<string>',
'key' => '<string>',
'description' => '<string>',
'unlockScheduleId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'unlockStartAt' => '<string>',
'vestingScheduleId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'vestingStartAt' => '<string>',
'walletAddress' => '<string>',
'receivedOffMagna' => 123,
'cancellable' => true,
'projectWalletId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'customAttributes' => [
[
'key' => '<string>',
'value' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-magna-api-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.magna.so/api/external/v1/allocations/create"
payload := strings.NewReader("{\n \"amount\": 123,\n \"contractId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"tokenId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"stakeholder\": {\n \"name\": \"<string>\",\n \"email\": \"[email protected]\",\n \"xHandle\": \"<string>\",\n \"employeeNumber\": \"<string>\"\n },\n \"category\": \"<string>\",\n \"key\": \"<string>\",\n \"description\": \"<string>\",\n \"unlockScheduleId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"unlockStartAt\": \"<string>\",\n \"vestingScheduleId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"vestingStartAt\": \"<string>\",\n \"walletAddress\": \"<string>\",\n \"receivedOffMagna\": 123,\n \"cancellable\": true,\n \"projectWalletId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"customAttributes\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-magna-api-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.magna.so/api/external/v1/allocations/create")
.header("x-magna-api-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 123,\n \"contractId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"tokenId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"stakeholder\": {\n \"name\": \"<string>\",\n \"email\": \"[email protected]\",\n \"xHandle\": \"<string>\",\n \"employeeNumber\": \"<string>\"\n },\n \"category\": \"<string>\",\n \"key\": \"<string>\",\n \"description\": \"<string>\",\n \"unlockScheduleId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"unlockStartAt\": \"<string>\",\n \"vestingScheduleId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"vestingStartAt\": \"<string>\",\n \"walletAddress\": \"<string>\",\n \"receivedOffMagna\": 123,\n \"cancellable\": true,\n \"projectWalletId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"customAttributes\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.magna.so/api/external/v1/allocations/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-magna-api-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 123,\n \"contractId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"tokenId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"stakeholder\": {\n \"name\": \"<string>\",\n \"email\": \"[email protected]\",\n \"xHandle\": \"<string>\",\n \"employeeNumber\": \"<string>\"\n },\n \"category\": \"<string>\",\n \"key\": \"<string>\",\n \"description\": \"<string>\",\n \"unlockScheduleId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"unlockStartAt\": \"<string>\",\n \"vestingScheduleId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"vestingStartAt\": \"<string>\",\n \"walletAddress\": \"<string>\",\n \"receivedOffMagna\": 123,\n \"cancellable\": true,\n \"projectWalletId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"customAttributes\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"isProcessed": true,
"result": {
"id": "becf2391-0b8b-4bdf-ae4a-fb6c0d103554",
"key": "A-DC574CI5YB",
"amount": "50000",
"receivedOffMagna": null,
"funded": null,
"received": "0",
"state": "NOT_STARTED",
"status": "NOT_STARTED",
"isWalletSubmitted": null,
"releaseMode": null,
"description": "Employee equity allocation",
"releasable": "0",
"claimable": null,
"pendingRelease": null,
"vaultId": null,
"grantId": null,
"custodyType": "CONTRACT",
"projectId": "c74e6bdb-f496-42c7-aaa7-be184ee64913",
"tokenId": "054d0c03-d20e-477e-81c0-9c2e4453d4a6",
"stakeholderId": "38f390cc-6e37-46e4-97c1-8a80ca282519",
"walletId": "d20b6cc1-76f8-46cb-b196-d7eeb872ebf2",
"categoryId": "61650035-a002-4367-b470-e4cd04209492",
"createdAt": "2025-07-30T11:15:24.327Z",
"updatedAt": "2025-07-30T11:15:24.327Z",
"cancelledAt": null,
"scheduledCancelAt": null,
"unlockScheduleId": "6ef4a3b5-eaa7-4158-9dea-557d4715a72c",
"unlockStartAt": "2024-04-15T00:00:00.000Z",
"vestingScheduleId": null,
"vestingStartAt": null
}
}Authorizations
Body
application/json
Minimum string length:
1Minimum string length:
1Show child attributes
Show child attributes
Minimum string length:
1Minimum string length:
1Minimum string length:
1Minimum string length:
1Minimum string length:
1Minimum string length:
1Minimum string length:
1Available options:
MIXED, VEST_AFTER_UNLOCK Minimum string length:
1Minimum string length:
1Show child attributes
Show child attributes
⌘I