Menu
Create Comment
Create a Comment
POST
/commentsUse it in a workflow
- Add a step and choose the Directus connector.
- Pick the Create Comment action (under Comments).
- Fill in the fields below, then reference the result from later steps as
{{createComment.response.data}}.
Request
Query parameters
Request body
Enter the body as JSON in the step's Body field.
{
"collection": "projects",
"item": 1,
"comment": "A new comment"
}
Response
Returns 200 with an object. Read it in later steps with {{createComment.response.data.<field>}}.
{
"data": {
"id": 2,
"action": "update",
"user": "string",
"timestamp": "2019-12-05T22:52:09Z",
"ip": "127.0.0.1",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_1) AppleWebKit/537.36 (KHTML,like Gecko) Chrome/78.0.3904.108 Safari/537.36",
"collection": null,
"item": "328",
"comment": null,
"origin": "https://directus.io",
"revisions": [
null
]
}
}
Need more? See the Directus guide for connection setup and behaviour shared by every action.
Was this page helpful?