HubstaffDeveloper Portal

Comments

Add comments and discussions to tasks

List task comments

GET/v1/tasks/{task_id}/comments

Returns a collection of comments for the given task.

Parameters

NameInTypeDescription
page_start_id
queryinteger (int32)
The page start ID.
page_limit
queryinteger (int32)
The default page size
task_idrequired
pathinteger (int32)
A task ID

Responses

200A list of comments
object
  • commentsarray
    array<object>
    items
    object

    comment model

    • idinteger
    • contentstring
    • user_idinteger
    • mentionsarray
      array<integer>
      items
      integer(int32)
    • task_idinteger
    • created_atstring
    • updated_atstring
Example response
json
{
  "comments": [
    {
      "id": 0,
      "content": "string",
      "user_id": 0,
      "mentions": [
        0
      ],
      "task_id": 0,
      "created_at": "2024-01-15T10:30:00Z",
      "updated_at": "2024-01-15T10:30:00Z"
    }
  ]
}
400Invalid parameters
object

HubstaffTasks_Public_V1_Entities_Error model

  • codestring

    Error code

  • errorstring

    Descriptive error message

Example response
json
{
  "code": "string",
  "error": "string"
}
401Unauthorized
object

HubstaffTasks_Public_V1_Entities_Error model

  • codestring

    Error code

  • errorstring

    Descriptive error message

Example response
json
{
  "code": "string",
  "error": "string"
}
403API access is only for organizations on an active plan
object

HubstaffTasks_Public_V1_Entities_Error model

  • codestring

    Error code

  • errorstring

    Descriptive error message

Example response
json
{
  "code": "string",
  "error": "string"
}
404Could not find record
object

HubstaffTasks_Public_V1_Entities_Error model

  • codestring

    Error code

  • errorstring

    Descriptive error message

Example response
json
{
  "code": "string",
  "error": "string"
}
429Rate limit exceeded
object

HubstaffTasks_Public_V1_Entities_Error model

  • codestring

    Error code

  • errorstring

    Descriptive error message

Example response
json
{
  "code": "string",
  "error": "string"
}

Create comment

POST/v1/tasks/{task_id}/comments

Creates a new comment for the given task.

Returns the created comment.

Parameters

NameInTypeDescription
task_idrequired
pathinteger (int32)
A task ID

Request body

object
  • comment[content]string required

    The contents of the comment

Responses

201A comment
object
  • commentobject
    object

    comment model

    • idinteger
    • contentstring
    • user_idinteger
    • mentionsarray
      array<integer>
      items
      integer(int32)
    • task_idinteger
    • created_atstring
    • updated_atstring
Example response
json
{
  "comment": {
    "id": 0,
    "content": "string",
    "user_id": 0,
    "mentions": [
      0
    ],
    "task_id": 0,
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z"
  }
}
400Invalid parameters
object

HubstaffTasks_Public_V1_Entities_Error model

  • codestring

    Error code

  • errorstring

    Descriptive error message

Example response
json
{
  "code": "string",
  "error": "string"
}
401Unauthorized
object

HubstaffTasks_Public_V1_Entities_Error model

  • codestring

    Error code

  • errorstring

    Descriptive error message

Example response
json
{
  "code": "string",
  "error": "string"
}
403API access is only for organizations on an active plan
object

HubstaffTasks_Public_V1_Entities_Error model

  • codestring

    Error code

  • errorstring

    Descriptive error message

Example response
json
{
  "code": "string",
  "error": "string"
}
404Could not find record
object

HubstaffTasks_Public_V1_Entities_Error model

  • codestring

    Error code

  • errorstring

    Descriptive error message

Example response
json
{
  "code": "string",
  "error": "string"
}
429Rate limit exceeded
object

HubstaffTasks_Public_V1_Entities_Error model

  • codestring

    Error code

  • errorstring

    Descriptive error message

Example response
json
{
  "code": "string",
  "error": "string"
}