Tasks API

Create, update, and manage tasks across your products with the Tasks API.

Archiving Tasks

Archiving and restoring tasks must be done through the dashboard. The API supports creating, reading, updating, and deleting tasks.

Endpoints

Task Object

The task object represents a single task in MyOpcs.

AttributeTypeDescription
idstringUnique identifier for the task (e.g., task_abc123)
displayIdnumberDisplay sequence number for the task
titlestringThe task title (1-200 characters)
descriptionstring | nullDetailed task description (max 2000 characters)
prioritystringOne of: high, medium, low
statusstringOne of: todo, in_progress, done
dueDatestring | nullDue date in YYYY-MM-DD format
productIdstring | nullID of the associated product
productNamestring | nullName of the associated product
versionIdstring | nullID of the associated version
versionNamestring | nullName of the associated version (e.g., v1.0.0)
isArchivedbooleanWhether the task is archived
createdAtstringISO 8601 timestamp of creation
completedAtstring | nullISO 8601 timestamp when marked as done
GET

List Tasks

Returns a list of tasks for the authenticated user. Results are ordered by creation date (newest first).

Request

Bash
curl https://api.myopcs.com/api/v1/tasks \
  -H "Authorization: Bearer YOUR_API_KEY"

Query Parameters

ParameterTypeRequiredDescription
statusstringNoFilter by status: todo, in_progress, done
productIdstringNoFilter by product ID
isArchivedbooleanNoFilter by archived status (default: false)

Response

{}JSON
{
  "data": [
    {
      "id": "task_abc123",
      "displayId": 42,
      "title": "Implement user authentication",
      "description": "Add OAuth2 login flow with Google and GitHub",
      "priority": "high",
      "status": "in_progress",
      "dueDate": "2024-02-15",
      "productId": "prod_xyz789",
      "productName": "My SaaS App",
      "versionId": "ver_def456",
      "versionName": "v1.2.0",
      "isArchived": false,
      "createdAt": "2024-01-15T10:30:00Z",
      "completedAt": null
    }
  ]
}
POST

Create Task

Creates a new task. The task will be associated with the authenticated user.

Request

Bash
curl -X POST https://api.myopcs.com/api/v1/tasks \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Fix login bug",
    "description": "Users report intermittent login failures on mobile",
    "productId": "prod_xyz789",
    "versionId": "ver_def456",
    "priority": "high",
    "status": "todo",
    "dueDate": "2024-02-20"
  }'

Body Parameters

ParameterTypeRequiredDescription
titlestringYesThe task title (1-200 characters)
descriptionstringNoDetailed task description (max 2000 characters)
productIdstringNoID of the product to associate
versionIdstringNoID of the version to associate (requires productId)
prioritystringNoOne of: high, medium (default), low
statusstringNoOne of: todo (default), in_progress, done
dueDatestringNoDue date in YYYY-MM-DD format

Response

{}JSON
{
  "data": {
    "id": "task_new123",
    "displayId": 43,
    "title": "Fix login bug",
    "description": "Users report intermittent login failures on mobile",
    "priority": "high",
    "status": "todo",
    "dueDate": "2024-02-20",
    "productId": "prod_xyz789",
    "productName": "My SaaS App",
    "versionId": "ver_def456",
    "versionName": "v1.2.0",
    "isArchived": false,
    "createdAt": "2024-01-21T14:00:00Z",
    "completedAt": null
  }
}
GET

Retrieve a Task

Retrieves the details of an existing task by its ID.

Request

Bash
curl https://api.myopcs.com/api/v1/tasks/task_abc123 \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{}JSON
{
  "data": {
    "id": "task_abc123",
    "displayId": 42,
    "title": "Implement user authentication",
    "description": "Add OAuth2 login flow with Google and GitHub",
    "priority": "high",
    "status": "in_progress",
    "dueDate": "2024-02-15",
    "productId": "prod_xyz789",
    "productName": "My SaaS App",
    "versionId": "ver_def456",
    "versionName": "v1.2.0",
    "isArchived": false,
    "createdAt": "2024-01-15T10:30:00Z",
    "completedAt": null
  }
}
PATCH

Update Task

Updates an existing task. Only include the fields you want to change.

Request

Bash
curl -X PATCH https://api.myopcs.com/api/v1/tasks/task_abc123 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "done",
    "priority": "medium"
  }'

Body Parameters

ParameterTypeRequiredDescription
titlestringNoThe task title (1-200 characters)
descriptionstringNoDetailed task description. Set to null to clear.
productIdstring | nullNoID of the product to associate. Set to null to remove.
versionIdstring | nullNoID of the version to associate. Set to null to remove.
prioritystringNoOne of: high, medium, low
statusstringNoOne of: todo, in_progress, done
dueDatestring | nullNoDue date in YYYY-MM-DD format. Set to null to clear.

Response

{}JSON
{
  "data": {
    "id": "task_abc123",
    "displayId": 42,
    "title": "Implement user authentication",
    "description": "Add OAuth2 login flow with Google and GitHub",
    "priority": "medium",
    "status": "done",
    "dueDate": "2024-02-15",
    "productId": "prod_xyz789",
    "productName": "My SaaS App",
    "versionId": "ver_def456",
    "versionName": "v1.2.0",
    "isArchived": false,
    "createdAt": "2024-01-15T10:30:00Z",
    "completedAt": "2024-01-22T16:30:00Z"
  }
}
DELETE

Delete Task

Deletes a task. This is a soft delete - the task is marked as deleted but not permanently removed.

Request

Bash
curl -X DELETE https://api.myopcs.com/api/v1/tasks/task_abc123 \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{}JSON
{
  "success": true
}