Create a tag
POST/v1/tags
Requires an API key with the tags:write scope. About keys and scopes
Works with integration, agent and partner keys.
A repeat after success is refused with 409 ALREADY_EXISTS: read the one the first created. About idempotency
Creates a tag ahead of use. Naming a tag in tags on a campaign, journey, segment or template also creates it, so this is only needed to prepare a set of tags. Names are unique within the workspace ignoring case: "black friday" is taken by "Black Friday" (409 ALREADY_EXISTS). Agent keys may manage tags: a label sends nothing.
Header parameters
Kirora-WorkspacestringoptionalPartner keys only: the child workspace to act in, by the external id the partner gave it. Without it, a partner key acts in its own workspace. Any other key that sends it is refused with 403, and an unknown workspace is 404.
pattern
^[A-Za-z0-9._:-]{1,128}$Idempotency-KeystringoptionalMakes a retry safe: a repeat with the same key and body within 24 hours gets the first response again, with
Idempotency-Replay: true. The same key with another request is 409IDEMPOTENCY_KEY_REUSED; while the first is still running, 409IDEMPOTENCY_KEY_IN_USE; after anunsafefirst request failed or never returned, 409IDEMPOTENCY_KEY_OUTCOME_UNKNOWN. Use a new key, such as a UUID, for each new request.8–255 characters
Request body
namestringrequiredUnique within the workspace, ignoring case.
1–64 characters
Returns
Returns 201 Created with a Tag in data. It can also return 409 Conflict, 413 Payload Too Large or 415 Unsupported Media Type; see the statuses below. Otherwise returns an error; Errors lists every code and which to retry.
201 CreatedThe new tag.409 ConflictThe request conflicts with current state — a duplicate unique value, or a resource whose status does not allow this operation.413 Payload Too LargeThe body is larger than this operation accepts (PAYLOAD_TOO_LARGE).415 Unsupported Media TypeThe body is not JSON, or not the upload the operation takes (UNSUPPORTED_MEDIA_TYPE).
idstringrequireduuid
namestringrequiredusageobjectrequiredHow many items of each kind carry the tag.
4 child attributes
campaignsintegerrequiredmin 0
journeysintegerrequiredmin 0
segmentsintegerrequiredmin 0
templatesintegerrequiredmin 0
createdAtstringrequireddate-time
updatedAtstringrequireddate-time
Headers on 201 Created
Idempotency-Replaystringoptionaltruewhen this is the stored response to an earlier request with the same key.one of
true