Create Sub Account
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'My Sub Account',
return_name: 'John Smith',
return_address: '123 Smith Street',
return_address2: 'Apartment 2',
return_city: 'Denver',
return_state: 'CO',
return_postal_code: '12345'
})
};
fetch('https://api.thanks.io/api/v2/sub-accounts/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.thanks.io/api/v2/sub-accounts/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "My Sub Account",
"return_name": "John Smith",
"return_address": "123 Smith Street",
"return_address2": "Apartment 2",
"return_city": "Denver",
"return_state": "CO",
"return_postal_code": "12345"
}
'import requests
url = "https://api.thanks.io/api/v2/sub-accounts/"
payload = {
"title": "My Sub Account",
"return_name": "John Smith",
"return_address": "123 Smith Street",
"return_address2": "Apartment 2",
"return_city": "Denver",
"return_state": "CO",
"return_postal_code": "12345"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"user_id": 2,
"title": "API Update",
"return_name": "Your Business",
"return_address": "123 Main Street",
"return_address2": "Apartment 1",
"return_city": "Fake City",
"return_state": "NY",
"return_postal_code": null,
"updated_at": "2025-09-09 18:26:51",
"created_at": "2025-09-09 18:26:51",
"id": 50
}{
"message": "Unauthorized"
}Account
Create Sub-Account
Create a new sub-account.
POST
/
sub-accounts
/
Create Sub Account
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'My Sub Account',
return_name: 'John Smith',
return_address: '123 Smith Street',
return_address2: 'Apartment 2',
return_city: 'Denver',
return_state: 'CO',
return_postal_code: '12345'
})
};
fetch('https://api.thanks.io/api/v2/sub-accounts/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.thanks.io/api/v2/sub-accounts/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "My Sub Account",
"return_name": "John Smith",
"return_address": "123 Smith Street",
"return_address2": "Apartment 2",
"return_city": "Denver",
"return_state": "CO",
"return_postal_code": "12345"
}
'import requests
url = "https://api.thanks.io/api/v2/sub-accounts/"
payload = {
"title": "My Sub Account",
"return_name": "John Smith",
"return_address": "123 Smith Street",
"return_address2": "Apartment 2",
"return_city": "Denver",
"return_state": "CO",
"return_postal_code": "12345"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"user_id": 2,
"title": "API Update",
"return_name": "Your Business",
"return_address": "123 Main Street",
"return_address2": "Apartment 1",
"return_city": "Fake City",
"return_state": "NY",
"return_postal_code": null,
"updated_at": "2025-09-09 18:26:51",
"created_at": "2025-09-09 18:26:51",
"id": 50
}{
"message": "Unauthorized"
}Authorizations
Bearer token authentication using your thanks.io API key
Body
application/json
Response
Created
Example:
1
Example:
2
Example:
"My Sub Account"
Example:
"John Smith"
Example:
"123 Smith Street"
Example:
"Apartment 2"
Example:
"Denver"
Example:
"CO"
Example:
"12345"
Was this page helpful?