POST /actions/tasks/{task_id}/comment

Create a new comment for a specific task. It requires a text, a task_status and a person as arguments. This way, comments keep history of status changes. When the comment is created, it updates the task status with the given task status.

Path parameters

  • task_id Required

    Unique identifier of the task

application/json

Body Required

  • task_status_id string(uuid) Required

    Task status identifier

  • comment string

    Comment text content

  • person_id string(uuid)

    Person identifier (optional, defaults to current user)

  • created_at string(date-time)

    Creation timestamp (optional, defaults to current time)

  • checklist object

    Checklist items for the comment

  • links array[string]

    List of related links

Responses

  • 201 application/json

    Comment successfully created

    Hide response attributes Show response attributes object
    • id string(uuid)

      Comment unique identifier

    • task_id string(uuid)

      Task identifier

    • person_id string(uuid)

      Person identifier

    • comment string

      Comment text content

    • task_status_id string(uuid)

      Task status identifier

    • created_at string(date-time)

      Creation timestamp

POST /actions/tasks/{task_id}/comment
curl -X POST "http://api.example.com/actions/tasks/a24a6ea4-ce75-4665-a070-57453082c25/comment" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
  "task_status_id": "c46c8gc6-eg97-6887-c292-79675204e47",
  "comment": "This looks great! Ready for review.",
  "person_id": "d57d9hd7-fh08-7998-d403-80786315f58",
  "created_at": "2023-01-01T12:00:00Z",
  "checklist": {
    "item1": "Check lighting",
    "item2": "Verify textures"
  },
  "links": [
    "https://example.com/reference1",
    "https://example.com/reference2"
  ]
}'
import requests

url = "http://api.example.com/actions/tasks/a24a6ea4-ce75-4665-a070-57453082c25/comment"
headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json"
}
params = {}
payload = {
    "task_status_id": "c46c8gc6-eg97-6887-c292-79675204e47",
    "comment": "This looks great! Ready for review.",
    "person_id": "d57d9hd7-fh08-7998-d403-80786315f58",
    "created_at": "2023-01-01T12:00:00Z",
    "checklist": {
        "item1": "Check lighting",
        "item2": "Verify textures"
    },
    "links": [
        "https://example.com/reference1",
        "https://example.com/reference2"
    ]
}

response = requests.post(
    url,
    headers=headers,
    params=params,
    json=payload
)

response.raise_for_status()

if response.content:
    print(response.json())
curl \
 --request POST 'http://api.example.com/actions/tasks/a24a6ea4-ce75-4665-a070-57453082c25/comment' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"task_status_id":"c46c8gc6-eg97-6887-c292-79675204e47","comment":"This looks great! Ready for review.","person_id":"d57d9hd7-fh08-7998-d403-80786315f58","created_at":"2023-01-01T12:00:00Z","checklist":{"item1":"Check lighting","item2":"Verify textures"},"links":["https://example.com/reference1","https://example.com/reference2"]}'
Request examples
{
  "task_status_id": "c46c8gc6-eg97-6887-c292-79675204e47",
  "comment": "This looks great! Ready for review.",
  "person_id": "d57d9hd7-fh08-7998-d403-80786315f58",
  "created_at": "2023-01-01T12:00:00Z",
  "checklist": {
    "item1": "Check lighting",
    "item2": "Verify textures"
  },
  "links": [
    "https://example.com/reference1",
    "https://example.com/reference2"
  ]
}
Response examples (201)
{
  "id": "b35b7fb5-df86-5776-b181-68564193d36",
  "task_id": "a24a6ea4-ce75-4665-a070-57453082c25",
  "person_id": "d57d9hd7-fh08-7998-d403-80786315f58",
  "comment": "This looks great! Ready for review.",
  "task_status_id": "c46c8gc6-eg97-6887-c292-79675204e47",
  "created_at": "2023-01-01T12:00:00Z"
}