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

# Send Agent Checkout Message



## OpenAPI

````yaml api-reference/_open-api/Agents.json POST /unstable/agent-checkouts/{id}/messages
openapi: 3.0.0
info:
  contact:
    email: support@crossmint.com
    name: Crossmint Support
    url: https://www.crossmint.com
  description: Crossmint Agents API
  title: Crossmint Agents API
  version: 1.0.0
servers:
  - description: Staging environment (testnets)
    url: https://staging.crossmint.com/api
  - description: Production environment (mainnets)
    url: https://www.crossmint.com/api
security: []
tags: []
paths:
  /unstable/agent-checkouts/{id}/messages:
    post:
      tags:
        - Agent Checkouts
      summary: Send Agent Checkout Message
      operationId: AgentCheckoutsController-sendMessage-2
      parameters:
        - description: >-
            Server-side subject to act on behalf of. Ignored for client-side
            user auth.
          in: header
          name: x-crossmint-user-id
          required: false
          schema:
            type: string
        - description: Bearer token for client-side user auth.
          in: header
          name: Authorization
          required: false
          schema:
            type: string
        - description: Crossmint project API key.
          in: header
          name: X-API-KEY
          required: true
          schema:
            type: string
        - in: path
          name: id
          required: true
          schema:
            minLength: 1
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendAgentCheckoutMessageDTO'
        required: true
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentCheckoutMessageAcceptedDTO'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorDto'
          description: >-
            Invalid arguments. Make sure you are following the API
            specification.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorDto'
          description: Missing or invalid API key.
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorDto'
          description: >-
            Forbidden. Ensure the credentials are correct and the authentication
            source is allowed.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorDto'
          description: Not found.
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorDto'
          description: The request conflicts with the current state of the resource.
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorDto'
          description: The upstream service returned an incompatible response.
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorDto'
          description: Upstream service unavailable. Try again in a few minutes.
components:
  schemas:
    SendAgentCheckoutMessageDTO:
      properties:
        id:
          maxLength: 200
          minLength: 1
          type: string
        parts:
          items:
            anyOf:
              - properties:
                  action:
                    enum:
                      - alternative
                    type: string
                  requestId:
                    minLength: 1
                    type: string
                  text:
                    maxLength: 20000
                    minLength: 1
                    type: string
                  type:
                    enum:
                      - input_response
                    type: string
                required:
                  - action
                  - requestId
                  - text
                  - type
                type: object
              - properties:
                  action:
                    enum:
                      - decline
                    type: string
                  requestId:
                    minLength: 1
                    type: string
                  type:
                    enum:
                      - input_response
                    type: string
                required:
                  - action
                  - requestId
                  - type
                type: object
              - properties:
                  action:
                    enum:
                      - submit
                    type: string
                  requestId:
                    minLength: 1
                    type: string
                  response:
                    anyOf:
                      - properties:
                          answers:
                            additionalProperties:
                              anyOf:
                                - anyOf:
                                    - items:
                                        type: string
                                      type: array
                                    - type: boolean
                                    - type: number
                                    - type: string
                                - properties:
                                    protectedInputId:
                                      maxLength: 200
                                      minLength: 1
                                      type: string
                                  required:
                                    - protectedInputId
                                  type: object
                            type: object
                          kind:
                            enum:
                              - form
                            type: string
                        required:
                          - answers
                          - kind
                        type: object
                      - properties:
                          kind:
                            enum:
                              - payment
                            type: string
                          orderIntentId:
                            maxLength: 200
                            minLength: 1
                            type: string
                        required:
                          - kind
                          - orderIntentId
                        type: object
                  type:
                    enum:
                      - input_response
                    type: string
                required:
                  - action
                  - requestId
                  - response
                  - type
                type: object
              - properties:
                  text:
                    maxLength: 20000
                    minLength: 1
                    type: string
                  type:
                    enum:
                      - text
                    type: string
                required:
                  - text
                  - type
                type: object
          maxItems: 1
          minItems: 1
          type: array
      required:
        - id
        - parts
      type: object
    AgentCheckoutMessageAcceptedDTO:
      properties:
        messageId:
          minLength: 1
          type: string
        status:
          enum:
            - accepted
          type: string
      required:
        - messageId
        - status
      type: object
    ApiErrorDto:
      properties:
        code:
          description: Machine-readable error code for programmatic handling
          type: string
        error:
          example: true
          type: boolean
        message:
          description: Human-readable error message describing what went wrong
          type: string
      required:
        - error
        - message
      type: object

````