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

# Register Wallet

> Registers an external wallet (an address you or one of your users control) for your company or one of your users. The wallet is created with status `in_review` and can be used once Kravata approves it (`accepted`).

#### Request

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| Authorization | Header | Yes | `Bearer <access>` obtained from **POST /api/token**. |
| clientId | Query | Yes | Your client ID, from **GET /api/infoClient**. Requests without it are rejected with 401. |
| userId | Query | No | Register the wallet for one of your users instead of your company. Available for B2B2B and B2B2C clients. |

#### Request Body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| wallet | string | Yes | Wallet address. |
| supportedTokenId | integer | Yes | Token ID from **GET /api/parameters/tokens**. |
| supportedNetworkId | integer | Yes | Network ID from **GET /api/parameters/networks?token=...**. It must be a network of the selected token. |
| supportedCustodianId | integer | Yes | Custodian ID from **GET /api/parameters/custodians**. For self-custodial wallets use "SIN CUSTODIO / DESCENTRALIZADA". |

IDs can differ between test and production: always read them from the parameter endpoints of the environment you use.

#### Response

The registered wallet: `id`, `wallet`, `supportedToken`, `supportedNetwork`, `supportedCustodian`, `status` (`in_review`), `isCustodial`, `registerDate` and `userId` (owner).

#### Errors

| Status | When |
| --- | --- |
| 400 | Invalid body, the token is not supported on the selected network, or the wallet is already registered. |
| 401 | Missing token or `clientId`. |



## OpenAPI

````yaml /business/openapi.json post /api/wallets
openapi: 3.1.0
info:
  title: Kravata Business API
  version: '1.0'
  description: >-
    Kravata Business API: on-ramp and off-ramp orders, accounts and wallets,
    users, custody wallets and transfers.
servers:
  - url: https://testapi.kravata.co
    description: Test
  - url: https://apiv2.kravata.co
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Authentication
  - name: Accounts
  - name: Wallets
  - name: Users
  - name: Ramp Orders
  - name: Custody
  - name: Webhooks
paths:
  /api/wallets:
    post:
      tags:
        - Wallets
      summary: Register Wallet
      description: >-
        Registers an external wallet (an address you or one of your users
        control) for your company or one of your users. The wallet is created
        with status `in_review` and can be used once Kravata approves it
        (`accepted`).


        #### Request


        | Field | Type | Required | Description |

        | --- | --- | --- | --- |

        | Authorization | Header | Yes | `Bearer <access>` obtained from **POST
        /api/token**. |

        | clientId | Query | Yes | Your client ID, from **GET /api/infoClient**.
        Requests without it are rejected with 401. |

        | userId | Query | No | Register the wallet for one of your users
        instead of your company. Available for B2B2B and B2B2C clients. |


        #### Request Body


        | Field | Type | Required | Description |

        | --- | --- | --- | --- |

        | wallet | string | Yes | Wallet address. |

        | supportedTokenId | integer | Yes | Token ID from **GET
        /api/parameters/tokens**. |

        | supportedNetworkId | integer | Yes | Network ID from **GET
        /api/parameters/networks?token=...**. It must be a network of the
        selected token. |

        | supportedCustodianId | integer | Yes | Custodian ID from **GET
        /api/parameters/custodians**. For self-custodial wallets use "SIN
        CUSTODIO / DESCENTRALIZADA". |


        IDs can differ between test and production: always read them from the
        parameter endpoints of the environment you use.


        #### Response


        The registered wallet: `id`, `wallet`, `supportedToken`,
        `supportedNetwork`, `supportedCustodian`, `status` (`in_review`),
        `isCustodial`, `registerDate` and `userId` (owner).


        #### Errors


        | Status | When |

        | --- | --- |

        | 400 | Invalid body, the token is not supported on the selected
        network, or the wallet is already registered. |

        | 401 | Missing token or `clientId`. |
      operationId: register-wallet
      parameters:
        - name: clientId
          in: query
          required: true
          description: ''
          schema:
            type: string
        - name: userId
          in: query
          required: false
          description: 'Optional: register it for one of your users.'
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                wallet:
                  type: string
                supportedTokenId:
                  type: integer
                supportedNetworkId:
                  type: integer
                supportedCustodianId:
                  type: integer
            example:
              wallet: '0x1234567890abcdef1234567890abcdef12345678'
              supportedTokenId: 3
              supportedNetworkId: 4
              supportedCustodianId: 18
      responses:
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              examples:
                api-wallets:
                  summary: api/wallets
                  value:
                    message: Unauthorized
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Access token from POST /api/token (valid 5 minutes).

````