Skip to main content
POST
/
v1
/
notifications
Create notification
curl --request POST \
  --url https://staging.api.us.aptlydone.com/notification/v1/notifications \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "templateKey": "DELEGATION_ISSUED",
  "userId": "550e8400-e29b-41d4-a716-446655440000",
  "tenantId": "550e8400-e29b-41d4-a716-446655440000",
  "entityType": "delegation",
  "entityId": "1387b022-c897-4008-90d9-4e49d78249f8",
  "actionUrl": "https://example.com/delegations/123456",
  "payload": {
    "delegationName": "Q3 Budget Review",
    "priority": "high"
  },
  "placeholders": {
    "delegation_id": "ABC123",
    "user_email": "[email protected]"
  }
}'
{
  "statusCode": 200,
  "timestamp": "2025-06-24T08:51:23.434Z",
  "message": "Success",
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440002",
    "tenantId": "123e4567-e89b-12d3-a456-426614174000",
    "templateKey": "DELEGATION_ISSUED",
    "category": "Delegations",
    "title": "Delegation Issued",
    "message": "Delegation ABC123 was issued to you. Click to review.",
    "isActionable": true,
    "status": "UNREAD",
    "createdAt": "2023-01-01T12:00:00Z",
    "readAt": "2023-01-02T14:30:00Z",
    "userId": "550e8400-e29b-41d4-a716-446655440000",
    "entityType": "delegation",
    "entityId": "123456",
    "actionUrl": "https://example.com/delegations/123456",
    "payload": {
      "assignedBy": "John Doe",
      "priority": "high"
    },
    "relativeTime": "2 hours ago"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
templateKey
string
required

The template key for the notification

Example:

"DELEGATION_ISSUED"

userId
string<uuid>
required

The user ID who should receive this notification

Example:

"550e8400-e29b-41d4-a716-446655440000"

tenantId
string<uuid>
required

The tenant ID of the user who should receive this notification

Example:

"550e8400-e29b-41d4-a716-446655440000"

entityType
string
required

The type of entity this notification relates to

Example:

"delegation"

entityId
string
required

The ID of the entity this notification relates to

Example:

"1387b022-c897-4008-90d9-4e49d78249f8"

placeholders
object
required

Template placeholders to populate in the message

Example:
{
"delegation_id": "ABC123",
"user_email": "[email protected]"
}
actionUrl
string

Optional URL for action button on the notification

Example:

"https://example.com/delegations/123456"

payload
object

Optional payload with additional data for the notification

Example:
{
"delegationName": "Q3 Budget Review",
"priority": "high"
}

Response

201 - application/json

The notification has been successfully created

statusCode
number
required

HTTP Status code

Example:

200

timestamp
string
required

Timestamp of the response

Example:

"2025-06-24T08:51:23.434Z"

message
string
required

Response message

Example:

"Success"

data
object
required

Response data