Skip to main content
POST
The response is always a list, with one element per product opted into. Sending asset therefore returns a list of a single element.
The request and response example selectors above are independent of each other. Pick the same name in both — Opt in to every enabled product or Opt in to a single product — to see a request paired with the response it actually produces.

Opt in to every enabled product

Omit asset. Every product enabled for your account is opted into, and one opt-in comes back per product. This form requires the user to have no active opt-in at all.
Omitting asset is not a top-up. It does not add the products a user is missing: if the user already has an active opt-in — even for a single product — the request fails with 400 and nothing changes.A user opted into USDT only, on an account where BTC, ETH and USDT are enabled:
Request
Response
The user stays opted into USDT alone. To add BTC and ETH, send one request per product with asset, as shown below.
Request
Response

Opt in to a single product

Send asset. Only that product is opted into, and the other opts of the user are left as they are. Send one request per product you want to enable. This is also the only way to enable a further product for a user who is already opted into something: one request per product to add, each naming its asset.
Request
Response

Authorizations

Authorization
string
header
required

B2B’s White Label API uses OAuth2. Currently there is only one supported authentication flow:

  • clientCredentials allows you to access your own B2B account (First-Party Integration) and performs transactions against the public API. This oauth2 flow is well suited for this API, as it allows machine-to-machine communication.

Every call to the API has to be authenticated with an OAuth2 Token. In order to request this token, you will need to have sandbox or production API Keys (client id and client secret) that will be needed to generate a credential in order to negotiate an ephemeral access token.

Every request must be accompianed by an Authorization header with a value that follows the following schema: Bearer ACCESS_TOKEN

Body

application/json
end_user_id
string
required

End user's external ref.

asset
string

Optional. Symbol of the single product to opt the end user into, for example USDT. Only the products enabled for your account are accepted; the Yield APYs endpoint lists them. Send one request per product: each one either succeeds for that product or fails without touching the other opts of the end user. When omitted, the end user is opted into every product enabled for your account, and the request requires the end user to have no active opt-in at all: omitting asset is not a top-up, so if the end user already has one — even for a single product — the request fails and nothing changes. To add products to an end user who already has some, send one request per product with asset.

Response

Successful Creation

id
string<uuid>

UUID used as opt in identifier.

transaction_id
string<uuid>

UUID used as opt in's transaction identifier.

end_user_id
string<uuid>

Unique identifier used as end user's external ref.

asset
string

Asset symbol.

created_at
string<date-time>

ISO format creation datetime

opt_out_at
string<date-time> | null

ISO format opt out datetime

is_active
boolean

Indicates if the opt in is active.