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

# Create Intent request

> Creates an intent for swaps between two assets. [More details](/intents/about).

<sup>API Key permissions: Transaction Operator, Full Access</sup>



## OpenAPI

````yaml /bron-open-api-public.json post /workspaces/{workspaceId}/intents
openapi: 3.1.1
info:
  description: >-
    Bron API is based on the RESTish interface provided for data exchange
    between a client and a server with the use of HTTPS requests and responses.
  title: Bron API
  version: latest
  x-bron-formats:
    bigint: Arbitrary-precision integer encoded as a JSON string.
    date-time-millis: >-
      Epoch milliseconds (UTC) encoded as a JSON string. Convert with `new
      Date(parseInt(value))` or equivalent.
    decimal: Arbitrary-precision decimal encoded as a JSON string.
    int32: 32-bit integer encoded as a JSON string.
    int64: >-
      Long integer encoded as a JSON string to preserve precision (e.g. account
      IDs).
servers:
  - description: app.bron.org
    url: https://api.bron.org
security: []
tags:
  - name: stake
  - name: balances
  - name: addresses
  - name: intents
  - name: assets
  - name: transaction-limits
  - name: canton
  - name: address-book
  - name: workspaces
  - name: accounts
  - name: transactions
paths:
  /workspaces/{workspaceId}/intents:
    post:
      tags:
        - intents
      summary: Create Intent request
      description: >-
        Creates an intent for swaps between two assets. [More
        details](/intents/about).


        <sup>API Key permissions: Transaction Operator, Full Access</sup>
      parameters:
        - in: path
          name: workspaceId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateIntent'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Intent'
          description: OK
        '400':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: The machine-readable error code
                    examples:
                      - bad-request
                    type: string
                  message:
                    description: >-
                      A human-readable message providing more details about the
                      error
                    type: string
                type: object
          description: Bad Request
        '403':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: The machine-readable error code
                    examples:
                      - forbidden
                    type: string
                  message:
                    description: >-
                      A human-readable message providing more details about the
                      error
                    type: string
                type: object
          description: Forbidden
        '409':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: The machine-readable error code
                    examples:
                      - conflict
                    type: string
                  message:
                    description: >-
                      A human-readable message providing more details about the
                      error
                    type: string
                type: object
          description: Conflict
components:
  schemas:
    CreateIntent:
      properties:
        accountId:
          description: The id of the account where the intent transaction should be placed
          examples:
            - kqftx9zd3g6qdp09or
          type: string
        fromAmount:
          description: >-
            The amount of asset that will be sent. Optional, one of `fromAmount`
            or `toAmount` must be specified.
          examples:
            - '120.015'
          format: decimal
          type: string
        fromAssetId:
          examples:
            - '2'
          type: string
        intentId:
          description: >-
            Unique intent identifier from client (should be unique per the
            account)
          examples:
            - w2u573pjj5wl975z4a9
          type: string
        toAmount:
          examples:
            - '117500.03'
          format: decimal
          type: string
        toAssetId:
          examples:
            - '5002'
          type: string
      required:
        - accountId
        - intentId
        - fromAssetId
        - toAssetId
      type: object
    Intent:
      properties:
        createdAt:
          description: Creation timestamp of the intent (epoch millis)
          examples:
            - '1794678400000'
          format: date-time-millis
          type: string
        expiresAt:
          description: Expiration timestamp of the intent (epoch millis)
          examples:
            - '1758188560749'
          format: date-time-millis
          type: string
        fromAmount:
          description: Amount of the from-asset specified by the user
          examples:
            - '100.50'
          format: decimal
          type: string
        fromAssetId:
          description: ID of the asset being sent
          examples:
            - '2'
          type: string
        intentId:
          description: Unique user-generated ID of the intent
          examples:
            - rzsdziq1iknnzszmmtqz
          type: string
        price:
          description: Execution price of the swap (quote/base)
          examples:
            - '101.2312'
          format: decimal
          type: string
        status:
          $ref: '#/components/schemas/IntentOrderStatus'
          description: >-
            Current status of the intent order. [See
            details](/enums/IntentOrderStatus)
          examples:
            - auction-in-progress
        toAmount:
          description: Amount of the to-asset requested or estimated
          examples:
            - '0.0025'
          format: decimal
          type: string
        toAssetId:
          description: ID of the asset to receive
          examples:
            - '5002'
          type: string
        updatedAt:
          description: Last update timestamp of the intent (epoch millis)
          examples:
            - '1794764800000'
          format: date-time-millis
          type: string
        userSettlementDeadline:
          description: Deadline timestamp for user settlement (epoch millis)
          examples:
            - '1759188567456'
          format: date-time-millis
          type: string
      required:
        - intentId
        - status
        - fromAssetId
        - toAssetId
        - updatedAt
        - createdAt
      type: object
    IntentOrderStatus:
      enum:
        - not-exist
        - user-initiated
        - auction-in-progress
        - wait-for-user-tx
        - wait-for-oracle-confirm-user-tx
        - wait-for-solver-tx
        - wait-for-oracle-confirm-solver-tx
        - completed
        - liquidated
        - cancelled
      type: string

````