Skip to main content
POST
The response is always a list, with one element per product opted out of. 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 out of every active opt-in or Opt out of a single product — to see a request paired with the response it actually produces.

Opt out of every active opt-in

Omit asset. Every active opt-in of the user is closed, and one opt-out comes back per product.
Request
Response

Opt out of a single product

Send asset. Only the opt-in of that product is closed and the rest stay active. The user must have an active opt-in for it, otherwise the request fails with error code 20038 and nothing is changed.
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 out of, for example USDT. The end user must have an active opt-in for it. When omitted, every active opt-in of the end user is closed, which is the original behaviour of this endpoint. Send one request per product: each one either succeeds for that product or fails leaving the other opts active.

Response

Successful Creation

id
string<uuid>

UUID used as opt out identifier.

transaction_id
string<uuid>

UUID used as opt out's transaction identifier.

end_user_id
string<uuid>

Unique identifier used as end user's external ref.

opt_in_id
string<uuid>

UUID identifier of the related opt in.

asset
string

Asset symbol.

created_at
string<date-time>

ISO format creation datetime