Topics

Update a topic

Update a topic name or data by its unique key identifier topicKey

patch/v2/topics/{topicKey}

Path parameters

topicKeystring required

The key identifier of the topic

Request body

namestring

The display name for the topic

dataobject nullable

Additional custom data associated with the topic. Flat key-value pairs of scalars (string, number, boolean, string[]). Maximum size: 64KB. Pass null to clear.

Example request

{
  "name": "Updated Topic Name",
  "data": {
    "category": "product",
    "priority": 1
  }
}

Response

OK

_idstring required

The identifier of the topic

keystring required

The unique key of the topic

namestring

The name of the topic

dataobject

Additional custom data associated with the topic

createdAtstring

The date the topic was created

updatedAtstring

The date the topic was last updated

Example response

{
  "_id": "64da692e9a94fb2e6449ad06",
  "key": "product-updates",
  "name": "Product Updates",
  "data": {
    "category": "product",
    "priority": 1
  },
  "createdAt": "2023-08-15T00:00:00.000Z",
  "updatedAt": "2023-08-15T00:00:00.000Z"
}

Changes

Changed in 1 of the 13 revisions of this API.13

  • 16de7466b1df13See the full diff
    • the request property's maxLength was set to 100

      request-property-max-length-set

    • added the new optional request property

      new-optional-request-property

    • the request property became optional

      request-property-became-optional

    • added the optional property to the response with the status

      response-optional-property-added