Contexts

Create a context

Changed on

Create a new context with the specified type, id, and data. Returns 409 if context already exists. type and id are required fields, data is optional, if the context already exists, it returns the 409 response

post/v2/contexts

Request

  • Base URL
    https://api.novu.co
  • Auth
    API key in header Authorization

Headers

idempotency-keystring

A header for idempotency purposes

Request body

typestring required

Context type (e.g., tenant, app, workspace). Must be lowercase alphanumeric with optional separators.

idstring required

Unique identifier for this context. Must be lowercase alphanumeric with optional separators.

dataobject

Optional custom data to associate with this context.

bridgeUrlstring uri

Optional bridge URL override for agent connect. When an inbound agent turn resolves this context, its bridge call is routed here instead of the agent default bridge URL. Must be a publicly reachable URL.

Example request

{
  "type": "tenant",
  "id": "org-acme",
  "data": {
    "tenantName": "Acme Corp",
    "region": "us-east-1",
    "settings": {
      "theme": "dark"
    }
  },
  "bridgeUrl": "https://tenant-acme.example.com/api/novu"
}

Response

Created

typestring required

Context type (e.g., tenant, app, workspace)

idstring required

Unique identifier for this context

dataobject required

Custom data associated with this context

bridgeUrlstring

Bridge URL override for agent connect, if configured on this context

createdAtstring required

Creation timestamp

updatedAtstring required

Last update timestamp

Changes

    • breaking

      the request property format changed from no format to uri

    • info

      added the new optional request property

    • info

      added the optional property to the response with the status