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

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://developers.fireblocks.com/feedback

```json
{
  "path": "/api-reference/smart-transfer/create-leg-term",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# Create leg (term)

> Creates new smart transfer ticket term (when the ticket status is DRAFT). Learn more about Fireblocks Smart Transfers in the following [guide](https://developers.fireblocks.com/docs/execute-smart-transfers). Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor.



## OpenAPI

````yaml https://docs.fireblocks.com/api/v1/swagger.yaml post /smart-transfers/{ticketId}/terms
openapi: 3.0.0
info:
  title: Fireblocks API
  description: >
    Fireblocks provides a suite of applications to manage digital asset
    operations and a complete development platform to build your business on the
    blockchain.


    - Visit our website for more information: [Fireblocks
    Website](https://fireblocks.com)

    - Visit our developer docs: [Fireblocks
    DevPortal](https://developers.fireblocks.com)
  version: 1.6.2
  contact:
    email: developers@fireblocks.com
servers:
  - url: https://api.fireblocks.io/v1
    description: Fireblocks Production Environment Base URL
  - url: https://sandbox-api.fireblocks.io/v1
    description: Fireblocks Sandbox Environment Base URL
security: []
paths:
  /smart-transfers/{ticketId}/terms:
    post:
      tags:
        - Smart Transfer
      summary: Create leg (term)
      description: >-
        Creates new smart transfer ticket term (when the ticket status is
        DRAFT). Learn more about Fireblocks Smart Transfers in the following
        [guide](https://developers.fireblocks.com/docs/execute-smart-transfers).
        Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor.
      operationId: createTicketTerm
      parameters:
        - name: ticketId
          required: true
          in: path
          schema:
            type: string
        - $ref: '#/components/parameters/X-Idempotency-Key'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SmartTransferCreateTicketTerm'
      responses:
        '201':
          description: Smart Transfer ticket term was created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SmartTransferTicketTermResponse'
        '403':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SmartTransferForbiddenResponse'
        '422':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SmartTransferBadRequestResponse'
      x-codeSamples:
        - lang: TypeScript
          source: >-
            const response:
            Promise<FireblocksResponse<SmartTransferTicketTermResponse>> =
            fireblocks.smartTransfer.createTicketTerm(smartTransferApiCreateTicketTermRequest);
        - lang: Java
          source: >-
            CompletableFuture<ApiResponse<SmartTransferTicketTermResponse>>
            response =
            fireblocks.smartTransfer().createTicketTerm(smartTransferCreateTicketTerm,
            ticketId, idempotencyKey);
        - lang: Python
          source: >-
            response =
            fireblocks.smart_transfer.create_ticket_term(smart_transfer_create_ticket_term,
            ticket_id, idempotency_key);
components:
  parameters:
    X-Idempotency-Key:
      name: Idempotency-Key
      in: header
      description: >-
        A unique identifier for the request. If the request is sent multiple
        times with the same idempotency key, the server will return the same
        response as the first request. The idempotency key is valid for 24
        hours.
      required: false
      schema:
        type: string
  schemas:
    SmartTransferCreateTicketTerm:
      type: object
      properties:
        asset:
          type: string
          description: Asset name
          example: BTC
          x-fb-entity: asset
        amount:
          type: string
          description: Amount
          example: '133.789161216184'
        fromNetworkId:
          type: string
          description: Identifier of the origination Network Profile
          example: 947c6115-1f5f-4fb4-9fd6-a1f9dee14670
        toNetworkId:
          type: string
          description: Identifier of the destination Network Profile
          example: 5d009697-c29b-48e0-aff8-1f4305d19dc2
      required:
        - asset
        - amount
        - fromNetworkId
        - toNetworkId
    SmartTransferTicketTermResponse:
      type: object
      properties:
        message:
          type: string
          description: Result message
          example: Success
          nullable: true
        data:
          $ref: '#/components/schemas/SmartTransferTicketTerm'
      required:
        - message
    SmartTransferForbiddenResponse:
      type: object
      properties:
        message:
          type: string
          description: Forbidden error code
          example: You do not have permission to execute this action
        code:
          type: string
          description: Error code
          example: 3002
      required:
        - message
        - code
    SmartTransferBadRequestResponse:
      type: object
      properties:
        message:
          type: string
          description: Bad request error message
          example: Your request contains invalid data
        code:
          type: string
          description: Bad request error code
          example: 2e7a7a5d-c85c-4ea5-9adf-668cba8b4eb4
      required:
        - message
        - code
    SmartTransferTicketTerm:
      type: object
      description: Data object with result data
      nullable: true
      properties:
        id:
          type: string
          description: Unique id of Smart Transfer ticket term
          example: 84601ee2-b10f-4aa8-be9c-dba259a3533a
        ticketId:
          type: string
          description: Unique id of Smart Transfer ticket
          example: 900f04c3-83bc-428d-b681-aef682059637
        asset:
          type: string
          description: Asset name
          example: BTC
          x-fb-entity: asset
        amount:
          type: string
          description: Amount
          example: '133.789161216184'
        dvpSrcDstVaultId:
          type: string
          description: Identifier of the source and destination vault for DVP execution
          example: 1
        amountUsd:
          type: string
          description: Amount USD
          example: '1333.789161216184'
        fromNetworkId:
          type: string
          description: Identifier of the origination Network Profile
          example: 947c6115-1f5f-4fb4-9fd6-a1f9dee14670
        fromNetworkIdName:
          type: string
          description: Source network name
          example: Source network profile name
        toNetworkId:
          type: string
          description: Identifier of the destination Network Profile
          example: 5d009697-c29b-48e0-aff8-1f4305d19dc2
        toNetworkIdName:
          type: string
          description: Destination network name
          example: Destination network profile name
        txHash:
          type: string
          description: Blockchain TX hash
          example: '0x2446f1fd773fbb9f080e674b60c6a033c7ed7427b8b9413cf28a2a4a6da9b56c'
          nullable: true
        fbTxId:
          type: string
          description: >-
            Fireblocks transaction ID. It is set when the funding transaction is
            created.
          example: 79075e8c-1fd9-4c97-9575-3bd9229e5c0d
          nullable: true
        txStatus:
          type: string
          description: Ticket term transaction status
          example: COMPLETED
          nullable: true
          enum:
            - queued
            - submitted
            - pendingSignature
            - pendingAuthorization
            - broadcasting
            - confirming
            - pendingAmlScreening
            - completed
            - cancelled
            - failed
            - rejected
            - blocked
            - thirdPartyPendingManualApproval
            - thirdPartyPending
            - partiallyCompleted
            - cancelling
        status:
          type: string
          description: Ticket term status
          example: CREATED
          nullable: false
          enum:
            - CREATED
            - FUNDING
            - FUNDING_FAILED
            - FUNDED
            - REJECTED
        createdAt:
          format: date-time
          type: string
          description: Date and time when the term is created.
          example: '2023-03-01T11:23:00Z'
        updatedAt:
          format: date-time
          type: string
          description: Date and time of last term update.
          example: '2023-03-01T11:23:00Z'
      required:
        - id
        - ticketId
        - asset
        - amount
        - fromNetworkId
        - fromNetworkIdName
        - toNetworkId
        - toNetworkIdName
        - txHash
        - fbTxId
        - txStatus
        - status
        - createdAt
        - updatedAt

````