Set a contact's topic choiceMenu

Set a contact's topic choice

PUT/v1/contacts/{id}/topics/{topicId}

Requires an API key with the contacts:write scope. About keys and scopes

Works with integration and partner keys, not agent keys.

Safe to retry: a repeat sets the same values again. About idempotency

Joins a contact to a topic or removes them from it, in the shape identify's topics takes: subscribed: true or false holds for every channel and clears channel choices; { "email": true, "push": false } sets each channel named and leaves the others (keep Product updates by email, not by push). Never an agent key, as for consent. Each change is recorded in consent changes with the member or key as actor. Joining on any channel needs statement, how the contact agreed, recorded as the proof; without it the request is refused with 400 VALIDATION_ERROR at statement. Leaving needs none.

Path parameters

idstringrequired

Kirora's id for the contact, your own with idType=externalId, or its email address with idType=email, URL-encoded (@ as %40).

1–255 characters

topicIdstringrequired

The topic's id.

uuid

Query parameters

idTypestringoptional

What {id} is: Kirora's id for the contact (id, the default), your own (externalId, as set with identify) or its email address (email, matched trimmed and without case).

one of id, externalId, email · default "id"

Header parameters

Kirora-Workspacestringoptional

Partner 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}$

Request body

subscribedbooleanoptional

Join (true) or leave (false) the topic on every channel; it clears each channel's own choice.

channelsmap<string, boolean>optional

One channel's choice each, applied after subscribed; a channel left out keeps its choice.

keys: one of email, push

statementConsentStatementInputoptional

How the contact agreed; required to join on any channel.

4 child attributes
basisstringrequired

The legal basis the contacts agreed under.

one of opted_in, existing_customer

evidencestringrequired

Where and how they agreed, e.g. "Checkout opt-in on shop.example.com".

1–500 characters

consentedAtstringoptional

When they agreed, if before now: a signup imported or synced later. Omitted, it is when Kirora records the grant.

date-time

wordingstringoptional

The words they agreed to, e.g. the checkbox label they ticked.

1–1,000 characters

Returns

Returns 200 OK with a ContactTopic 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.

  • 200 OKThe topic, with the contact's choice applied.
  • 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).
idstringrequired

uuid

namestringrequired
descriptionstring | nullrequired
modestringrequired

opt_out reaches everyone who has not left; opt_in only those who joined.

one of opt_out, opt_in

createdAtstringrequired

date-time

updatedAtstringrequired

date-time

subscribedbooleanrequired

Whether campaigns and journey steps on this topic reach the contact.

channelsobjectrequired

The same per channel: a channel's own choice wins over subscribed there.

2 child attributes
emailbooleanrequired
pushbooleanrequired