curl --request POST \
--url https://api.example.com/clients \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"email": "jsmith@example.com"
}
'import requests
url = "https://api.example.com/clients"
payload = {
"name": "<string>",
"email": "jsmith@example.com"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', email: 'jsmith@example.com'})
};
fetch('https://api.example.com/clients', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "cl_9f2c1ab84d7e4f1fa3c65b0e7d9a2c41",
"status": "provisioning",
"createdAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"baseSmartWallet": "<string>",
"kybStatus": "notStarted",
"kybApplicationId": "kyb_9f2c1ab84d7e4f1fa3c65b0e7d9a2c41",
"failure": {
"code": "provisioning_failed",
"message": "<string>",
"retriable": false
},
"pollUrl": "<string>"
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}Create a client
Provision a company account for one of your clients. The id is knowable at once, so poll pollUrl with the returned id in X-Hevn-Account until status is ready — about 30 seconds. An identical resubmit answers 200 with Idempotency-Replayed: true and the same id.
curl --request POST \
--url https://api.example.com/clients \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"email": "jsmith@example.com"
}
'import requests
url = "https://api.example.com/clients"
payload = {
"name": "<string>",
"email": "jsmith@example.com"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', email: 'jsmith@example.com'})
};
fetch('https://api.example.com/clients', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "cl_9f2c1ab84d7e4f1fa3c65b0e7d9a2c41",
"status": "provisioning",
"createdAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"baseSmartWallet": "<string>",
"kybStatus": "notStarted",
"kybApplicationId": "kyb_9f2c1ab84d7e4f1fa3c65b0e7d9a2c41",
"failure": {
"code": "provisioning_failed",
"message": "<string>",
"retriable": false
},
"pollUrl": "<string>"
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Your own key for this write, ^[A-Za-z0-9._:-]{1,128}$. A retry with the same key replays the first answer; the same key with a different request is refused.
"po-inv-2026-114"
The client account to act for, as a cl_… id. Omit it to act as yourself.
"cl_9f2c1ab84d7e4f1fa3c65b0e7d9a2c41"
Body
Response
Successful Response
Stable public identifier for this account.
^(?:cl_)?[A-Za-z0-9._:\-]{1,216}$"cl_9f2c1ab84d7e4f1fa3c65b0e7d9a2c41"
Current account-provisioning status.
provisioning, ready, failed UTC timestamp when the account was created.
Legal or trading name of the account.
Email address associated with the account.
Phone number in international E.164 format.
Base smart-wallet address controlled by the account.
Current business-verification status.
notStarted, pending, approved, rfi, rejected Latest immutable business-verification application identifier.
^(?:kyb_)?[A-Za-z0-9._:\-]{1,216}$"kyb_9f2c1ab84d7e4f1fa3c65b0e7d9a2c41"
Provisioning failure details, when present.
Show child attributes
Show child attributes
Relative API URL to poll with this response's id in X-Hevn-Account.
Was this page helpful?