[POST] project statuses

POST /api/v1/projects/{project_id}/statuses

Creates or updates statuses for a specific project.

URL Parameter:

  • project_id (string): ID of the project in the system

Required Body Parameters:

  • statuses (array): each object contains:
    • status_index (string): unique ID from the external tool
    • status_name (string)
    • status_order (integer): logical position in the board
    • status_kind (integer): 0=backlog, 1=active, 2=paused, 3=done
    • inception (integer): 0 or 1 (start point indicator)
    • delivery (integer): 0 or 1 (end point indicator)

Example Request:

{
  "statuses": [
    {
      "status_index": "1abc",
      "status_name": "Backlog",
      "status_order": 1,
      "status_kind": 0,
      "inception": 0,
      "delivery": 0
    },
    {
      "status_index": "2abc",
      "status_name": "In Progress",
      "status_order": 2,
      "status_kind": 1,
      "inception": 1,
      "delivery": 0
    },
    {
      "status_index": "4abc",
      "status_name": "Done",
      "status_order": 4,
      "status_kind": 3,
      "inception": 0,
      "delivery": 1
    }
  ]
}

Example Response:

{
  "status": "success",
  "message": "Statuses processed successfully",
  "data": {
    "processed_statuses": [
      {
        "status_index": "1abc",
        "action": "created",
        "status_id": 789
      },
      {
        "status_index": "2abc",
        "action": "updated"
      }
    ]
  }
}

Validations:

  • ✅ Project must exist
  • ✅ Project must belong to an organization in the token scope
  • status_kind must be one of: 0, 1, 2, 3
  • inception and delivery must be 0 or 1
  • ✅ All required fields must be present

Error Codes:

  • 400: Invalid input
  • 401: Invalid or missing token
  • 403: Organization out of scope
  • 404: Project not found
  • 500: Internal server error