Skip to main content
POST
/
sub-accounts
/
Create Sub Account
const url = 'https://api.thanks.io/api/v2/sub-accounts/';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"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"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
{
  "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
}

Authorizations

Authorization
string
header
required

Bearer token authentication using your thanks.io API key

Body

application/json
title
string
required
Example:

"My Sub Account"

return_name
string
Example:

"John Smith"

return_address
string
Example:

"123 Smith Street"

return_address2
string
Example:

"Apartment 2"

return_city
string
Example:

"Denver"

return_state
string
Example:

"CO"

return_postal_code
string
Example:

"12345"

Response

Created

id
integer
Example:

1

user_id
integer
Example:

2

title
string
Example:

"My Sub Account"

return_name
string
Example:

"John Smith"

return_address
string
Example:

"123 Smith Street"

return_address2
string
Example:

"Apartment 2"

return_city
string
Example:

"Denver"

return_state
string
Example:

"CO"

return_postal_code
string
Example:

"12345"