Create issue

POST
/api/v1/issues

Authorization

bearerAuth
headerAuthorizationBearer <token>

An API key created in Capy under Settings → API.

Request body

application/json
  1. body
projectId*string
title*string
Length1 <= length <= 500
description?string
stateId?string

A state from GET /issue-states. Absent, the organization's default applies.

priority?string
One of"urgent""high""normal""low"
dueAt?string
assignees?array<>

The whole assignee set, primary first. An empty array leaves the issue unassigned.

Itemsitems <= 10
parent?string

The parent issue's code, such as CAP-12. A sub-issue takes its parent's access.

labelIds?array<string>

The whole label set, by id from GET /issue-labels.

Itemsitems <= 20
visibility?string

org for everyone in the project, private for the key's user and the issue's assignees. Absent, org.

One of"org""private"
createdAt?string

When the work item was first created, for an import. Absent, now; never in the future.

updatedAt?string

When the work item last changed, for an import. Absent, createdAt.

files?array<>

Response body

IssueDetail

application/json
  1. response
id*string
code*string
number*integer
projectId*string
title*string
state*
priority*|UnsupportedMember_2
dueAt*string|null
parentId*string|null
visibility*|UnsupportedMember_3
assignees*array<>
labels*array<>
subIssueCount*integer
closedSubIssueCount*integer
openBlockerCount*integer

Open issues the key can read that block this one.

createdAt*string
updatedAt*string
closedAt*string|null
description*string

Markdown. An embedded file appears as capy-file:<fileId>, one of files.

creator*|null
parent*|null
subIssues*array<>
pullRequests*array<>
threads*array<>
files*array<>
curl -X POST 'https://api.capy.ai/api/v1/issues' \  -H 'Content-Type: application/json' \  -d '{  "projectId": "string",  "title": "string"}'
{  "id": "string",  "code": "string",  "number": 0,  "projectId": "string",  "title": "string",  "state": {    "id": "string",    "name": "string",    "type": "open"  },  "priority": "urgent",  "dueAt": "string",  "parentId": "string",  "visibility": "org",  "assignees": [    {      "kind": "user",      "id": "string",      "code": "string"    }  ],  "labels": [    {      "id": "string",      "name": "string"    }  ],  "subIssueCount": 0,  "closedSubIssueCount": 0,  "openBlockerCount": 0,  "createdAt": "string",  "updatedAt": "string",  "closedAt": "string",  "description": "string",  "creator": {    "kind": "user",    "id": "string",    "code": "string"  },  "parent": {    "id": "string",    "code": "string",    "number": 0,    "projectId": "string",    "title": "string",    "state": {      "id": "string",      "name": "string",      "type": "open"    },    "priority": "urgent",    "dueAt": "string",    "parentId": "string",    "visibility": "org",    "assignees": [      {        "kind": "user",        "id": "string",        "code": "string"      }    ],    "labels": [      {        "id": "string",        "name": "string"      }    ],    "subIssueCount": 0,    "closedSubIssueCount": 0,    "openBlockerCount": 0,    "createdAt": "string",    "updatedAt": "string",    "closedAt": "string"  },  "subIssues": [    {      "id": "string",      "code": "string",      "number": 0,      "projectId": "string",      "title": "string",      "state": {        "id": "string",        "name": "string",        "type": "open"      },      "priority": "urgent",      "dueAt": "string",      "parentId": "string",      "visibility": "org",      "assignees": [        {          "kind": "user",          "id": "string",          "code": "string"        }      ],      "labels": [        {          "id": "string",          "name": "string"        }      ],      "subIssueCount": 0,      "closedSubIssueCount": 0,      "openBlockerCount": 0,      "createdAt": "string",      "updatedAt": "string",      "closedAt": "string"    }  ],  "pullRequests": [    {      "repoFullName": "string",      "number": 0,      "state": "open"    }  ],  "threads": [    {      "id": "string",      "code": "string"    }  ],  "files": [    {      "id": "string",      "name": "string",      "mediaType": "string",      "sizeBytes": 0,      "commentId": "string"    }  ]}
Open in Capy