Nuvelics documentation
APIAPI reference

Notifications

Choose where Nuvelics sends your organization's notifications, turn them on or off, and send a test message.

GET
/api/tenant/v1/notifications

Authorization

headerx-api-key<token>

A service key (nvs_...) in the x-api-key header. A service key belongs to one organization: an X-Org-Id header is optional and, when sent, must name that organization. This header also accepts any credential the bearer scheme does, and when a request sends both headers, this one is used.

Response Body

The org switch and every destination, each with its credential health

application/json
  1. response
config*
routes*array<|>
Example Request
curl -X GET 'https://api.nuvelics.com/api/tenant/v1/notifications'
Example Response
{  "config": {    "enabled": true,    "updatedAt": "2019-08-24T14:15:22Z"  },  "routes": [    {      "channel": "slack",      "target": {},      "id": "string",      "orgId": "string",      "name": "string",      "credentialId": "string",      "health": {        "status": "healthy",        "lastError": "string",        "lastCheckedAt": "2019-08-24T14:15:22Z",        "updatedAt": "2019-08-24T14:15:22Z",        "fundingStatus": "ok"      },      "notifyNewPitch": true,      "notifyNewPitchScoreThreshold": 70,      "notifyStoryEnriched": true,      "notifyStoryPushedNrcs": true,      "newsdeskScope": "all",      "newsdeskIds": [        "string"      ],      "activeSince": "2019-08-24T14:15:22Z",      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z",      "version": 0    }  ]}
PUT
/api/tenant/v1/notifications/config

Authorization

headerx-api-key<token>

A service key (nvs_...) in the x-api-key header. A service key belongs to one organization: an X-Org-Id header is optional and, when sent, must name that organization. This header also accepts any credential the bearer scheme does, and when a request sends both headers, this one is used.

Request Body

application/json
  1. body
enabled*boolean

Response Body

The org switch was set

application/json
  1. response
enabled*boolean

Org-wide switch; off keeps the routes but delivers nothing

updatedAt*string

ISO 8601 last-modified timestamp; null before the switch was ever set

Formatdate-time
Example Request
curl -X PUT 'https://api.nuvelics.com/api/tenant/v1/notifications/config' \  -H 'Content-Type: application/json' \  -d '{  "enabled": true}'
Example Response
{  "enabled": true,  "updatedAt": "2019-08-24T14:15:22Z"}
POST
/api/tenant/v1/notifications/routes

Authorization

headerx-api-key<token>

A service key (nvs_...) in the x-api-key header. A service key belongs to one organization: an X-Org-Id header is optional and, when sent, must name that organization. This header also accepts any credential the bearer scheme does, and when a request sends both headers, this one is used.

Request Body

application/json
  1. body
channel*"slack"
Value in"slack"
name*string

The operator's label for the destination, e.g. #sports-desk

Length1 <= length <= 80
notifyNewPitch*boolean

Deliver an event when a pitch is created

notifyNewPitchScoreThreshold?integer

Minimum pitch score (40-100) a new pitch needs to be delivered; defaults to 70

Range40 <= value <= 100
Default70
notifyStoryEnriched*boolean

Deliver an event when a story enrichment run completes

notifyStoryPushedNrcs*boolean

Deliver an event when a story is pushed to an NRCS connection

newsdeskScope*string

'all' matches every newsdesk, including ones created later; 'selected' matches only the route's listed newsdesks

Value in"all""selected"
newsdeskIds*array<>

Newsdesks a 'selected' scope matches; ignored for 'all'

Itemsitems <= 500
webhookUrl*string

Slack Incoming Webhook URL (https, hooks.slack.com). Write-only: never returned by any read.

Formaturi
Lengthlength <= 2048

Response Body

Destination created

application/json
  1. response
channel*"slack"
Value in"slack"
target*
id*string

Notification route identifier

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
orgId*string

Owning organization identifier

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
name*string

The operator's label for the destination, e.g. #sports-desk

Length1 <= length <= 80
credentialId*string

Credential identifier

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
health?

Health of the route's credential; null or absent when never observed

notifyNewPitch*boolean

Deliver an event when a pitch is created

notifyNewPitchScoreThreshold?integer

Minimum pitch score (40-100) a new pitch needs to be delivered; defaults to 70

Range40 <= value <= 100
Default70
notifyStoryEnriched*boolean

Deliver an event when a story enrichment run completes

notifyStoryPushedNrcs*boolean

Deliver an event when a story is pushed to an NRCS connection

newsdeskScope*string

'all' matches every newsdesk, including ones created later; 'selected' matches only the route's listed newsdesks

Value in"all""selected"
newsdeskIds*array<>

Newsdesks a 'selected' scope matches; ignored for 'all'

Itemsitems <= 500
activeSince*string

Watermark: the route only delivers events created at or after this moment; re-stamped when its filters change or the org switch turns on

Formatdate-time
createdAt*string

ISO 8601 creation timestamp

Formatdate-time
updatedAt*string

ISO 8601 last-modified timestamp

Formatdate-time
version*integer

Monotonic row version; used as concurrency token

Example Request
curl -X POST 'https://api.nuvelics.com/api/tenant/v1/notifications/routes' \  -H 'Content-Type: application/json' \  -d '{  "channel": "slack",  "name": "string",  "notifyNewPitch": true,  "notifyStoryEnriched": true,  "notifyStoryPushedNrcs": true,  "newsdeskScope": "all",  "newsdeskIds": [    "string"  ],  "webhookUrl": "http://example.com"}'
Example Response
{  "channel": "slack",  "target": {},  "id": "string",  "orgId": "string",  "name": "string",  "credentialId": "string",  "health": {    "status": "healthy",    "lastError": "string",    "lastCheckedAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z",    "fundingStatus": "ok"  },  "notifyNewPitch": true,  "notifyNewPitchScoreThreshold": 70,  "notifyStoryEnriched": true,  "notifyStoryPushedNrcs": true,  "newsdeskScope": "all",  "newsdeskIds": [    "string"  ],  "activeSince": "2019-08-24T14:15:22Z",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "version": 0}
DELETE
/api/tenant/v1/notifications/routes/{id}

Authorization

headerx-api-key<token>

A service key (nvs_...) in the x-api-key header. A service key belongs to one organization: an X-Org-Id header is optional and, when sent, must name that organization. This header also accepts any credential the bearer scheme does, and when a request sends both headers, this one is used.

Path Parameters

id*string

Notification route identifier

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$

Response Body

Destination and its webhook credential deleted

Example Request
curl -X DELETE 'https://api.nuvelics.com/api/tenant/v1/notifications/routes/string'
Example Response
Empty
PUT
/api/tenant/v1/notifications/routes/{id}

Authorization

headerx-api-key<token>

A service key (nvs_...) in the x-api-key header. A service key belongs to one organization: an X-Org-Id header is optional and, when sent, must name that organization. This header also accepts any credential the bearer scheme does, and when a request sends both headers, this one is used.

Path Parameters

id*string

Notification route identifier

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$

Request Body

application/json
  1. body
channel*"slack"
Value in"slack"
name*string

The operator's label for the destination, e.g. #sports-desk

Length1 <= length <= 80
notifyNewPitch*boolean

Deliver an event when a pitch is created

notifyNewPitchScoreThreshold?integer

Minimum pitch score (40-100) a new pitch needs to be delivered; defaults to 70

Range40 <= value <= 100
Default70
notifyStoryEnriched*boolean

Deliver an event when a story enrichment run completes

notifyStoryPushedNrcs*boolean

Deliver an event when a story is pushed to an NRCS connection

newsdeskScope*string

'all' matches every newsdesk, including ones created later; 'selected' matches only the route's listed newsdesks

Value in"all""selected"
newsdeskIds*array<>

Newsdesks a 'selected' scope matches; ignored for 'all'

Itemsitems <= 500
webhookUrl?|

Blank or absent keeps the saved webhook; a Slack URL replaces it. Write-only: never returned by any read.

Response Body

Destination replaced. A blank or absent webhookUrl keeps the saved webhook; a new URL rotates it.

application/json
  1. response
channel*"slack"
Value in"slack"
target*
id*string

Notification route identifier

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
orgId*string

Owning organization identifier

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
name*string

The operator's label for the destination, e.g. #sports-desk

Length1 <= length <= 80
credentialId*string

Credential identifier

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
health?

Health of the route's credential; null or absent when never observed

notifyNewPitch*boolean

Deliver an event when a pitch is created

notifyNewPitchScoreThreshold?integer

Minimum pitch score (40-100) a new pitch needs to be delivered; defaults to 70

Range40 <= value <= 100
Default70
notifyStoryEnriched*boolean

Deliver an event when a story enrichment run completes

notifyStoryPushedNrcs*boolean

Deliver an event when a story is pushed to an NRCS connection

newsdeskScope*string

'all' matches every newsdesk, including ones created later; 'selected' matches only the route's listed newsdesks

Value in"all""selected"
newsdeskIds*array<>

Newsdesks a 'selected' scope matches; ignored for 'all'

Itemsitems <= 500
activeSince*string

Watermark: the route only delivers events created at or after this moment; re-stamped when its filters change or the org switch turns on

Formatdate-time
createdAt*string

ISO 8601 creation timestamp

Formatdate-time
updatedAt*string

ISO 8601 last-modified timestamp

Formatdate-time
version*integer

Monotonic row version; used as concurrency token

Example Request
curl -X PUT 'https://api.nuvelics.com/api/tenant/v1/notifications/routes/string' \  -H 'Content-Type: application/json' \  -d '{  "channel": "slack",  "name": "string",  "notifyNewPitch": true,  "notifyStoryEnriched": true,  "notifyStoryPushedNrcs": true,  "newsdeskScope": "all",  "newsdeskIds": [    "string"  ]}'
Example Response
{  "channel": "slack",  "target": {},  "id": "string",  "orgId": "string",  "name": "string",  "credentialId": "string",  "health": {    "status": "healthy",    "lastError": "string",    "lastCheckedAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z",    "fundingStatus": "ok"  },  "notifyNewPitch": true,  "notifyNewPitchScoreThreshold": 70,  "notifyStoryEnriched": true,  "notifyStoryPushedNrcs": true,  "newsdeskScope": "all",  "newsdeskIds": [    "string"  ],  "activeSince": "2019-08-24T14:15:22Z",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "version": 0}
POST
/api/tenant/v1/notifications/test

Authorization

headerx-api-key<token>

A service key (nvs_...) in the x-api-key header. A service key belongs to one organization: an X-Org-Id header is optional and, when sent, must name that organization. This header also accepts any credential the bearer scheme does, and when a request sends both headers, this one is used.

Request Body

application/json
  1. body
channel*"slack"
Value in"slack"
webhookUrl*string
Formaturi
Lengthlength <= 2048

Response Body

The test message's outcome, success or failure

application/json
  1. response
ok*boolean
error*string

Status and provider error code when the test failed; never contains the URL

Example Request
curl -X POST 'https://api.nuvelics.com/api/tenant/v1/notifications/test' \  -H 'Content-Type: application/json' \  -d '{  "channel": "slack",  "webhookUrl": "http://example.com"}'
Example Response
{  "ok": true,  "error": "string"}

Report a problem with this page

On this page