PUT
/
recipients
/
296446
Update Recipient
const options = {
  method: 'PUT',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': '*/*'},
  body: '"\"{\\n  \\\"name\\\":\\\"Jane Doe\\\",\\n  \\\"address\\\":\\\"123 Main Street\\\",\\n  \\\"address2\\\": \\\"Apartment 1\\\",\\n  \\\"city\\\":\\\"Kansas City\\\",\\n  \\\"province\\\":\\\"MO\\\",\\n  \\\"postal_code\\\":\\\"64105\\\",\\n  \\\"country\\\":\\\"US\\\",\\n  \\\"dob\\\":\\\"04/23/1981\\\",\\n  \\\"custom1\\\":\\\"Custom 1\\\",\\n  \\\"custom2\\\":\\\"Custom 2\\\"\\n}\""'
};

fetch('https://api.thanks.io/api/v2/recipients/296446', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
{
  "id": 296446,
  "mailing_list_id": 514,
  "session_id": null,
  "name": "Jane Doe",
  "address": "123 Main Street",
  "address2": "Apartment 1",
  "city": "Kansas City",
  "province": "MO",
  "postal_code": "64105",
  "country": "US",
  "dob": "04/23/1981",
  "custom1": "Custom 1",
  "custom2": "Custom 2",
  "deliverability": null,
  "can_deliver": true,
  "created_at": "2020-04-06 01:56:48",
  "updated_at": "2020-04-06 02:24:43",
  "mailing_list": {
    "id": 514,
    "user_id": 2,
    "sub_account_id": null,
    "type": "manual",
    "description": "Mailing List Test",
    "file": null,
    "field_map": null,
    "shape_data": null,
    "total_recipients": 2,
    "processed": 1,
    "created_at": "3 weeks ago",
    "updated_at": "2020-04-06 01:56:48",
    "leads_data": null,
    "deleted_at": null
  }
}

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 \\\"name\\\":\\\"Jane Doe\\\",\\n \\\"address\\\":\\\"123 Main Street\\\",\\n \\\"address2\\\": \\\"Apartment 1\\\",\\n \\\"city\\\":\\\"Kansas City\\\",\\n \\\"province\\\":\\\"MO\\\",\\n \\\"postal_code\\\":\\\"64105\\\",\\n \\\"country\\\":\\\"US\\\",\\n \\\"dob\\\":\\\"04/23/1981\\\",\\n \\\"custom1\\\":\\\"Custom 1\\\",\\n \\\"custom2\\\":\\\"Custom 2\\\"\\n}\""

Response

200 - application/json

OK

The response is of type object.