Skip to Content
SaaSFlow
DevelopersAPIReferencenotifications

Create notification

Create a notification about a transaction and return the created row. SaaSFlow raises most notifications itself.

Authentication

Checking whether you're signed in…
POST
/companies/{companyId}/notifications

Authorization

headerAuthorization<token>

A SaaSFlow API key (format sf_…) or an OAuth bearer token. Paste only the key — the proxy adds the Bearer prefix. Create an API key in Settings → Company settings → API keys — see API keys.

Path Parameters

companyId*string
Formatuuid

Request Body

application/json
  1. body
type*string

The notification type. Only the collaboration types can be created here; SaaSFlow raises all others itself.

Value in"assignedUser""bulkAssignedUser""taggedInComment""newComment""likedComment"
recipientUserId*string
Length1 <= length
payload*

The fields of the chosen type and nothing else, for example transactionId, commentId, commentText and createdUserName for taggedInComment. Unknown fields or wrong types are refused with 400.

Response Body

Created notification

application/json
  1. response
id*string
Formatuuid
companyId*string
Formatuuid
type*string

The type of notification.

recipientUserId*string

The ID of the user who should receive this notification.

readTime*|

When the notification was read. Null if unread.

Formatdate-time
payload*|

Type-specific notification data.

createdTime*|
Formatdate-time
createdUserId*string|null
lastUpdatedTime*|
Formatdate-time
lastUpdatedUserId*string|null
Example Request
curl -X POST 'https://api.saasflow.com/companies/497f6eca-6276-4993-bfeb-53cbbbba6f08/notifications' \  -H 'Content-Type: application/json' \  -d '{  "type": "assignedUser",  "recipientUserId": "string",  "payload": {    "property1": null,    "property2": null  }}'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "companyId": "8bb73d03-06b4-47c7-80c7-59301f770eda",  "type": "string",  "recipientUserId": "string",  "readTime": "2019-08-24T14:15:22Z",  "payload": {    "property1": null,    "property2": null  },  "createdTime": "2019-08-24T14:15:22Z",  "createdUserId": "string",  "lastUpdatedTime": "2019-08-24T14:15:22Z",  "lastUpdatedUserId": "string"}