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

# Import foreign Sumsub reusable KYC share token

> Submit a fresh Sumsub reusable KYC share token for a non-Brazil applicant after Sumsub approves the verification. Pods validates the foreign tax id, stores only a salted hash plus the last four digits, creates or reuses the customer profile and Avenia subaccount, imports the token into Avenia, and returns a Pods-generated kycUserId. Poll GET /api/v1/kyc/status until status is approved, then call POST /api/v1/kyc/currency-unlock to enable USD ramps.



## OpenAPI

````yaml /openapi.yaml post /api/v1/kyc/foreign/sumsub-share-token
openapi: 3.0.0
info:
  version: 2.0.0
  title: Pods API
  description: >
    # Pods API Documentation


    Pods API is a comprehensive DeFi aggregation platform that enables
    cross-chain and same-chain transactions for yield strategies.


    ## Key Features


    - **Cross-Chain Swaps**: Swap tokens across different blockchain networks

    - **Same-Chain Swaps**: Optimal routing for swaps within the same network

    - **Yield Strategies**: Access to multiple DeFi protocols (Aave, Morpho,
    Lido, etc.)

    - **Wallet Tracking**: Monitor positions and yields across protocols

    - **Transaction Monitoring**: Real-time status updates for cross-chain
    transactions


    ## Authentication


    Most API endpoints require authentication using an API key in the
    `x-api-key` header:


    ```

    x-api-key: your-api-key-here

    ```


    Obtain your API key from the Pods dashboard.


    **Exceptions:**

    - `GET /health` is public and does not require authentication.

    - Customer dashboard endpoints (e.g. `GET /customers/me`,
    `/customers/:id/tokens`, `/customers/:id/token-groups`) require a **Bearer**
    token (Supabase or Magic JWT). API key alone is not sufficient for these
    routes because they enforce user role checks.


    ## Base URL


    Production: `https://api.pods.finance`


    ## Rate Limits


    - 100 requests per minute per API key

    - 1000 requests per hour per API key


    ## Quote Expiration


    Quotes expire after 5 minutes. The `deadline` field is a Unix timestamp in
    seconds and `deadlineDate` is an ISO 8601 string (UTC); request a new quote
    when the deadline has passed.


    ## Error Handling


    All errors follow a consistent format. The HTTP status line is the source of
    truth — the body does **not** include `httpStatus`:


    ```json

    {
      "error": {
        "code": "ERROR_CODE",
        "message": "Human-readable error message",
        "details": {}
      }
    }

    ```


    ## Common Error Codes


    - **QUOTE_NOT_FOUND** (404): Quote not found or expired

    - **ACTION_NOT_FOUND** (404): Action not found

    - **STRATEGY_NOT_FOUND** (404): Strategy not found

    - **RECURRING_COLLECTION_REQUIRES_FEE** (400): Recurring collection requires
    a performance or markup fee configured

    - **RECURRING_MARKUP_RECIPIENT_REQUIRED** (422): Live recurring collection
    with a markup fee requires a non-zero markup fee recipient

    - **RECURRING_RECIPIENT_ROTATION_PENDING_DISPATCH** (409): Markup fee
    recipient cannot be rotated while a recurring collection transaction is
    unresolved

    - **RECURRING_REGISTRY_CONTROLLER_NOT_CONFIGURED** (503): Recurring
    collection controller is not configured for this network

    - **RECURRING_REGISTRY_MISMATCH** (409): On-chain recurring collection
    registry is not synchronized

    - **INVALID_ACTION_TYPE** (400): Action type is not supported for this
    endpoint

    - **QUOTE_EXPIRED** (400): Quote has expired

    - **QUOTE_VALIDATION_ERROR** (400): Quote validation failed

    - **PIX_THIRD_PARTY_QUOTE_MISMATCH** (400): thirdParty must match the Pix
    offramp quote

    - **MISSING_PIX_KEY** (400): pixKey is required to create the BRL Pix payout
    ticket

    - **INVALID_PIX_BRCODE_FORMAT** (400): pixKey looks like a Pix BR Code but
    failed format/checksum validation

    - **PIX_BRCODE_EXPIRED** (400): This Pix BR Code has expired

    - **PIX_BRCODE_LOOKUP_FAILED** (502): Failed to look up Pix BR Code details
    from Avenia

    - **PIX_BRCODE_REQUOTE_REQUIRED** (400): This Pix BR Code has a fixed amount
    that was not priced into the existing quote; request a new quote

    - **PROVIDER_NOT_FOUND** (404): Swap provider not found

    - **NO_ROUTE_FOUND** (400): No swap route available between specified chains

    - **INVALID_PREFERRED_PROVIDER** (400): Unknown preferredProvider name

    - **PREFERRED_PROVIDER_NOT_ELIGIBLE** (400): preferredProvider is not
    eligible for this swap route

    - **PREFERRED_PROVIDER_QUOTE_UNAVAILABLE** (400): No quote was returned for
    the requested preferredProvider

    - **QUOTE_GENERATION_FAILED** (400): Could not generate quote for specified
    parameters

    - **FEE_SPONSORSHIP_NOT_ALLOWED** (403): Fee sponsorship is not allowed for
    this customer

    - **CUSTOMER_STRATEGY_NOT_FOUND** (404): Customer strategy not found

    - **FEE_ACTIVATION_IN_PROGRESS** (409): Profit fee activation is already
    reconciling

    - **FEE_ACTIVATION_TASK_NOT_PERSISTED** (500): Fee activation task could not
    be persisted

    - **INVALID_TX_HASH** (400): Invalid transaction hash format

    - **TX_UPDATE_FAILED** (500): Failed to update transaction status

    - **INVALID_AMOUNT_PARAMS** (400): Cannot specify both amountIn and
    amountOut simultaneously

    - **MISSING_AMOUNT_PARAMS** (400): Either amountIn or amountOut is required

    - **INVALID_SLIPPAGE** (400): slippage must be a number between 0.0001 and
    0.5 (fraction of 1, e.g. 0.01 = 1%)

    - **AMOUNT_IN_TOO_LOW** (400): AmountIn is below the minimum for this route

    - **AMOUNT_IN_TOO_HIGH** (400): AmountIn exceeds available liquidity for
    this route. Try a smaller amount.

    - **AMOUNT_IN_TOO_LOW_OFFRAMP** (400): AmountIn must be greater than 1 USDC

    - **AMOUNT_IN_TOO_HIGH_OFFRAMP** (400): AmountIn must be less than 5k USDC

    - **AMOUNT_OUT_TOO_LOW_OFFRAMP** (400): AmountOut is below the route minimum
    (0.5 BRL on Pix BRLA/BRS, 5 BRLA on USDC Pix)

    - **AMOUNT_OUT_TOO_HIGH_OFFRAMP** (400): AmountOut must be less than 26k
    BRLA

    - **AMOUNT_EXCEEDS_PROVIDER_LIMIT** (409): Requested amount exceeds the
    remaining provider withdrawal limit

    - **AMOUNT_IN_TOO_LOW_ONRAMP** (400): AmountIn is below the route minimum
    (0.5 BRL on Pix BRLA/BRS, 1 BRLA on USDC Pix)

    - **AMOUNT_IN_TOO_HIGH_ONRAMP** (400): AmountIn must be less than 75k BRLA

    - **AMOUNT_OUT_TOO_LOW_ONRAMP** (400): AmountOut must be greater than 1 USDC

    - **AMOUNT_OUT_TOO_HIGH_ONRAMP** (400): AmountOut must be less than 15k USDC

    - **TRANSFER_VALIDATION_FAILED** (400): Token transfer validation failed

    - **REFUND_PROCESSING_FAILED** (500): Failed to process refund transaction

    - **INSUFFICIENT_AMOUNT_FOR_REFUND** (400): Transferred amount insufficient
    to cover refund fee

    - **FORBIDDEN** (403): Access denied

    - **INTERNAL_SERVER_ERROR** (500): An unexpected error occurred

    - **BYTECODE_GENERATION_FAILED** (500): Failed to generate transaction
    bytecode

    - **SWAP_EXECUTION_FAILED** (500): Failed to execute swap transaction

    - **KAMINO_SERVICE_UNAVAILABLE** (503): Lending service is temporarily
    unavailable. Please try again later.

    - **KAMINO_BAD_REQUEST** (400): Invalid request to lending service

    - **DEPOSIT_NOT_FOUND** (404): Bitcoin deposit not found

    - **SYMBIOSIS_API_ERROR** (502): Error communicating with Symbiosis API


    ## Support


    - Documentation: https://docs.pods.finance

    - Support: support@pods.finance
  contact:
    name: Pods Support
    email: support@pods.finance
    url: https://pods.finance
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: https://api.pods.finance
    description: Production server
security: []
tags:
  - name: Health
    description: Health check endpoints
  - name: KYC
    description: >-
      KYC onboarding and status endpoints: Brazilian and foreign Sumsub import,
      BigDataCorp capture, external evidence, and USD currency unlock
  - name: Swap
    description: Token swap operations
  - name: Tracking
    description: Execution tracking for swaps, transfers, and strategy operations
  - name: Strategies
    description: DeFi yield strategy operations
  - name: Ondo
    description: Ondo Global Markets stock status and tradability
  - name: Tokens
    description: Token catalog and metadata
  - name: Transfer
    description: Token transfer transaction generation
  - name: Wallets
    description: Wallet position tracking
  - name: Customers
    description: Customer account management (Bearer auth)
  - name: Quotes
    description: Quote history and management
  - name: Smart Account
    description: ERC-4337 Gnosis Safe smart account provisioning
paths:
  /api/v1/kyc/foreign/sumsub-share-token:
    post:
      tags:
        - KYC
      summary: Import foreign Sumsub reusable KYC share token
      description: >-
        Submit a fresh Sumsub reusable KYC share token for a non-Brazil
        applicant after Sumsub approves the verification. Pods validates the
        foreign tax id, stores only a salted hash plus the last four digits,
        creates or reuses the customer profile and Avenia subaccount, imports
        the token into Avenia, and returns a Pods-generated kycUserId. Poll GET
        /api/v1/kyc/status until status is approved, then call POST
        /api/v1/kyc/currency-unlock to enable USD ramps.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitForeignSumsubShareTokenRequest'
      responses:
        '200':
          description: Foreign KYC token import submitted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitSumsubShareTokenResponse'
        '401':
          description: Unauthorized - missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Tax id conflicts with an existing customer profile
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Invalid payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: Avenia import failed or returned an invalid response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    SubmitForeignSumsubShareTokenRequest:
      type: object
      properties:
        email:
          type: string
          format: email
          description: Applicant email
          example: user@example.com
        shareToken:
          type: string
          description: >-
            Fresh Sumsub reusable KYC share token generated for the Avenia
            recipient
          example: SUMSUB_SHARE_TOKEN
        sumsubApplicantId:
          type: string
          description: >-
            Unique Sumsub applicant id from the approved applicantReviewed
            webhook. Pods uses it for customer-scoped idempotency.
          example: 6a3502bf7fee2fab5377cb1e
        taxId:
          type: string
          description: >-
            Foreign tax identifier (for example SSN or national ID). Pods stores
            only a salted hash and the last four digits.
          example: '123456789'
        taxIdCountry:
          type: string
          minLength: 3
          maxLength: 3
          description: ISO 3166-1 alpha-3 country code for the tax id (for example USA)
          example: USA
        walletAddress:
          allOf:
            - $ref: '#/components/schemas/WalletAddress'
            - description: Applicant wallet. Checksummed EVM address or Solana public key.
      required:
        - email
        - shareToken
        - sumsubApplicantId
        - taxId
        - taxIdCountry
        - walletAddress
      description: Foreign reusable KYC share token import payload (non-Brazil tax id)
    SubmitSumsubShareTokenResponse:
      type: object
      properties:
        kycUserId:
          type: string
          format: uuid
          description: Pods-generated public KYC user id
          example: 550e8400-e29b-41d4-a716-446655440000
        status:
          $ref: '#/components/schemas/KycProfileStatus'
      required:
        - kycUserId
        - status
      description: KYC import submission result
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            details:
              nullable: true
          required:
            - code
            - message
      required:
        - error
      example:
        error:
          code: QUOTE_NOT_FOUND
          message: Quote not found or expired
    WalletAddress:
      type: string
      description: >-
        Wallet address stored on the Ramp KYC profile. Accepts a checksummed EVM
        address or a Solana public key. Later Pix quotes must use the same
        address as destinationAddress (onramp) or originAddress (offramp).
      example: EXYhCNamLPFfSMekSn7Lzc2cP32aZpRa7ok5gErdJzcj
    KycProfileStatus:
      type: string
      enum:
        - created
        - provider_pending
        - approved
        - rejected
        - rejected_retryable
        - blocked
      description: Normalized Pods KYC status
      example: provider_pending
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key for authentication. Obtain from your Pods dashboard.

````