> ## 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 Transaction

> Create on-chain transactions for a contract: initialize it, start a distribution, or fund a direct transfer.



## OpenAPI

````yaml /apis/admin/openapi.json post /api/external/v1/transactions/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/transactions/create:
    post:
      tags:
        - Transactions
      summary: Create Transaction
      description: >-
        Create on-chain transactions for a contract: initialize it, start a
        distribution, or fund a direct transfer.
      operationId: postTransactionsCreate
      requestBody:
        required: true
        content:
          application/json:
            schema:
              discriminator:
                propertyName: action
              oneOf:
                - type:
                    - object
                  properties:
                    action:
                      type:
                        - string
                      enum:
                        - INITIALIZE
                    contractId:
                      type:
                        - string
                      minLength: 1
                      format: uuid
                    adminWalletId:
                      type:
                        - string
                      minLength: 1
                      format: uuid
                  required:
                    - action
                    - contractId
                    - adminWalletId
                - type:
                    - object
                  properties:
                    action:
                      type:
                        - string
                      enum:
                        - START_DISTRIBUTION
                    contractId:
                      type:
                        - string
                      minLength: 1
                      format: uuid
                    tokenId:
                      type:
                        - string
                      minLength: 1
                      format: uuid
                    allocationIds:
                      type:
                        - array
                      items:
                        type:
                          - string
                        minLength: 1
                        format: uuid
                      minItems: 1
                    adminWalletId:
                      type:
                        - string
                        - 'null'
                      minLength: 1
                      format: uuid
                    fundTill:
                      type:
                        - 'null'
                    memo:
                      type:
                        - string
                        - 'null'
                      minLength: 1
                  required:
                    - action
                    - contractId
                    - tokenId
                    - allocationIds
                - type:
                    - object
                  properties:
                    action:
                      type:
                        - string
                      enum:
                        - FUND_DISTRIBUTION
                    tokenId:
                      type:
                        - string
                      minLength: 1
                      format: uuid
                    data:
                      type:
                        - array
                      items:
                        type:
                          - object
                        properties:
                          allocationId:
                            type:
                              - string
                            minLength: 1
                            format: uuid
                          amount:
                            type:
                              - number
                            exclusiveMinimum: 0
                        required:
                          - allocationId
                          - amount
                      minItems: 1
                    isTest:
                      type:
                        - boolean
                  required:
                    - action
                    - tokenId
                    - data
      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:
                  transactions:
                    - transactionId: t1...uuid
                      status: PENDING
                    - transactionId: t2...uuid
                      status: PENDING
        '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

````