Amazon Pinpoint
REST API Reference

Tags

A tag is a label that you optionally define and associate with projects (apps), campaigns, and segments in Amazon Pinpoint. Tags can help you categorize and manage these types of resources in different ways, such as by purpose, owner, environment, or other criteria. A project, campaign, or segment can have as many as 50 tags.

Each tag consists of a required tag key and an associated tag value, both of which you define. A tag key is a general label that acts as a category for more specific tag values. A tag value acts as a descriptor within a tag key. For example, if you have two versions of an Amazon Pinpoint project, one for internal testing and another for external use, you might assign a Stack tag key to both projects. The value of the Stack tag key might be Test for one project and Production for the other project.

For more information about tags, see Tagging Amazon Pinpoint Resources in the Amazon Pinpoint Developer Guide.

Use this resource to add, look up, or remove tags from a project, campaign, or segment.

URI

/v1/tags/resource-arn

HTTP Methods

POST

Adds one or more tags (keys and values) to a project, campaign, or segment.

Body

Name Required Type

tagsModel

true

tagsModel

Path

Name Required Type

resource-arn

true

string

Response

Status Code Schema

204

None. If the operation was successful, Amazon Pinpoint sends an HTTP 204 (No Content) response.

GET

Retrieves all the tags (keys and values) that are associated with a project, campaign, or segment.

Path

Name Required Type

resource-arn

true

string

Response

Status Code Schema

200

tagsModel

DELETE

Removes one or more tags (keys and values) from a project, campaign, or segment.

Path

Name Required Type

resource-arn

true

string

Query

Name Required Type

tagKeys

true

string

Response

Status Code Schema

204

None. If the operation was successful, Amazon Pinpoint sends an HTTP 204 (No Content) response.

Errors

Errors

Status Code Schema Error Type

400

MessageBody

BadRequestException

403

MessageBody

ForbiddenException

404

MessageBody

NotFoundException

405

MessageBody

MethodNotAllowedException

429

MessageBody

TooManyRequestsException

500

MessageBody

InternalServerErrorException

Schemas

Request Schemas

Example tagsModel

{ "tags": { "string": "string" } }

Response Schemas

Example tagsModel

{ "tags": { "string": "string" } }

Attributes

tagsModel

Attribute Type Description

tags

object

A string-to-string map of key-value pairs that defines the tags for a project (app), campaign, or segment. A project, campaign, or segment can have a maximum of 50 tags.

Each tag consists of a required tag key and an associated tag value. The maximum length of a tag key is 128 characters. The maximum length of a tag value is 256 characters. For information about additional tag restrictions, see Tagging Amazon Pinpoint Resources in the Amazon Pinpoint Developer Guide.

MessageBody

Attribute Type Description

Message

string

The error message that's returned from the API.

RequestID

string

The unique message body ID.