> ## Documentation Index
> Fetch the complete documentation index at: https://docs.magna.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Allocation



## OpenAPI

````yaml /apis/admin/openapi.json post /api/external/v1/allocations/create
openapi: 3.1.0
info:
  title: Magna Admin API
  version: 1.0.0
  description: >-
    The private, server-to-server API for managing allocations, funding and
    claims, transactions, portals, and token data. Authenticated with a project
    API key sent in the `x-magna-api-token` header.
servers:
  - url: https://app.magna.so
    description: Production
security:
  - apiToken: []
paths:
  /api/external/v1/allocations/create:
    post:
      tags:
        - Allocations
      summary: Create Allocation
      operationId: postAllocationsCreate
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type:
                - object
              properties:
                key:
                  type:
                    - string
                  minLength: 1
                amount:
                  type:
                    - number
                  exclusiveMinimum: 0
                description:
                  type:
                    - string
                  minLength: 1
                contractId:
                  type:
                    - string
                  minLength: 1
                  format: uuid
                tokenId:
                  type:
                    - string
                  minLength: 1
                  format: uuid
                unlockScheduleId:
                  type:
                    - string
                  minLength: 1
                  format: uuid
                unlockStartAt:
                  type:
                    - string
                  minLength: 1
                vestingScheduleId:
                  type:
                    - string
                  minLength: 1
                  format: uuid
                vestingStartAt:
                  type:
                    - string
                  minLength: 1
                releaseMode:
                  type:
                    - string
                  enum:
                    - MIXED
                    - VEST_AFTER_UNLOCK
                walletAddress:
                  type:
                    - string
                  minLength: 1
                stakeholder:
                  type:
                    - object
                  properties:
                    name:
                      type:
                        - string
                      minLength: 1
                    email:
                      type:
                        - string
                      minLength: 1
                      format: email
                      maxLength: 254
                    xHandle:
                      type:
                        - string
                      minLength: 1
                      maxLength: 15
                      pattern: ^[a-zA-Z0-9_]+$
                    employeeNumber:
                      type:
                        - string
                      minLength: 1
                category:
                  type:
                    - string
                  minLength: 1
                receivedOffMagna:
                  type:
                    - number
                  exclusiveMinimum: 0
                cancellable:
                  type:
                    - boolean
                projectWalletId:
                  type:
                    - string
                  minLength: 1
                  format: uuid
                customAttributes:
                  type:
                    - array
                  items:
                    type:
                      - object
                    properties:
                      key:
                        type:
                          - string
                        minLength: 1
                      value:
                        type:
                          - string
                        minLength: 1
                    required:
                      - key
                      - value
              required:
                - amount
                - contractId
                - tokenId
                - stakeholder
                - category
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  isProcessed:
                    type: boolean
                  result:
                    description: Endpoint-specific result payload.
              example:
                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
        '400':
          description: Validation error
        '401':
          description: Missing or invalid API token
        '403':
          description: API token lacks the required scope or project access
components:
  securitySchemes:
    apiToken:
      type: apiKey
      in: header
      name: x-magna-api-token

````