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

# Generate an owner intent for signing

> Builds the exact payload the owner's wallet must sign for one owner action and returns it as `intent: {standard, payload}`. Sign `intent.payload` unchanged with the wallet named by `standard`, then call submit-intent with the wallet's output. `agent_create` creates a pending agent and returns its id.



## OpenAPI

````yaml https://api.agentsonintents.com/openapi.json post /v1/generate-intent
openapi: 3.1.0
info:
  title: NEAR Intents Agent API
  version: 1.0.0
  description: >-
    Backend API for AI agents that trade on NEAR Intents under an owner-signed
    policy.


    The Agent API is an experimental, mainnet-only beta. You and your users may
    lose all assets used with it, or lose access to them. It is operated by NEAR
    Technologies Limited.


    Before an owner signs `agent_create`, show the Owner Terms, OutLayer's terms
    and the required risk notice, and keep evidence of acceptance. Show the
    notice again before the owner funds the wallet. `preview.summary` ends with
    the notice.


    Authenticate with `X-API-Key`. Create and revoke keys at
    partners.near-intents.org; each expires after 365 days. Keep the key on your
    backend.


    Owner actions use generate-intent → owner wallet signs `intent.payload`
    unchanged → submit-intent → GET /v1/status. Agent actions (swap, withdraw,
    transfer, …) need no owner signature, only `X-Grant-Token` for a live owner
    grant (who may act), or `X-Grant-Proof` signed by a `public_key` grant's key
    for each request; the account policy decides what every grant may do, and
    return a `correlation_id` for GET /v1/status.


    The agent's account is its confidential balance: swaps, limit orders,
    transfers, deposit addresses, withdrawals and balance reads use it by
    default. The legacy public balance can only be emptied, by shield or a
    withdrawal with `confidential: false`; any other request on it is refused
    with `public_balance_exit_only`.


    Errors are JSON:API documents. Every field, parameter and error code is
    snake_case. Branch on `errors[].code`, never on `title`. `UNCERTAIN` means
    the outcome is not yet proven: keep polling the same `correlation_id` and
    never resubmit under a new `Idempotency-Key`. `PENDING_DEPOSIT` is a deposit
    address waiting for funds; a withdrawal's bridge leg reads `PROCESSING`.
    `NEEDS_REVIEW` stops routine polling: inspect `details.reason`, never retry,
    then use `refresh=true` after provider/manual resolution.
servers:
  - url: https://api.agentsonintents.com
security: []
tags:
  - name: Owner intents
  - name: Status
  - name: Agents
  - name: Policy
  - name: Grants
  - name: Approvals
  - name: Executions
  - name: Native accounts
  - name: Meta
paths:
  /v1/generate-intent:
    post:
      tags:
        - Owner intents
      summary: Generate an owner intent for signing
      description: >-
        Builds the exact payload the owner's wallet must sign for one owner
        action and returns it as `intent: {standard, payload}`. Sign
        `intent.payload` unchanged with the wallet named by `standard`, then
        call submit-intent with the wallet's output. `agent_create` creates a
        pending agent and returns its id.
      operationId: generateIntent
      parameters:
        - name: Idempotency-Key
          in: header
          required: false
          description: >-
            Stable key for one logical request. Replays with the same key and
            body return the original result; a different body is refused with
            `idempotency_conflict`.
          schema:
            type: string
            minLength: 8
            maxLength: 128
            pattern: ^[A-Za-z0-9._:-]+$
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: agent_create
                    name:
                      type: string
                      minLength: 1
                      maxLength: 100
                    external_user_id:
                      type: string
                      minLength: 1
                      maxLength: 200
                    owner:
                      $ref: '#/components/schemas/OwnerWallet'
                    policy:
                      $ref: '#/components/schemas/Policy'
                  required:
                    - type
                    - name
                    - owner
                    - policy
                  additionalProperties: false
                - type: object
                  properties:
                    type:
                      type: string
                      const: policy_update
                    agent_id:
                      type: string
                      pattern: ^[0-9a-f]{64}$
                    policy:
                      $ref: '#/components/schemas/Policy'
                    expected_revision:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                  required:
                    - type
                    - agent_id
                    - policy
                    - expected_revision
                  additionalProperties: false
                - type: object
                  properties:
                    type:
                      type: string
                      const: agent_freeze
                    agent_id:
                      type: string
                      pattern: ^[0-9a-f]{64}$
                  required:
                    - type
                    - agent_id
                  additionalProperties: false
                - type: object
                  properties:
                    type:
                      type: string
                      const: agent_unfreeze
                    agent_id:
                      type: string
                      pattern: ^[0-9a-f]{64}$
                  required:
                    - type
                    - agent_id
                  additionalProperties: false
                - type: object
                  properties:
                    type:
                      type: string
                      const: grant_issue
                    agent_id:
                      type: string
                      pattern: ^[0-9a-f]{64}$
                    label:
                      type: string
                      minLength: 1
                      maxLength: 64
                      allOf:
                        - pattern: ^[^\p{Cc}]+$
                        - pattern: ^[\x20-\x7e]+$
                    credential:
                      anyOf:
                        - type: string
                          pattern: ^[0-9a-f]{64}$
                        - type: object
                          properties:
                            type:
                              type: string
                              const: oidc
                            issuer:
                              type: string
                              minLength: 1
                              maxLength: 256
                              allOf:
                                - pattern: ^[\x20-\x7e]+$
                                - pattern: ^https:\/\/[!-~]+$
                            claims:
                              type: object
                              propertyNames:
                                type: string
                                maxLength: 128
                                pattern: >-
                                  ^(?:[A-Za-z_][A-Za-z0-9_]{0,63}|(?:\/(?:[!-.0-}]|~[01])+){1,4})$
                              additionalProperties:
                                type: string
                                minLength: 1
                                maxLength: 256
                                pattern: ^[\x20-\x7e]+$
                            jwks:
                              type: object
                              properties:
                                keys:
                                  minItems: 1
                                  maxItems: 4
                                  type: array
                                  items:
                                    oneOf:
                                      - type: object
                                        properties:
                                          kty:
                                            type: string
                                            const: RSA
                                          'n':
                                            type: string
                                            pattern: ^[A-Za-z0-9_-]{342,1366}$
                                          e:
                                            type: string
                                            pattern: ^[A-Za-z0-9_-]{1,8}$
                                          alg:
                                            type: string
                                            enum:
                                              - RS256
                                              - RS384
                                              - RS512
                                              - PS256
                                              - PS384
                                              - PS512
                                          kid:
                                            type: string
                                            minLength: 1
                                            maxLength: 128
                                            pattern: ^[\x20-\x7e]+$
                                          use:
                                            type: string
                                            const: sig
                                        required:
                                          - kty
                                          - 'n'
                                          - e
                                        additionalProperties: false
                                      - type: object
                                        properties:
                                          kty:
                                            type: string
                                            const: EC
                                          crv:
                                            type: string
                                            enum:
                                              - P-256
                                              - P-384
                                          x:
                                            type: string
                                            pattern: ^[A-Za-z0-9_-]{43,64}$
                                          'y':
                                            type: string
                                            pattern: ^[A-Za-z0-9_-]{43,64}$
                                          alg:
                                            type: string
                                            enum:
                                              - ES256
                                              - ES384
                                          kid:
                                            type: string
                                            minLength: 1
                                            maxLength: 128
                                            pattern: ^[\x20-\x7e]+$
                                          use:
                                            type: string
                                            const: sig
                                        required:
                                          - kty
                                          - crv
                                          - x
                                          - 'y'
                                        additionalProperties: false
                                      - type: object
                                        properties:
                                          kty:
                                            type: string
                                            const: OKP
                                          crv:
                                            type: string
                                            const: Ed25519
                                          x:
                                            type: string
                                            pattern: ^[A-Za-z0-9_-]{43,43}$
                                          alg:
                                            type: string
                                            enum:
                                              - EdDSA
                                              - Ed25519
                                          kid:
                                            type: string
                                            minLength: 1
                                            maxLength: 128
                                            pattern: ^[\x20-\x7e]+$
                                          use:
                                            type: string
                                            const: sig
                                        required:
                                          - kty
                                          - crv
                                          - x
                                        additionalProperties: false
                              required:
                                - keys
                              additionalProperties: false
                            audience:
                              type: string
                              minLength: 1
                              maxLength: 512
                              pattern: ^[\x20-\x7e]+$
                          required:
                            - type
                            - issuer
                            - claims
                          additionalProperties: false
                        - type: object
                          properties:
                            type:
                              type: string
                              const: public_key
                            jwk:
                              oneOf:
                                - type: object
                                  properties:
                                    kty:
                                      type: string
                                      const: OKP
                                    crv:
                                      type: string
                                      const: Ed25519
                                    x:
                                      type: string
                                      pattern: ^[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048]$
                                  required:
                                    - kty
                                    - crv
                                    - x
                                  additionalProperties: false
                                - type: object
                                  properties:
                                    kty:
                                      type: string
                                      const: EC
                                    crv:
                                      type: string
                                      const: P-256
                                    x:
                                      type: string
                                      pattern: ^[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048]$
                                    'y':
                                      type: string
                                      pattern: ^[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048]$
                                  required:
                                    - kty
                                    - crv
                                    - x
                                    - 'y'
                                  additionalProperties: false
                          required:
                            - type
                            - jwk
                          additionalProperties: false
                    expires_at:
                      type: string
                      format: date-time
                      pattern: >-
                        ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
                  required:
                    - type
                    - agent_id
                    - label
                    - credential
                    - expires_at
                  additionalProperties: false
                - type: object
                  properties:
                    type:
                      type: string
                      const: grant_revoke
                    agent_id:
                      type: string
                      pattern: ^[0-9a-f]{64}$
                    grant_id:
                      type: string
                      pattern: ^[0-9a-f]{64}$
                  required:
                    - type
                    - agent_id
                    - grant_id
                  additionalProperties: false
                - type: object
                  properties:
                    type:
                      type: string
                      const: execution_cancel
                    agent_id:
                      type: string
                      pattern: ^[0-9a-f]{64}$
                    correlation_id:
                      type: string
                      pattern: ^op_[A-Za-z0-9_-]{43}$
                  required:
                    - type
                    - agent_id
                    - correlation_id
                  additionalProperties: false
                - type: object
                  properties:
                    type:
                      type: string
                      const: agent_archive
                    agent_id:
                      type: string
                      pattern: ^[0-9a-f]{64}$
                  required:
                    - type
                    - agent_id
                  additionalProperties: false
                - type: object
                  properties:
                    type:
                      type: string
                      const: agent_restore
                    agent_id:
                      type: string
                      pattern: ^[0-9a-f]{64}$
                  required:
                    - type
                    - agent_id
                  additionalProperties: false
                - type: object
                  properties:
                    type:
                      type: string
                      const: agent_delete
                    agent_id:
                      type: string
                      pattern: ^[0-9a-f]{64}$
                  required:
                    - type
                    - agent_id
                  additionalProperties: false
                - type: object
                  properties:
                    type:
                      type: string
                      const: approval_vote
                    agent_id:
                      type: string
                      pattern: ^[0-9a-f]{64}$
                    approval_id:
                      type: string
                      format: uuid
                      pattern: >-
                        ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                    verdict:
                      type: string
                      enum:
                        - approve
                        - reject
                  required:
                    - type
                    - agent_id
                    - approval_id
                    - verdict
                  additionalProperties: false
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateIntentResponse'
        '400':
          description: >-
            Error document. Documented codes: `agent_not_bound`,
            `agent_not_found`, `policy_revision_conflict`,
            `policy_storage_beneficiary_mismatch`, `policy_too_large`,
            `policy_owner_mismatch`, `policy_locked`, `approval_closed`,
            `owner_type_unsupported`, `grant_credential_invalid`,
            `agent_creation_quota_exceeded`, `policy_change_throttled`,
            `agent_unfreeze_throttled`, `sponsor_busy`, `wallet_already_frozen`,
            `wallet_already_unfrozen`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDocument'
        '401':
          description: >-
            Error document. Documented codes: `agent_not_bound`,
            `agent_not_found`, `policy_revision_conflict`,
            `policy_storage_beneficiary_mismatch`, `policy_too_large`,
            `policy_owner_mismatch`, `policy_locked`, `approval_closed`,
            `owner_type_unsupported`, `grant_credential_invalid`,
            `agent_creation_quota_exceeded`, `policy_change_throttled`,
            `agent_unfreeze_throttled`, `sponsor_busy`, `wallet_already_frozen`,
            `wallet_already_unfrozen`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDocument'
        '403':
          description: >-
            Error document. Documented codes: `agent_not_bound`,
            `agent_not_found`, `policy_revision_conflict`,
            `policy_storage_beneficiary_mismatch`, `policy_too_large`,
            `policy_owner_mismatch`, `policy_locked`, `approval_closed`,
            `owner_type_unsupported`, `grant_credential_invalid`,
            `agent_creation_quota_exceeded`, `policy_change_throttled`,
            `agent_unfreeze_throttled`, `sponsor_busy`, `wallet_already_frozen`,
            `wallet_already_unfrozen`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDocument'
        '404':
          description: >-
            Error document. Documented codes: `agent_not_bound`,
            `agent_not_found`, `policy_revision_conflict`,
            `policy_storage_beneficiary_mismatch`, `policy_too_large`,
            `policy_owner_mismatch`, `policy_locked`, `approval_closed`,
            `owner_type_unsupported`, `grant_credential_invalid`,
            `agent_creation_quota_exceeded`, `policy_change_throttled`,
            `agent_unfreeze_throttled`, `sponsor_busy`, `wallet_already_frozen`,
            `wallet_already_unfrozen`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDocument'
        '409':
          description: >-
            Error document. Documented codes: `agent_not_bound`,
            `agent_not_found`, `policy_revision_conflict`,
            `policy_storage_beneficiary_mismatch`, `policy_too_large`,
            `policy_owner_mismatch`, `policy_locked`, `approval_closed`,
            `owner_type_unsupported`, `grant_credential_invalid`,
            `agent_creation_quota_exceeded`, `policy_change_throttled`,
            `agent_unfreeze_throttled`, `sponsor_busy`, `wallet_already_frozen`,
            `wallet_already_unfrozen`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDocument'
        '410':
          description: >-
            Error document. Documented codes: `agent_not_bound`,
            `agent_not_found`, `policy_revision_conflict`,
            `policy_storage_beneficiary_mismatch`, `policy_too_large`,
            `policy_owner_mismatch`, `policy_locked`, `approval_closed`,
            `owner_type_unsupported`, `grant_credential_invalid`,
            `agent_creation_quota_exceeded`, `policy_change_throttled`,
            `agent_unfreeze_throttled`, `sponsor_busy`, `wallet_already_frozen`,
            `wallet_already_unfrozen`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDocument'
        '429':
          description: >-
            Error document. Documented codes: `agent_not_bound`,
            `agent_not_found`, `policy_revision_conflict`,
            `policy_storage_beneficiary_mismatch`, `policy_too_large`,
            `policy_owner_mismatch`, `policy_locked`, `approval_closed`,
            `owner_type_unsupported`, `grant_credential_invalid`,
            `agent_creation_quota_exceeded`, `policy_change_throttled`,
            `agent_unfreeze_throttled`, `sponsor_busy`, `wallet_already_frozen`,
            `wallet_already_unfrozen`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDocument'
        '502':
          description: >-
            Error document. Documented codes: `agent_not_bound`,
            `agent_not_found`, `policy_revision_conflict`,
            `policy_storage_beneficiary_mismatch`, `policy_too_large`,
            `policy_owner_mismatch`, `policy_locked`, `approval_closed`,
            `owner_type_unsupported`, `grant_credential_invalid`,
            `agent_creation_quota_exceeded`, `policy_change_throttled`,
            `agent_unfreeze_throttled`, `sponsor_busy`, `wallet_already_frozen`,
            `wallet_already_unfrozen`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDocument'
        '503':
          description: >-
            Error document. Documented codes: `agent_not_bound`,
            `agent_not_found`, `policy_revision_conflict`,
            `policy_storage_beneficiary_mismatch`, `policy_too_large`,
            `policy_owner_mismatch`, `policy_locked`, `approval_closed`,
            `owner_type_unsupported`, `grant_credential_invalid`,
            `agent_creation_quota_exceeded`, `policy_change_throttled`,
            `agent_unfreeze_throttled`, `sponsor_busy`, `wallet_already_frozen`,
            `wallet_already_unfrozen`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDocument'
      security:
        - ApiKey: []
components:
  schemas:
    OwnerWallet:
      oneOf:
        - type: object
          properties:
            type:
              type: string
              const: near
            account_id:
              type: string
              minLength: 2
              maxLength: 64
            public_key:
              type: string
              pattern: ^ed25519:[1-9A-HJ-NP-Za-km-z]{32,44}$
          required:
            - type
            - account_id
            - public_key
          additionalProperties: false
        - type: object
          properties:
            type:
              type: string
              const: evm
            address:
              type: string
              pattern: ^0x[0-9a-f]{40}$
            chain_id:
              type: integer
              exclusiveMinimum: 0
              maximum: 9007199254740991
            public_key:
              type: string
              pattern: ^0x[0-9a-f]{128}$
          required:
            - type
            - address
            - chain_id
            - public_key
          additionalProperties: false
        - type: object
          properties:
            type:
              type: string
              const: passkey
            credential_id:
              type: string
              pattern: ^[A-Za-z0-9_-]+$
            public_key:
              type: string
              pattern: ^MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE[A-Za-z0-9_-]{85}[AQgw]$
            rp_id:
              type: string
              minLength: 1
              maxLength: 253
            origin:
              type: string
              format: uri
          required:
            - type
            - credential_id
            - public_key
            - rp_id
            - origin
          additionalProperties: false
    Policy:
      type: object
      properties:
        frozen:
          type: boolean
        actions:
          maxItems: 4
          type: array
          items:
            type: string
            enum:
              - swap
              - transfer
              - withdraw
              - limit_order
        confidential:
          type: boolean
        owner_approval:
          type: boolean
        assets:
          anyOf:
            - type: string
              const: any
            - maxItems: 128
              type: array
              items:
                type: string
                minLength: 1
                maxLength: 256
        limits:
          type: object
          properties:
            per_transaction:
              type: object
              propertyNames:
                type: string
                minLength: 1
                maxLength: 256
              additionalProperties:
                type: string
                pattern: ^[0-9]{1,78}$
            hourly:
              type: object
              propertyNames:
                type: string
                minLength: 1
                maxLength: 256
              additionalProperties:
                type: string
                pattern: ^[0-9]{1,78}$
            daily:
              type: object
              propertyNames:
                type: string
                minLength: 1
                maxLength: 256
              additionalProperties:
                type: string
                pattern: ^[0-9]{1,78}$
            monthly:
              type: object
              propertyNames:
                type: string
                minLength: 1
                maxLength: 256
              additionalProperties:
                type: string
                pattern: ^[0-9]{1,78}$
          additionalProperties: false
        max_actions_per_hour:
          anyOf:
            - type: integer
              exclusiveMinimum: 0
              maximum: 1000000
            - type: 'null'
        destinations:
          type: object
          properties:
            mode:
              type: string
              enum:
                - any
                - only
                - except
            list:
              maxItems: 256
              type: array
              items:
                oneOf:
                  - type: object
                    properties:
                      action:
                        type: string
                        const: withdraw
                      chain:
                        type: string
                        pattern: ^[a-z][a-z0-9_-]{0,63}$
                      address:
                        type: string
                        minLength: 1
                        maxLength: 256
                      memo:
                        anyOf:
                          - type: string
                            maxLength: 256
                          - type: 'null'
                    required:
                      - action
                      - chain
                      - address
                      - memo
                    additionalProperties: false
                  - type: object
                    properties:
                      action:
                        type: string
                        const: transfer
                      address:
                        type: string
                        minLength: 2
                        maxLength: 64
                      confidential:
                        type: boolean
                    required:
                      - action
                      - address
                      - confidential
                    additionalProperties: false
          required:
            - mode
            - list
          additionalProperties: false
        budget:
          type: object
          properties:
            daily_usd:
              anyOf:
                - type: string
                  pattern: ^(0|[1-9][0-9]{0,8})(\.[0-9]{1,2})?$
                - type: 'null'
            weekly_usd:
              anyOf:
                - type: string
                  pattern: ^(0|[1-9][0-9]{0,8})(\.[0-9]{1,2})?$
                - type: 'null'
            monthly_usd:
              anyOf:
                - type: string
                  pattern: ^(0|[1-9][0-9]{0,8})(\.[0-9]{1,2})?$
                - type: 'null'
          required:
            - daily_usd
            - weekly_usd
            - monthly_usd
          additionalProperties: false
        timelock_ms:
          type: integer
          minimum: 0
          maximum: 2592000000
        schedule:
          type: object
          properties:
            mode:
              type: string
              enum:
                - only
                - except
            time_zone:
              type: string
              minLength: 1
              maxLength: 64
            windows:
              minItems: 1
              maxItems: 28
              type: array
              items:
                type: object
                properties:
                  days:
                    minItems: 1
                    maxItems: 7
                    type: array
                    items:
                      type: string
                      enum:
                        - mon
                        - tue
                        - wed
                        - thu
                        - fri
                        - sat
                        - sun
                  start:
                    type: string
                    pattern: ^(?:[01]\d|2[0-3]):[0-5]\d$
                  end:
                    type: string
                    pattern: ^(?:(?:[01]\d|2[0-3]):[0-5]\d|24:00)$
                required:
                  - days
                  - start
                  - end
                additionalProperties: false
          required:
            - mode
            - time_zone
            - windows
          additionalProperties: false
        native:
          type: object
          properties:
            near:
              type: object
              properties:
                sign_message:
                  maxItems: 256
                  type: array
                  items:
                    type: string
                    minLength: 1
                    maxLength: 128
                    pattern: ^[\x21-\x7e]+$
                transfer:
                  type: boolean
                call:
                  maxItems: 256
                  type: array
                  items:
                    type: string
                    minLength: 2
                    maxLength: 64
                    pattern: >-
                      ^(?:[a-z\d]+[-_])*[a-z\d]+(?:\.(?:[a-z\d]+[-_])*[a-z\d]+)*$
              required:
                - sign_message
                - transfer
                - call
              additionalProperties: false
            evm:
              type: object
              properties:
                sign_typed_data:
                  maxItems: 64
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        minLength: 1
                        maxLength: 128
                      version:
                        type: string
                        minLength: 1
                        maxLength: 64
                      chain_id:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                      verifying_contract:
                        type: string
                        pattern: ^0x[0-9a-f]{40}$
                      salt:
                        type: string
                        pattern: ^0x[0-9a-f]{64}$
                      primary_types:
                        minItems: 1
                        maxItems: 32
                        type: array
                        items:
                          type: string
                          minLength: 1
                          maxLength: 256
                    additionalProperties: false
                sign_message:
                  type: boolean
                sign_intent:
                  type: object
                  properties:
                    receivers:
                      maxItems: 256
                      type: array
                      items:
                        type: string
                        minLength: 2
                        maxLength: 64
                        pattern: >-
                          ^(?:[a-z\d]+[-_])*[a-z\d]+(?:\.(?:[a-z\d]+[-_])*[a-z\d]+)*$
                    one_click_deposits:
                      type: boolean
                    withdrawals:
                      maxItems: 256
                      type: array
                      items:
                        type: object
                        properties:
                          chain:
                            type: string
                          address:
                            type: string
                        required:
                          - chain
                          - address
                        additionalProperties: false
                    max_slippage_bps:
                      type: integer
                      minimum: 0
                      maximum: 300
                  required:
                    - receivers
                    - one_click_deposits
                  additionalProperties: false
                sign_transaction:
                  type: boolean
              required:
                - sign_typed_data
                - sign_message
                - sign_transaction
              additionalProperties: false
            solana:
              type: object
              properties:
                sign_in:
                  maxItems: 256
                  type: array
                  items:
                    type: string
                    maxLength: 253
                    pattern: >-
                      ^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?::[1-9][0-9]{0,4})?$
                sign_message:
                  type: boolean
                sign_intent:
                  type: object
                  properties:
                    receivers:
                      maxItems: 256
                      type: array
                      items:
                        type: string
                        minLength: 2
                        maxLength: 64
                        pattern: >-
                          ^(?:[a-z\d]+[-_])*[a-z\d]+(?:\.(?:[a-z\d]+[-_])*[a-z\d]+)*$
                    one_click_deposits:
                      type: boolean
                    withdrawals:
                      maxItems: 256
                      type: array
                      items:
                        type: object
                        properties:
                          chain:
                            type: string
                          address:
                            type: string
                        required:
                          - chain
                          - address
                        additionalProperties: false
                    max_slippage_bps:
                      type: integer
                      minimum: 0
                      maximum: 300
                  required:
                    - receivers
                    - one_click_deposits
                  additionalProperties: false
                sign_transfer:
                  type: boolean
                sign_transaction:
                  type: boolean
              required:
                - sign_message
                - sign_transaction
              additionalProperties: false
          required:
            - near
            - evm
            - solana
          additionalProperties: false
        limit_order:
          type: object
          properties:
            max_deviation_bps:
              type: integer
              minimum: 0
              maximum: 300
          required:
            - max_deviation_bps
          additionalProperties: false
      required:
        - frozen
        - actions
        - confidential
        - owner_approval
        - assets
        - limits
        - max_actions_per_hour
        - destinations
        - budget
        - timelock_ms
      additionalProperties: false
    GenerateIntentResponse:
      type: object
      properties:
        correlation_id:
          type: string
          pattern: ^intent_[A-Za-z0-9_-]{43}$
        type:
          type: string
          enum:
            - agent_create
            - policy_update
            - agent_freeze
            - agent_unfreeze
            - grant_issue
            - grant_revoke
            - execution_cancel
            - agent_archive
            - agent_restore
            - agent_delete
            - approval_vote
        agent_id:
          type: string
          pattern: ^[0-9a-f]{64}$
        status:
          type: string
          const: PENDING_SIGNATURE
        expires_at:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
        signer:
          $ref: '#/components/schemas/OwnerWallet'
        intent:
          $ref: '#/components/schemas/Intent'
        preview:
          $ref: '#/components/schemas/IntentPreview'
      required:
        - correlation_id
        - type
        - agent_id
        - status
        - expires_at
        - signer
        - intent
        - preview
      additionalProperties: false
    ErrorDocument:
      type: object
      properties:
        errors:
          minItems: 1
          type: array
          items:
            type: object
            properties:
              status:
                type: string
                pattern: ^[1-5][0-9]{2}$
              code:
                type: string
                pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$
              layer:
                type: string
                enum:
                  - request
                  - auth
                  - grant
                  - policy
                  - budget
                  - balance
                  - provider
                  - api
              title:
                type: string
              detail:
                type: string
              source:
                type: object
                properties:
                  pointer:
                    type: string
                required:
                  - pointer
                additionalProperties: false
              meta:
                type: object
                properties:
                  retryable:
                    type: boolean
                  available_at:
                    type: string
                    format: date-time
                    pattern: >-
                      ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
                  min_amount:
                    type: string
                    pattern: ^[0-9]{1,78}$
                  available_amount:
                    type: string
                    pattern: ^[0-9]{1,78}$
                required:
                  - retryable
                additionalProperties: false
            required:
              - status
              - code
              - layer
              - title
            additionalProperties: false
        meta:
          type: object
          properties:
            request_id:
              type: string
          additionalProperties: false
      required:
        - errors
        - meta
      additionalProperties: false
    Intent:
      oneOf:
        - type: object
          properties:
            standard:
              type: string
              const: nep413
            payload:
              type: object
              properties:
                message:
                  type: string
                recipient:
                  type: string
                nonce:
                  type: string
                  pattern: ^[A-Za-z0-9+/]{43}=$
              required:
                - message
                - recipient
                - nonce
              additionalProperties: false
          required:
            - standard
            - payload
          additionalProperties: false
        - type: object
          properties:
            standard:
              type: string
              const: nep366
            payload:
              type: object
              properties:
                receiverId:
                  type: string
                  minLength: 2
                  maxLength: 64
                actions:
                  minItems: 1
                  maxItems: 2
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                        const: FunctionCall
                      params:
                        type: object
                        properties:
                          methodName:
                            type: string
                            minLength: 1
                            maxLength: 128
                          args:
                            type: object
                            propertyNames:
                              type: string
                            additionalProperties: {}
                          gas:
                            type: string
                            pattern: ^[0-9]+$
                          deposit:
                            type: string
                            pattern: ^[0-9]+$
                        required:
                          - methodName
                          - args
                          - gas
                          - deposit
                        additionalProperties: false
                    required:
                      - type
                      - params
                    additionalProperties: false
              required:
                - receiverId
                - actions
              additionalProperties: false
          required:
            - standard
            - payload
          additionalProperties: false
        - type: object
          properties:
            standard:
              type: string
              const: eip712
            payload:
              type: object
              properties:
                domain:
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties: {}
                types:
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                        type:
                          type: string
                      required:
                        - name
                        - type
                      additionalProperties: false
                primaryType:
                  type: string
                message:
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties: {}
              required:
                - domain
                - types
                - primaryType
                - message
              additionalProperties: false
          required:
            - standard
            - payload
          additionalProperties: false
        - type: object
          properties:
            standard:
              type: string
              const: webauthn
            payload:
              type: object
              properties:
                challenge:
                  type: string
                  pattern: ^[A-Za-z0-9_-]+$
                rpId:
                  type: string
                  minLength: 1
                  maxLength: 253
                allowCredentials:
                  minItems: 1
                  maxItems: 1
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                      type:
                        type: string
                        const: public-key
                    required:
                      - id
                      - type
                    additionalProperties: false
                userVerification:
                  type: string
                  const: required
                timeout:
                  type: integer
                  exclusiveMinimum: 0
                  maximum: 9007199254740991
              required:
                - challenge
                - rpId
                - allowCredentials
                - userVerification
                - timeout
              additionalProperties: false
          required:
            - standard
            - payload
          additionalProperties: false
    IntentPreview:
      type: object
      properties:
        summary:
          type: string
        revision:
          type: integer
          minimum: 0
          maximum: 9007199254740991
        previous_revision:
          type: integer
          minimum: 0
          maximum: 9007199254740991
        policy_hash:
          type: string
        policy:
          $ref: '#/components/schemas/Policy'
        deletion:
          $ref: '#/components/schemas/DeletionPreview'
        approval:
          type: object
          properties:
            approval_id:
              type: string
              format: uuid
              pattern: >-
                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            request_type:
              type: string
            request_hash:
              type: string
            verdict:
              type: string
              enum:
                - approve
                - reject
          required:
            - approval_id
            - request_type
            - request_hash
            - verdict
          additionalProperties: false
      required:
        - summary
      additionalProperties: false
    DeletionPreview:
      type: object
      properties:
        near_account_id:
          type: string
          minLength: 2
          maxLength: 64
        beneficiary:
          type: string
          minLength: 2
          maxLength: 64
        public:
          type: array
          items:
            type: object
            properties:
              asset_id:
                type: string
                minLength: 1
                maxLength: 256
              symbol:
                anyOf:
                  - type: string
                    minLength: 1
                    maxLength: 64
                  - type: 'null'
              decimals:
                anyOf:
                  - type: integer
                    minimum: 0
                    maximum: 36
                  - type: 'null'
              blockchain:
                anyOf:
                  - type: string
                    minLength: 1
                    maxLength: 64
                  - type: 'null'
              price:
                anyOf:
                  - type: number
                    minimum: 0
                  - type: 'null'
              price_updated_at:
                type:
                  - string
                  - 'null'
              price_expires_at:
                type:
                  - string
                  - 'null'
              balance_raw:
                type: string
                pattern: ^[0-9]{1,78}$
              balance:
                anyOf:
                  - type: string
                    pattern: ^(0|[1-9][0-9]*)(\.[0-9]+)?$
                  - type: 'null'
            required:
              - asset_id
              - symbol
              - decimals
              - blockchain
              - price
              - price_updated_at
              - price_expires_at
              - balance_raw
              - balance
            additionalProperties: false
        confidential:
          type: array
          items:
            type: object
            properties:
              asset_id:
                type: string
                minLength: 1
                maxLength: 256
              symbol:
                anyOf:
                  - type: string
                    minLength: 1
                    maxLength: 64
                  - type: 'null'
              decimals:
                anyOf:
                  - type: integer
                    minimum: 0
                    maximum: 36
                  - type: 'null'
              blockchain:
                anyOf:
                  - type: string
                    minLength: 1
                    maxLength: 64
                  - type: 'null'
              price:
                anyOf:
                  - type: number
                    minimum: 0
                  - type: 'null'
              price_updated_at:
                type:
                  - string
                  - 'null'
              price_expires_at:
                type:
                  - string
                  - 'null'
              balance_raw:
                type: string
                pattern: ^[0-9]{1,78}$
              balance:
                anyOf:
                  - type: string
                    pattern: ^(0|[1-9][0-9]*)(\.[0-9]+)?$
                  - type: 'null'
            required:
              - asset_id
              - symbol
              - decimals
              - blockchain
              - price
              - price_updated_at
              - price_expires_at
              - balance_raw
              - balance
            additionalProperties: false
        assets_lost:
          type: boolean
        open_limit_orders:
          type: integer
          minimum: 0
          maximum: 9007199254740991
        retirement:
          type: string
          enum:
            - provider_delete
            - credential_erase
      required:
        - near_account_id
        - beneficiary
        - public
        - confidential
        - assets_lost
        - open_limit_orders
        - retirement
      additionalProperties: false
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-API-Key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.