Lightspark Agent Management API

Endpoints for creating and managing agents (experimental), called by the partner's backend using platform credentials. Covers the full agent lifecycle: creation, policy configuration, pausing, deletion, the device code installation flow, and approving or rejecting transactions initiated by agents.

Operations 12

POST /agents Create an agent #
GET /agents List agents #
GET /agents/approvals List agent transaction approval requests #
GET /agents/{agentId} Get agent by ID #
PATCH /agents/{agentId} Update agent #
DELETE /agents/{agentId} Delete agent #
PATCH /agents/{agentId}/policy Update agent policy #
POST /agents/{agentId}/device-codes Regenerate a device code #
POST /agents/{agentId}/actions/{actionId}/approve Approve an agent action #
POST /agents/{agentId}/actions/{actionId}/reject Reject an agent action #
GET /agents/device-codes/{code}/status Get device code status #
POST /agents/device-codes/{code}/redeem Redeem device code #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/lightspark-agent-management-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

lightspark-agent-management-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Grid Agent Management API
  description: 'API for managing global payments on the open Money Grid. Built by Lightspark. See the full documentation at https://docs.lightspark.com/.

    '
  version: '2025-10-13'
  contact:
    name: Lightspark Support
    email: support@lightspark.com
  license:
    name: Proprietary
    url: https://lightspark.com/terms
servers:
- url: https://api.lightspark.com/grid/2025-10-13
  description: Production server
security:
- BasicAuth: []
- AgentAuth: []
tags:
- name: Agent Management
  description: 'Endpoints for creating and managing agents (experimental), called by the partner''s backend using platform credentials. Covers the full agent lifecycle: creation, policy configuration, pausing, deletion, the device code installation flow, and approving or rejecting transactions initiated by agents.'
paths:
  /agents:
    post:
      summary: Create an agent
      description: 'Create a new agent with a specified policy. Returns the created agent and a device code that must be redeemed by the agent software to complete installation.

        '
      operationId: createAgent
      tags:
      - Agent Management
      security:
      - BasicAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentCreateRequest'
      responses:
        '201':
          description: Agent created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentCreateResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401'
        '500':
          description: Internal service error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500'
    get:
      summary: List agents
      description: Retrieve a paginated list of agents for the authenticated platform.
      operationId: listAgents
      tags:
      - Agent Management
      security:
      - BasicAuth: []
      parameters:
      - name: customerId
        in: query
        description: Filter by customer ID
        required: false
        schema:
          type: string
      - name: isPaused
        in: query
        description: Filter by paused status
        required: false
        schema:
          type: boolean
      - name: isConnected
        in: query
        description: Filter by connection status (whether the device code has been redeemed)
        required: false
        schema:
          type: boolean
      - name: createdAfter
        in: query
        description: Filter agents created after this timestamp (inclusive)
        required: false
        schema:
          type: string
          format: date-time
      - name: createdBefore
        in: query
        description: Filter agents created before this timestamp (inclusive)
        required: false
        schema:
          type: string
          format: date-time
      - name: updatedAfter
        in: query
        description: Filter agents updated after this timestamp (inclusive)
        required: false
        schema:
          type: string
          format: date-time
      - name: updatedBefore
        in: query
        description: Filter agents updated before this timestamp (inclusive)
        required: false
        schema:
          type: string
          format: date-time
      - name: limit
        in: query
        description: Maximum number of results to return (default 20, max 100)
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
          default: 20
      - name: cursor
        in: query
        description: Cursor for pagination (returned from previous request)
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentListResponse'
        '400':
          description: Bad request - Invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401'
        '500':
          description: Internal service error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500'
  /agents/approvals:
    get:
      summary: List agent transaction approval requests
      description: 'Retrieve a paginated list of agent actions that require platform approval. Filter by `agentId` or `customerId` to scope results to a specific agent or customer. Approve or reject individual actions via `POST /agents/{agentId}/actions/{actionId}/approve` or `POST /agents/{agentId}/actions/{actionId}/reject`.

        '
      operationId: listAgentApprovals
      tags:
      - Agent Management
      security:
      - BasicAuth: []
      parameters:
      - name: agentId
        in: query
        description: Filter by agent ID
        required: false
        schema:
          type: string
      - name: customerId
        in: query
        description: Filter by customer ID
        required: false
        schema:
          type: string
      - name: startDate
        in: query
        description: Filter by start date (inclusive) in ISO 8601 format
        required: false
        schema:
          type: string
          format: date-time
      - name: endDate
        in: query
        description: Filter by end date (inclusive) in ISO 8601 format
        required: false
        schema:
          type: string
          format: date-time
      - name: limit
        in: query
        description: Maximum number of results to return (default 20, max 100)
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
          default: 20
      - name: cursor
        in: query
        description: Cursor for pagination (returned from previous request)
        required: false
        schema:
          type: string
      - name: sortOrder
        in: query
        description: Order to sort results in
        required: false
        schema:
          type: string
          enum:
          - asc
          - desc
          default: desc
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentActionListResponse'
        '400':
          description: Bad request - Invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401'
        '500':
          description: Internal service error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500'
  /agents/{agentId}:
    parameters:
    - name: agentId
      in: path
      description: System-generated unique agent identifier
      required: true
      schema:
        type: string
    get:
      summary: Get agent by ID
      description: Retrieve an agent by its system-generated ID.
      operationId: getAgentById
      tags:
      - Agent Management
      security:
      - BasicAuth: []
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Agent'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401'
        '404':
          description: Agent not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
        '500':
          description: Internal service error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500'
    patch:
      summary: Update agent
      description: Update an agent's name or paused state.
      operationId: updateAgent
      tags:
      - Agent Management
      security:
      - BasicAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentUpdateRequest'
      responses:
        '200':
          description: Agent updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Agent'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401'
        '404':
          description: Agent not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
        '500':
          description: Internal service error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500'
    delete:
      summary: Delete agent
      description: Permanently delete an agent. Connected agent software will lose access immediately.
      operationId: deleteAgent
      tags:
      - Agent Management
      security:
      - BasicAuth: []
      responses:
        '204':
          description: Agent deleted successfully
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401'
        '404':
          description: Agent not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
        '500':
          description: Internal service error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500'
  /agents/{agentId}/policy:
    parameters:
    - name: agentId
      in: path
      description: System-generated unique agent identifier
      required: true
      schema:
        type: string
    patch:
      summary: Update agent policy
      description: 'Partially update an agent''s policy. Only provided fields will be updated; omitted fields retain their current values. Policy changes take effect immediately.

        '
      operationId: updateAgentPolicy
      tags:
      - Agent Management
      security:
      - BasicAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentPolicyUpdateRequest'
      responses:
        '200':
          description: Agent policy updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Agent'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401'
        '404':
          description: Agent not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
        '500':
          description: Internal service error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500'
  /agents/{agentId}/device-codes:
    parameters:
    - name: agentId
      in: path
      description: System-generated unique agent identifier
      required: true
      schema:
        type: string
    post:
      summary: Regenerate a device code
      description: 'Generate a new device code for an existing agent. Use this when the original device code has expired before being redeemed, or when the agent software needs to be reinstalled. Any previously issued unredeemed device codes for this agent are invalidated.

        '
      operationId: regenerateAgentDeviceCode
      tags:
      - Agent Management
      security:
      - BasicAuth: []
      responses:
        '201':
          description: New device code generated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentDeviceCode'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401'
        '404':
          description: Agent not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
        '409':
          description: Conflict - Agent already has an active connection and cannot regenerate a device code
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error409'
        '500':
          description: Internal service error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500'
  /agents/{agentId}/actions/{actionId}/approve:
    parameters:
    - name: agentId
      in: path
      description: System-generated unique agent identifier
      required: true
      schema:
        type: string
    - name: actionId
      in: path
      description: Unique identifier of the agent action to approve
      required: true
      schema:
        type: string
    post:
      summary: Approve an agent action
      description: 'Approve a pending agent action, allowing Grid to proceed with execution. The action must have status `PENDING_APPROVAL`. Once approved, Grid executes the underlying operation (quote execution or transfer) and the action transitions to `APPROVED`.

        For `EXECUTE_QUOTE` actions, note that the underlying quote may have expired between submission and approval — in that case the action will transition to `FAILED` instead.

        This endpoint is called by the platform''s backend using platform credentials, not by the agent itself.

        '
      operationId: approveAgentAction
      tags:
      - Agent Management
      security:
      - BasicAuth: []
      responses:
        '200':
          description: Action approved successfully. Returns the updated AgentAction.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentAction'
        '400':
          description: Bad request - Action cannot be approved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401'
        '404':
          description: Agent or action not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
        '409':
          description: Conflict - Action is not pending approval or has already been processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error409'
        '500':
          description: Internal service error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500'
  /agents/{agentId}/actions/{actionId}/reject:
    parameters:
    - name: agentId
      in: path
      description: System-generated unique agent identifier
      required: true
      schema:
        type: string
    - name: actionId
      in: path
      description: Unique identifier of the agent action to reject
      required: true
      schema:
        type: string
    post:
      summary: Reject an agent action
      description: 'Reject a pending agent action, preventing execution. The action must have status `PENDING_APPROVAL`. Once rejected, the action transitions to `REJECTED` and the underlying operation is not executed.

        This endpoint is called by the platform''s backend using platform credentials, not by the agent itself.

        '
      operationId: rejectAgentAction
      tags:
      - Agent Management
      security:
      - BasicAuth: []
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentActionRejectRequest'
      responses:
        '200':
          description: Action rejected successfully. Returns the updated AgentAction.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentAction'
        '400':
          description: Bad request - Action cannot be rejected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401'
        '404':
          description: Agent or action not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
        '409':
          description: Conflict - Action is not pending approval or has already been processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error409'
        '500':
          description: Internal service error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500'
  /agents/device-codes/{code}/status:
    parameters:
    - name: code
      in: path
      description: The device code to check
      required: true
      schema:
        type: string
    get:
      summary: Get device code status
      description: 'Check whether a device code has been redeemed. Use this to poll for agent installation completion after creating an agent.

        '
      operationId: getAgentDeviceCodeStatus
      tags:
      - Agent Management
      security:
      - BasicAuth: []
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentDeviceCodeStatusResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401'
        '404':
          description: Device code not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
        '500':
          description: Internal service error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500'
  /agents/device-codes/{code}/redeem:
    parameters:
    - name: code
      in: path
      description: The device code to redeem
      required: true
      schema:
        type: string
    post:
      summary: Redeem device code
      description: 'Redeem a device code to obtain agent credentials. This endpoint is called by the agent software during installation. On success, returns a Bearer access token that the agent uses for all subsequent API calls. The token is returned only once and must be stored securely.

        This endpoint does not require platform authentication — the device code itself serves as proof of authorization.

        '
      operationId: redeemAgentDeviceCode
      tags:
      - Agent Management
      security: []
      responses:
        '200':
          description: Device code redeemed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentDeviceCodeRedeemResponse'
        '400':
          description: Bad request (e.g., code already redeemed or expired)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '404':
          description: Device code not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
        '500':
          description: Internal service error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error500'
components:
  schemas:
    Quote:
      type: object
      required:
      - id
      - status
      - expiresAt
      - createdAt
      - source
      - destination
      - sendingCurrency
      - receivingCurrency
      - totalSendingAmount
      - totalReceivingAmount
      - exchangeRate
      - feesIncluded
      - transactionId
      properties:
        id:
          type: string
          description: Unique identifier for this quote
          example: Quote:019542f5-b3e7-1d02-0000-000000000006
        status:
          type: string
          enum:
          - PENDING
          - PENDING_AUTHORIZATION
          - PROCESSING
          - COMPLETED
          - FAILED
          - EXPIRED
          description: 'Current status of the quote. `PENDING_AUTHORIZATION` occurs only for customers in a region where Strong Customer Authentication is required (e.g. EU): the quote carries an `scaChallenge` that must be authorized before execution, and for realtime-funding sources `paymentInstructions` are withheld until it is satisfied.'
          example: PENDING
        createdAt:
          type: string
          format: date-time
          description: When this quote was created
          example: '2025-10-03T12:00:00Z'
        expiresAt:
          type: string
          format: date-time
          description: 'Absolute UTC timestamp when the rate locked in this quote becomes invalid and the quote can no longer be executed. The window depends on the rail and corridor: instant rails (Lightning, Spark, USDC on Solana/Base/Polygon, RTP, SEPA Instant) typically expire in 1–5 minutes; corridors with longer settlement guarantees may have longer windows. Always rely on this timestamp rather than assuming a fixed window.'
          example: '2025-10-03T12:05:00Z'
        source:
          $ref: '#/components/schemas/QuoteSourceOneOf'
        destination:
          $ref: '#/components/schemas/QuoteDestinationOneOf'
        sendingCurrency:
          $ref: '#/components/schemas/Currency'
          description: Currency for the sending amount
        receivingCurrency:
          $ref: '#/components/schemas/Currency'
          description: Currency for the receiving amount
        totalSendingAmount:
          type: integer
          format: int64
          description: The total amount that will be sent in the smallest unit of the sending currency (eg. cents).
          exclusiveMinimum: 0
          example: 123010
        totalReceivingAmount:
          type: integer
          format: int64
          description: The total amount that will be received in the smallest unit of the receiving currency (eg. cents).
          exclusiveMinimum: 0
          example: 1000
        exchangeRate:
          type: number
          description: Number of sending currency units per receiving currency unit.
          exclusiveMinimum: 0
        feesIncluded:
          type: integer
          format: int64
          description: 'The fees associated with the quote in the smallest unit of the sending currency (eg. cents). Note: this value may fluctuate between quotes — some underlying fee components are defined in the receiving currency, so their equivalent in the sending currency moves with the FX rate. The fees shown here are locked only for the lifetime of this quote.'
          minimum: 0
          example: 10
        paymentInstructions:
          type: array
          description: Payment instructions for executing the payment. This is not required when using an internal account source.
          items:
            $ref: '#/components/schemas/PaymentInstructions'
          example:
          - accountOrWalletInfo:
              accountType: USD_ACCOUNT
              paymentRails:
              - ACH
              - WIRE
              accountNumber: '1234567890'
              routingNumber: '021000021'
              bankName: Chase Bank
              reference: UMA-Q12345-REF
            instructionsNotes: Include reference UMA-Q12345-REF in memo
          - accountOrWalletInfo:
              accountType: SPARK_WALLET
              assetType: BTC
              address: spark1pgssyuuuhnrrdjswal5c3s3rafw9w3y5dd4cjy3duxlf7hjzkp0rqx6dj6mrhu
              invoice: lnbc15u1p3xnhl2pp5jptserfk3zk4qy42tlucycrfwxhydvlemu9pqr93tuzlv9cc7g3sdqsvfhkcap3xyhx7un8cqzpgxqzjcsp5f8c52y2stc300gl6s4xswtjpc37hrnnr3c9wvtgjfuvqmpm35evq9qyyssqy4lgd8tj637qcjp05rdpxxykjenthxftej7a2zzmwrmrl70fyj9hvj0rewhzj7jfyuwkwcg9g2jpwtk3wkjtwnkdks84hsnu8xps5vsq4gj5hs
        transactionId:
          type: string
          description: The ID of the transaction created from this quote.
          example: Transaction:019542f5-b3e7-1d02-0000-000000000005
        remittanceInformation:
          type: string
          maxLength: 80
          description: 'Free-form information about the payment that travels with it to the recipient, as provided on the quote request. The field this populates depends on the payment rail: for ACH it populates the Addenda record, for FedNow and RTP it populates the remittanceInformation field, and for wires it populates the OBI (Originator to Beneficiary Information) / beneficiary information.'
          example: '12345'
        counterpartyInformation:
          $ref: '#/components/schemas/CounterpartyInformation'
          description: Additional information about the counterparty, if available and required by the platform in their configuration.
        rateDetails:
          $ref: '#/components/schemas/OutgoingRateDetails'
          description: Details about the rate and fees for the transaction.
        scaChallenge:
          $ref: '#/components/schemas/ScaChallenge'
          readOnly: true
          description: 'Present only while `status` is `PENDING_AUTHORIZATION`: the Strong Customer Authentication challenge to satisfy before this quote can be executed (or, for realtime-funding sources, before `paymentInstructions` are issued). Omitted for customers outside SCA-regulated regions (non-EU).'
    Refund:
      type: object
      required:
      - reference
      - initiatedAt
      - status
      properties:
        reference:
          type: string
          description: The unique reference ID of the refund
          example: UMA-Q12345-REFUND
        initiatedAt:
          type: string
          format: date-time
          description: When the refund was initiated
          example: '2025-08-15T14:30:00Z'
        settledAt:
          type: string
          format: date-time
          description: When the refund was settled
          example: '2025-08-15T14:35:00Z'
        status:
          type: string
          enum:
          - PENDING
          - COMPLETED
          - FAILED
          description: Current status of the refund
          example: COMPLETED
        reason:
          type: string
          enum:
          - TRANSACTION_FAILED
          - USER_CANCELLATION
          - TIMEOUT
          description: Reason for the refund
          example: TRANSACTION_FAILED
    BasePaymentAccountInfo:
      type: object
      required:
      - accountType
      properties:
        accountType:
          $ref: '#/components/schemas/PaymentAccountType'
    AgentPolicy:
      type: object
      description: Policy governing what an agent can do, how it executes actions, and its spending boundaries.
      required:
      - permissions
      - defaultExecutionMode
      - spendingLimits
      properties:
        permissions:
          type: array
          description: List of permissions granted to the agent.
          items:
            $ref: '#/components/schemas/AgentPermission'
        defaultExecutionMode:
          $ref: '#/components/schemas/AgentExecutionMode'
        spendingLimits:
          $ref: '#/components/schemas/AgentSpendingLimits'
        accountRestrictions:
          $ref: '#/components/schemas/AgentAccountRestrictions'
        approvalThresholds:
          $ref: '#/components/schemas/AgentApprovalThresholds'
    QuoteDestinationOneOf:
      oneOf:
      - $ref: '#/components/schemas/AccountDestination'
      - $ref: '#/components/schemas/UmaAddressDestination'
      discriminator:
        propertyName: destinationType
        mapping:
          ACCOUNT: '#/components/schemas/AccountDestination'
          UMA_ADDRESS: '#/components/schemas/UmaAddressDestination'
    BdtAccountInfo:
      allOf:
      - $ref: '#/components/schemas/BdtAccountInfoBase'
      - type: object
        required:
        - paymentRails
        properties:
          paymentRails:
            type: array
            items:
              type: string
              enum:
              - BANK_TRANSFER
              - MOBILE_MONEY
    PhpAccountInfo:
      allOf:
      - $ref: '#/components/schemas/PhpAccountInfoBase'
      - type: object
        required:
        - paymentRails
        properties:
          paymentRails:
            type: array
            items:
              type: string
              enum:
              - BANK_TRANSFER
    XofAccountInfoBase:
      type: object
      required:
      - accountType
      - phoneNumber
      - provider
      - region
      properties:
        accountType:
          type: string
          enum:
          - XOF_ACCOUNT
        phoneNumber:
          type: string
          description: The phone number in international format
          example: '+1234567890'
          minLength: 7
          maxLength: 15
          pattern: ^\+[0-9]{6,14}$
        provider:
          type: string
          description: The mobile money provider name
          minLength: 1
          maxLength: 255
        region:
          type: string
          description: Country code within the West African CFA franc zone
          minLength: 2
          maxLength: 2
          pattern: ^[A-Z]{2}$
          enum:
          - BJ
          - CI
          - SN
          - TG
      example:
        accountType: XOF_ACCOUNT
        phoneNumber: '+1234567890'
        provider: Example Provider
        region: BJ
    PaymentEthereumWalletInfo:
      title: Ethereum Wallet
      allOf:
      - $ref: '#/components/schemas/BasePaymentAccountInfo'
      - $ref: '#/components/schemas/EthereumWalletInfo'
      - type: object
        properties:
          assetType:
            type: string
            description: Type of asset
            enum:
            - USDC
    AgentPermission:
      type: string
      enum:
      - VIEW_TRANSACTIONS
      - CREATE_TRANSFERS
      - CREATE_QUOTES
      - EXECUTE_QUOTES
      - MANAGE_EXTERNAL_ACCOUNTS
      description: 'Permission granted to an agent that determines what actions it can perform. VIEW_TRANSACTIONS: Can list and retrieve transactions and account balances. CREATE_TRANSFERS: Can initiate same-currency transfers. CREATE_QUOTES: Can create cross-currency quotes. EXECUTE_QUOTES: Can execute cross-currency quotes. MANAGE_EXTERNAL_ACCOUNTS: Can create a

# --- truncated at 32 KB (178 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/lightspark/refs/heads/main/openapi/lightspark-agent-management-api-openapi.yml