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

> Create an unlock schedule for a token, with an optional cliff and one or more schedule pieces.



## OpenAPI

````yaml /apis/admin/openapi.json post /api/external/v1/schedules/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/schedules/create:
    post:
      tags:
        - Schedules
      summary: Create Schedule
      description: >-
        Create an unlock schedule for a token, with an optional cliff and one or
        more schedule pieces.
      operationId: postSchedulesCreate
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type:
                - object
              properties:
                tokenId:
                  type:
                    - string
                  minLength: 1
                  format: uuid
                name:
                  type:
                    - string
                    - 'null'
                  minLength: 1
                description:
                  type:
                    - string
                    - 'null'
                  minLength: 1
                unlockAtStart:
                  type:
                    - number
                    - 'null'
                  exclusiveMinimum: 0
                cliff:
                  type:
                    - object
                    - 'null'
                  properties:
                    value:
                      type:
                        - number
                        - 'null'
                      minimum: 0
                    duration:
                      type:
                        - number
                      exclusiveMinimum: 0
                    period:
                      type:
                        - string
                      enum:
                        - HOUR
                        - DAY
                        - WEEK
                        - MONTH
                        - YEAR
                  required:
                    - value
                    - duration
                    - period
                roundingMode:
                  type:
                    - string
                    - 'null'
                  enum:
                    - FLOOR
                pieces:
                  type:
                    - array
                    - 'null'
                  items:
                    type:
                      - object
                    properties:
                      name:
                        type:
                          - string
                          - 'null'
                        minLength: 1
                      portion:
                        type:
                          - number
                          - 'null'
                        exclusiveMinimum: 0
                      type:
                        type:
                          - string
                        enum:
                          - PERIODIC
                          - ONE_OFF
                      startDelay:
                        type:
                          - object
                          - 'null'
                        properties:
                          value:
                            type:
                              - number
                          period:
                            type:
                              - string
                            enum:
                              - HOUR
                              - DAY
                              - WEEK
                              - MONTH
                              - YEAR
                        required:
                          - value
                          - period
                      oneOffPieceConfiguration:
                        type:
                          - object
                          - 'null'
                        properties:
                          offset:
                            type:
                              - object
                              - 'null'
                            properties:
                              value:
                                type:
                                  - number
                                exclusiveMinimum: 0
                              period:
                                type:
                                  - string
                                enum:
                                  - HOUR
                                  - DAY
                                  - WEEK
                                  - MONTH
                                  - YEAR
                            required:
                              - value
                              - period
                          dayOfMonth:
                            type:
                              - number
                              - 'null'
                            exclusiveMinimum: 0
                      periodicPieceConfiguration:
                        type:
                          - object
                          - 'null'
                        properties:
                          length:
                            type:
                              - object
                            properties:
                              value:
                                type:
                                  - number
                                exclusiveMinimum: 0
                              period:
                                type:
                                  - string
                                enum:
                                  - HOUR
                                  - DAY
                                  - WEEK
                                  - MONTH
                                  - YEAR
                            required:
                              - value
                              - period
                          frequency:
                            type:
                              - object
                            properties:
                              value:
                                type:
                                  - number
                                exclusiveMinimum: 0
                              period:
                                type:
                                  - string
                                enum:
                                  - HOUR
                                  - DAY
                                  - WEEK
                                  - MONTH
                                  - YEAR
                            required:
                              - value
                              - period
                          dayOfMonth:
                            type:
                              - number
                              - 'null'
                            exclusiveMinimum: 0
                        required:
                          - length
                          - frequency
                    required:
                      - type
              required:
                - tokenId
      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: sch...uuid
                  key: S-ABC123
                  name: 4y monthly, 1y cliff
                  description: null
                  unlockAtStart: null
                  cliff:
                    value: 0
                    duration: 1
                    period: YEAR
                  roundingMode: FLOOR
                  createdAt: '2024-04-15T21:26:21.000Z'
        '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

````