Retrieve a context

Retrieve a specific context by its type and id. type and id are required fields, if the context does not exist, it returns the 404 response

GET
/v2/contexts/{type}/{id}

Authorization

Authorization<token>

API key authentication. Allowed headers-- "Authorization: ApiKey <novu_secret_key>".

In: header

Path Parameters

idRequiredstring

Context ID

typeRequiredstring

Context type

Header Parameters

idempotency-keystring

A header for idempotency purposes

Response Body

OK

typeRequiredstring

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

idRequiredstring

Unique identifier for this context

dataRequiredobject

Custom data associated with this context

createdAtRequiredstring

Creation timestamp

updatedAtRequiredstring

Last update timestamp

export interface Response {
  /**
   * Context type (e.g., tenant, app, workspace)
   */
  type: string;
  /**
   * Unique identifier for this context
   */
  id: string;
  /**
   * Custom data associated with this context
   */
  data: {
    [k: string]: unknown;
  };
  /**
   * Creation timestamp
   */
  createdAt: string;
  /**
   * Last update timestamp
   */
  updatedAt: string;
}
 
curl -X GET "https://api.novu.co/v2/contexts/string/string" \
  -H "idempotency-key: string" \
  -H "Authorization: <token>"
{
  "type": "string",
  "id": "string",
  "data": {},
  "createdAt": "string",
  "updatedAt": "string"
}

On this page

No Headings
Edit this page on GitHub