Add or remove a tag on one event.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Adds a tag to one event by appending it to the end of the event title as a hashtag, and tracks it in the event's tags field.
For example, tagging an event titled "Haircut" with qualified (or #qualified) changes the title to "Haircut #qualified".
- The
tagvalue may be sent with or without a leading#. The#is added automatically, soqualifiedand#qualifiedare 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.
The event title is only modified when the event is on a writable calendar and the account is configured to write Apptoto's changes back to the connected calendar. Otherwise the tag is still recorded in the tags field, but the event title is left unchanged.
Identify the event with either the Apptoto id or your own external_id.
Parameters
| Parameter | Required | Description |
|---|---|---|
id | Conditional | The Apptoto id for the event. Required if you do not specify external_id. |
external_id | Conditional | Your unique external id for the event. Required if you do not specify id. |
tag | Yes | The tag to add or remove. A leading # is optional and is added automatically (e.g. qualified and #qualified are equivalent). |
remove | No | Set to true to remove the tag instead of adding it. Defaults to adding the tag. |
Example Result:
{
id: 123,
calendar_id: 456,
start_time: "2016-04-15T12:00:00-07:00",
end_time: "2016-04-15T13:00:00-07:00",
title: "Haircut #qualified",
tags: "#qualified",
location: "",
content: "",
is_deleted: false,
participants: [ {
id: 789,
name: "Fred Smith",
phone: "650-555-1212",
normalized_phone: "+16505551212",
email: "[email protected]",
state: "initial",
}],
custom_data: {
field_1: "custom value"
}
}OAuth scope
Calls authenticated with an OAuth 2.0 bearer token must include the events:write scope. A token without it receives a 403 insufficient_scope response. HTTP Basic auth is not scope-gated.
