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

# Associate an embedded wallet with a customer

> Links an embedded (WaaS) wallet to the customer. The wallet is identified by the supplied WaaS idToken — its subject is the wallet id, so the wallet id is never passed directly — and the token's audience must be the authenticated project.



## OpenAPI

````yaml /api-reference/openapi.yaml post /customers/{customerId}/wallets/associate
openapi: 3.0.3
info:
  title: Polygon OMS Public API
  version: v26.05.28-0001
  description: >-
    Unified API for moving money between crypto and fiat. Three ways to move
    money: Transactions (instant, wallet or card funded, including Cash-In for
    in-person cash deposits), Deposit Addresses (reusable crypto deposit
    configurations), and Virtual Accounts (dedicated bank accounts that
    auto-convert fiat to crypto). Standard transactions follow a two-step flow:
    create a Quote (pricing), then create a Transaction (execution). Cash-in
    codes generate a one-time deposit code for in-person cash deposits at retail
    locations.
  contact:
    name: Polygon OMS
    url: https://oms.polygon.technology
servers:
  - url: https://sandbox-api.polygon.technology/v0.11
    description: Sandbox
  - url: https://api.polygon.technology/v0.11
    description: Production
security:
  - BearerAuth: []
tags:
  - name: Auth
    description: Authentication via FrontEgg
  - name: Customers
    description: Customer management and KYC
  - name: Customer
  - name: Wallet
  - name: Quote
  - name: Transaction
  - name: CashIns
  - name: CashLocation
  - name: Sandbox
  - name: VirtualAccount
  - name: Counterparty
  - name: ExternalAccount
  - name: DepositAddress
paths:
  /customers/{customerId}/wallets/associate:
    post:
      tags:
        - Wallets
      summary: Associate an embedded wallet with a customer
      description: >-
        Links an embedded (WaaS) wallet to the customer. The wallet is
        identified by the supplied WaaS idToken — its subject is the wallet id,
        so the wallet id is never passed directly — and the token's audience
        must be the authenticated project.
      operationId: associateWallet
      parameters:
        - name: customerId
          in: path
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssociateWalletRequest'
      responses:
        '200':
          description: Wallet associated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Wallet'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: >-
            Conflict — the wallet is already associated with a different
            customer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: true
      schema:
        type: string
      description: Unique key to prevent duplicate requests. Required on all POST requests.
      example: ord_123_attempt_1
  schemas:
    AssociateWalletRequest:
      type: object
      required:
        - idToken
      properties:
        idToken:
          type: string
          description: >-
            WaaS-issued idToken (ES256 JWT). Its subject is the wallet id and
            its audience must be the authenticated project.
          example: eyJhbGciOiJFUzI1NiIs...
    Wallet:
      type: object
      description: Embedded wallet linked to a customer.
      properties:
        id:
          type: string
          x-go-type-skip-optional-pointer: true
          example: wlt_01H9Xa8F5dN6mP3q
        object:
          type: string
          x-go-type-skip-optional-pointer: true
          example: wallet
        customer:
          type: string
          x-go-type-skip-optional-pointer: true
          nullable: true
          example: cst_01H9Xa8F5dN6mP3q
        custodyType:
          type: string
          x-go-type-skip-optional-pointer: true
          enum:
            - custodial
            - embedded
          example: embedded
        blockchainAddress:
          type: string
          x-go-type-skip-optional-pointer: true
          nullable: true
          example: '0x1234567890abcdef1234567890abcdef12345678'
        networkFamily:
          type: string
          x-go-type-skip-optional-pointer: true
          nullable: true
          example: evm
        status:
          type: string
          x-go-type-skip-optional-pointer: true
          nullable: true
          enum:
            - preallocated
            - active
            - suspended
          example: active
        createdAt:
          type: string
          format: date-time
          x-go-type-skip-optional-pointer: true
          nullable: true
        updatedAt:
          type: string
          format: date-time
          x-go-type-skip-optional-pointer: true
          nullable: true
    ErrorResponse:
      type: object
      required:
        - error
        - code
        - msg
        - status
      description: >-
        Canonical OMSX error envelope, matching the webrpc shape every OMSX
        service emits. Names and numeric codes are stable identifiers defined in
        `schema/omsx/errors.ridl`.
      properties:
        error:
          type: string
          description: Stable error name from schema/omsx/errors.ridl
          example: Unauthorized
        code:
          type: integer
          description: Stable numeric code from schema/omsx/errors.ridl
          example: 1000
        msg:
          type: string
          description: Human-readable message (kept stable across releases)
          example: unauthorized access
        cause:
          type: string
          description: >-
            Optional internal cause for operator triage; filtered before
            reaching end customers
          example: signature
        status:
          type: integer
          description: HTTP status mirrored in the body for client convenience
          example: 401
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Token from POST /auth/token

````