Create whitelabel KYB link for organization
POST /v1/api-gateway/organization/{organization_id}/whitelabel-kyb
Generates a hosted business-verification (KYB) link for one of your organizations (or your own root organization). The link is valid for 7 days (expires_). Calling it again before verification completes issues a fresh link.
Request
Authentication: your API key in the x-api-key header.
Path parameters
| Field | Type | Description |
|---|---|---|
organization_ required | string, uuid | Organization id. |
Headers
| Field | Type | Description |
|---|---|---|
Idempotency-Key | string | A unique string you choose, up to 255 characters, that makes this request safe to retry. If a request times out or fails in transit, send it again with the same key: the status code and body of the first attempt are returned and the operation is not performed a second time. Stored replies — including failures — are replayed for 24 hours, after which the same key starts a fresh request. Reusing a key for a different request, or sending it while the first request is still running, returns 409. Omit the header and the request behaves exactly as before. Document upload endpoints do not accept it. |
Example request
cURL
curl --request POST \
--url 'https://api.themooncard.com/v1/api-gateway/organization/8d2cd518-5ef2-4280-91e8-63b1a0e672e7/whitelabel-kyb' \
--header 'x-api-key: YOUR_API_KEY'Responses
201 Success
| Field | Type | Description |
|---|---|---|
url required | string | Hosted verification page to send the organization to. Carries a signed token in the query string. |
expires_ required | string | ISO-8601 timestamp after which the link stops working (7 days from creation). |
organization_ required | string | Echo of the organization id the link was created for. |
organization_ required | string | Display name of that organization. |
JSON
{
"url": "https://verify.paywithmoon.com/kyb?token=eyJhbGciOiJIUzI1NiJ9.abc123",
"expires_at": "2026-08-23T17:51:01.000Z",
"organization_id": "5c1e2d3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f",
"organization_name": "Acme Inc."
}400 Error
Validation failed (errors[] lists each offending field) or a domain rule rejected the request ({ message, code }).
The body is the standard error object: see Errors.
401 Error
Missing or invalid credentials, e.g. { "message": "Invalid API Key", "code": "UNAUTHORIZED" }.
The body is the standard error object: see Errors.
403 Error
The organization is not owned by this account (FORBIDDEN).
The body is the standard error object: see Errors.
404 Error
Organization not found (ORGANIZATION_).
The body is the standard error object: see Errors.
409 Error
The organization has already completed KYB verification (ORGANIZATION_). The Idempotency-Key you sent is already in use. IDEMPOTENCY_ — the key was used for a different request; send a new key, or repeat the original request exactly to receive its stored response. IDEMPOTENCY_ — the first request with this key has not finished yet; retry in a few seconds.
The body is the standard error object: see Errors.
500 Error
Unexpected server error. Body is { message: "Internal server error", code: "INTERNAL_.
The body is the standard error object: see Errors.
Last updated August 16, 2026