Update a topicMenu

Update a topic

PATCH/v1/topics/{id}

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

Works with integration, agent and partner keys.

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

Renames or re-describes a topic. mode is fixed once created: sending the other mode is refused with 409 CONFLICT (details.field: "mode"); create a new topic instead.

Path parameters

idstringrequired

The topic's id.

uuid

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

namestringoptional

Unique within the workspace.

1–100 characters

descriptionstring | nulloptional

up to 500 characters

modestringoptional

Who the topic reaches: everyone who has not left, or only who joined.

one of opt_out, opt_in · default "opt_out"

Returns

Returns 200 OK with a Topic 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 updated topic.
  • 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

countsobjectrequired

Counted now, as the topic rule without channel reads it; a contact's channel choice can still differ on that channel.

2 child attributes
inintegerrequired

Contacts the topic reaches topic-wide: for opt_out everyone who has not left, for opt_in those who joined.

min 0

leftintegerrequired

Contacts who left the topic.

min 0