younifyd
Menu

Create Notification

Create a Notification

POST/notifications‎

Use it in a workflow

  1. Add a step and choose the Directus connector.
  2. Pick the Create Notification action (under Notifications).
  3. Fill in the fields below, then reference the result from later steps as {{createNotification.response.data}}.

Request

Query parameters

fieldsarray<string>

Control what fields are being returned in the object.

metastring

What metadata to return in the response.

Response

Returns 200 with an object. Read it in later steps with {{createNotification.response.data.<field>}}.

dataobject
idinteger

Primary key of the revision.

timestampstring (date-time)

Timestamp in ISO8601 when the notification was created.

statusstring

Current status of the notification. One of "inbox", "archived"

recipientoneOf

User that received the notification.

senderoneOf

User that sent the notification, if any.

subjectstring

Subject line of the message.

messagestring

Subject line of the message.

collectionstring

Collection this notification references.

itemstring

Primary key of the item this notification references.

json
{
  "data": {
    "id": 2,
    "timestamp": "2021-11-24T13:57:35Z",
    "status": "inbox",
    "recipient": "3EE34828-B43C-4FB2-A721-5151579B08EA",
    "sender": "497a495e-5529-4e46-8feb-2f35e9b85601",
    "subject": "inbox",
    "message": "\\nHello admin@example.com,\\n\\rijk@directus.io has mentioned you in a comment:\\n\\n> Hello <em>admin@example.com</em>!\\n\\n<a href=\\\"http://localhost:8080/admin/content/articles/1\\\">Click here to view.</a>\\n",
    "collection": "articles",
    "item": "1"
  }
}

Need more? See the Directus guide for connection setup and behaviour shared by every action.

Create Notification — Directus — Documentation