/v1/workspaces/{workspace_id}/notification-types/{type_id}AuthUpdate a notification type
Changes the fields you send; `routing` is replaced whole. The key cannot change. Changing `critical` is audited with the old and new value.
Path parameters
workspace_id*string · uuidId of the workspace.
type_id*string · uuidId of the type.
Request body
namestringDisplay name.
Example: "Invoice paid"
descriptionstringWhat the notification is for.
category_keystringKey of the category the type belongs to (preferences are per category).
Example: "billing"
routingobjectWhich channels are tried, and in what order.
criticalbooleanCritical types (security notices) ignore opt-outs and quiet hours and use their own rate budget. They never bypass hard bounces, spam complaints or Mail suppression.
ttl_secondsintegerDeliveries not sent within this many seconds expire.
default_localestringLocale used when the recipient locale has no template (BCP 47).
Example: "en"
email_quiet_hoursbooleanHold email during the recipient quiet hours too (push is always held, the inbox never).
throttleobjectPer-recipient cap for this type; null removes it.
batchobjectBatch notifications of this type per recipient (a window, or a daily/weekly digest): email and push send one message per batch, rendered with `batch.count`, `batch.items` and `batch.actors`; the inbox collapses. Not for critical types, and only with `always` routing (no fallback steps). Null removes it; open batches still close as configured when they were opened.
approvalobjectMakes this an approval request type: notifications of it carry a yes/no question from an agent or your backend, sent only with `POST /approvals`. Inbox items get Approve and Reject buttons; email and push templates get `approval.url`, `approval.approve_url` and `approval.reject_url` (a hosted page, signed per approver). Not with `batch`. Null removes it.
Response · 200 Updated.
id*string · uuidType id.
key*stringKey used when sending.
Example: "invoice.paid"
name*stringDisplay name.
description*stringDescription.
category_id*string · uuidCategory id.
category_key*stringCategory key.
routing*objectRouting.
critical*booleanWhether the type is critical.
ttl_seconds*integerTime to live of a delivery, in seconds.
default_locale*stringFallback locale.
email_quiet_hours*booleanWhether email is held during quiet hours.
throttle*objectPer-recipient cap.
batch*objectBatching or digest config; null sends each notification on its own.
approval*objectApproval request config; null for ordinary types.
archived_at*string · date-timeWhen archived; archived types cannot be sent.
version*integerIncreases on every change of the type.
templates*arrayThe templates (bodies under `…/templates/{channel}/{locale}`).
created_at*string · date-timeCreated.
updated_at*string · date-timeLast change.
Example
Request
PATCH https://api.notify.productcraft.co/v1/workspaces/{workspace_id}/notification-types/{type_id}
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json
{
"name": "Invoice paid",
"description": "string",
"category_key": "billing",
"routing": {},
"critical": false,
"ttl_seconds": 0,
"default_locale": "en",
"email_quiet_hours": false,
"throttle": {},
"batch": {},
"approval": {}
}import { Notify } from "@productcraft/notify";
// Reads PRODUCTCRAFT_API_KEY and PRODUCTCRAFT_WORKSPACE_ID from the environment;
// client routes take a recipient token: notify.client({ token })
const notify = new Notify();
const notificationType = await notify.notificationTypes.update("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f", { category_key: "billing" });notify.notificationTypes.update(typeId, params?, options?): Notify.NotificationType
Response
{
"id": "00000000-0000-0000-0000-000000000000",
"key": "invoice.paid",
"name": "string",
"description": "string",
"category_id": "00000000-0000-0000-0000-000000000000",
"category_key": "string",
"routing": {},
"critical": false,
"ttl_seconds": 0,
"default_locale": "string",
"email_quiet_hours": false,
"throttle": {},
"batch": {},
"approval": {},
"archived_at": "2026-01-01T00:00:00.000Z",
"version": 0,
"templates": [
{
"channel": {},
"locale": "pt-PT",
"version": 0,
"updated_at": "2026-01-01T00:00:00.000Z"
}
],
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}