PUT
/
sub-accounts
/
8
Update
const options = {
  method: 'PUT',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': '*/*'},
  body: '"\"{\\n    \\\"title\\\": \\\"API Update\\\",\\n    \\\"return_name\\\": \\\"Your Business\\\",\\n    \\\"return_address\\\": \\\"123 Main Street\\\",\\n    \\\"return_address2\\\": \\\"Apartment 1\\\",\\n    \\\"return_city\\\": \\\"Fake City\\\",\\n    \\\"return_state\\\": \\\"NY\\\"\\n}\""'
};

fetch('https://api.thanks.io/api/v2/sub-accounts/8', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
{
  "id": 8,
  "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": "55555",
  "default_envelope": null,
  "created_at": "2020-03-31 02:17:33",
  "updated_at": "2020-04-06 02:34:02"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Content-Type
string

Body

*/* · string

The body is of type string.

Example:

"\"{\\n \\\"title\\\": \\\"API Update\\\",\\n \\\"return_name\\\": \\\"Your Business\\\",\\n \\\"return_address\\\": \\\"123 Main Street\\\",\\n \\\"return_address2\\\": \\\"Apartment 1\\\",\\n \\\"return_city\\\": \\\"Fake City\\\",\\n \\\"return_state\\\": \\\"NY\\\"\\n}\""

Response

200 - application/json

OK

The response is of type object.