Skip to main content
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));
{
  "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
}

Documentation Index

Fetch the complete documentation index at: https://docs.thanks.io/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer token authentication using your thanks.io API key

Path Parameters

subAccountId
integer
required

ID of sub-account

Example:

56

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

Updated

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"