post
https://api.apptoto.com/v1/contacts/tag
Add or remove a tag on one contact.
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
Adds or removes a tag on one contact. The tag is tracked in the contact's tags field, which is searchable.
- The
tagvalue may be sent with or without a leading#. The#is added automatically, soprospectand#prospectare equivalent. - Adding a tag that is already present is a no-op. Removing a tag that is not present is a no-op.
- Set
remove=trueto remove the tag instead of adding it.
Identify the contact with either the Apptoto id or your own external_id. One of the two must be specified. Optionally pass address_book_id to restrict the lookup to a single address book.
Parameters
| Parameter | Required | Description |
|---|---|---|
id | Conditional | The Apptoto id for the contact. Required if you do not specify external_id. |
external_id | Conditional | Your unique external id for the contact. Required if you do not specify id. |
address_book_id | No | Restrict the lookup to a single address book. |
tag | Yes | The tag to add or remove. A leading # is optional and is added automatically (e.g. prospect and #prospect are equivalent). |
remove | No | Set to true to remove the tag instead of adding it. Defaults to adding the tag. |
Example Result:
{
id: 1,
external_id: "yourid",
name: "Fred Smith",
first_name: "Fred",
last_name: "Smith",
zip: "97701",
address_book_id: 123,
address_book_name: "Apptoto Address Book",
writable: true,
notes: "Long string of notes",
tags: "#prospect",
deleted: false,
phone_numbers: [
{
id: 3,
number: "650-555-1212",
normalized: "+16505551212",
type: "mobile",
is_primary: true
}
],
email_addresses: [
{
id: 4,
address: "[email protected]",
type: "work"
}
],
custom_data: {
field_1: "vip"
}
}OAuth scope
Calls authenticated with an OAuth 2.0 bearer token must include the contacts:write scope. A token without it receives a 403 insufficient_scope response. HTTP Basic auth is not scope-gated.
