Topics

Create a topic

Creates a new topic if it does not exist, or updates an existing topic if it already exists. Use ?failIfExists=true to prevent updates.

post/v2/topics

Request

  • Base URL: https://api.notifly.io
  • URL: https://api.notifly.io/v2/topics
  • Auth: API key in header Authorization

Query parameters

failIfExistsboolean

If true, the request will fail if a topic with the same key already exists

Request body

keystring required

The unique key identifier for the topic. The key must contain only alphanumeric characters (a-z, A-Z, 0-9), hyphens (-), underscores (_), colons (:), or be a valid email address.

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.

Example request

{
  "key": "task:12345",
  "name": "Task Title",
  "data": {
    "category": "product",
    "priority": 1
  }
}

Response

OK

Example response

{
  "data": {
    "_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

No recorded changes to this operation across all 1 revision of this API.