Update Sub Account
const options = {
method: 'PUT',
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/{subAccountId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PUT \
--url https://api.thanks.io/api/v2/sub-accounts/{subAccountId} \
--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/{subAccountId}"
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.put(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
Update Sub-Account
PUT
/
sub-accounts
/
{subAccountId}
Update Sub Account
const options = {
method: 'PUT',
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/{subAccountId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PUT \
--url https://api.thanks.io/api/v2/sub-accounts/{subAccountId} \
--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/{subAccountId}"
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.put(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
Path Parameters
ID of sub-account
Example:
56
Body
application/json
Response
Updated
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?