Recoup

Get started with Recoup.

API REFERENCE

Add task comment

On this page
POST/api/projects/{projectId}/tasks/{taskId}/comments

Post a comment on a task, attributed to the authenticated account. Comments are append-only plain text: there is no edit and no delete.

Authentication

x-api-key in header

bearerAuth bearer

Request

cURL
curl --request POST \
  --url 'https://api.recoupable.dev/api/projects/YOUR_PROJECT_ID/tasks/YOUR_TASK_ID/comments' \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "body": "Got it. Sending the login over this week."
}'

Replace the YOUR_ placeholders with your values. Required query parameters are included; optional parameters are listed below.

Try it

Fill in the fields, send the request from your browser, and read the live response. The curl below updates as you type.

Kept in this browser tab only and cleared when it closes.

cURL for this request
curl --request POST \
  --url 'https://api.recoupable.dev/api/projects/{projectId}/tasks/{taskId}/comments' \
  --header 'Content-Type: application/json' \
  --data '{
  "body": "Got it. Sending the login over this week."
}'

Parameters

Path parameters

projectIdstringrequired

The project's UUID.

taskIdstringrequired

The task's UUID.

Request body required

The comment to post.

application/json

bodystringrequired

Plain text. No markdown, no mentions, no attachments. Comments are append-only: there is no edit or delete.

minLength: 1 · maxLength: 4000

A client reply

comment
{
  "body": "Got it. Sending the login over this week."
}

Responses

201Comment posted.

application/json

statusstringrequired

Example: "success"

commentobjectrequired
Properties for comment
idstringrequired

format: uuid

task_idstringrequired

format: uuid

account_idstringrequired

format: uuid

author_namestringnullable

The author's accounts.name, resolved server-side. Frequently null; render a fallback.

bodystringrequired
created_atstringrequired

format: date-time

400Bad request — invalid path parameter or request body.

application/json

statusstring · enumrequired

Always error.

Values: "error"

errorstringrequired

Human-readable error message or documented error code.

Additional properties

any

401Unauthorized — missing or invalid credentials. Missing or conflicting authentication headers return status: "error" with error. Invalid API keys, malformed Bearer headers and token-verification failures return status: "error" with message. Read the field provided by the response.

application/json

anyOf · object 1
statusstring · enumrequired

Always error.

Values: "error"

errorstringrequired

Human-readable error message or documented error code.

Additional properties

any

anyOf · object 2
statusstring · enumrequired

Always error.

Values: "error"

messagestringrequired

Human-readable authentication error message.

Additional properties

any

404Not found — either no project or task with this id exists, or the authenticated account is not a collaborator on it. The two cases are deliberately indistinguishable so the response cannot be used to discover which project ids are real.

application/json

statusstring · enumrequired

Always error.

Values: "error"

errorstringrequired

Human-readable error message or documented error code.

Additional properties

any

500Internal server error.

application/json

statusstring · enumrequired

Always error.

Values: "error"

errorstringrequired

Human-readable error message or documented error code.

Additional properties

any

Full specification

Download the OpenAPI file for complete schemas, constraints, and examples.

Download projects.json
View operation source
json
{
  "operationId": "postProjectsByProjectIdTasksByTaskIdComments",
  "summary": "Add task comment",
  "description": "Post a comment on a task, attributed to the authenticated account. Comments are append-only plain text: there is no edit and no delete.",
  "security": [
    {
      "apiKeyAuth": []
    },
    {
      "bearerAuth": []
    }
  ],
  "parameters": [
    {
      "name": "projectId",
      "in": "path",
      "required": true,
      "description": "The project's UUID.",
      "schema": {
        "type": "string",
        "format": "uuid"
      }
    },
    {
      "name": "taskId",
      "in": "path",
      "required": true,
      "description": "The task's UUID.",
      "schema": {
        "type": "string",
        "format": "uuid"
      }
    }
  ],
  "requestBody": {
    "description": "The comment to post.",
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/CreateProjectCommentRequest"
        },
        "examples": {
          "comment": {
            "summary": "A client reply",
            "value": {
              "body": "Got it. Sending the login over this week."
            }
          }
        }
      }
    }
  },
  "responses": {
    "201": {
      "description": "Comment posted.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ProjectCommentResponse"
          }
        }
      }
    },
    "400": {
      "description": "Bad request — invalid path parameter or request body.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "401": {
      "description": "Unauthorized — missing or invalid credentials. Missing or conflicting authentication headers return `status: \"error\"` with `error`. Invalid API keys, malformed Bearer headers and token-verification failures return `status: \"error\"` with `message`. Read the field provided by the response.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/AuthenticationError"
          }
        }
      }
    },
    "404": {
      "description": "Not found — either no project or task with this id exists, or the authenticated account is not a collaborator on it. The two cases are deliberately indistinguishable so the response cannot be used to discover which project ids are real.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "500": {
      "description": "Internal server error.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    }
  }
}