Create an issue
The issue number is per-team incrementing (max(number)+1, computed in a transaction) and position starts equal to the number. State resolution: an explicit stateId must belong to the target team (else 400 "stateId does not belong to that team"); omitted, the team's lowest-position state is used; a team with no states at all is 400 ("no workflow state available; create a state first"). priority defaults to 0 (0 none, 1 urgent, 2 high, 3 medium, 4 low); estimate 0 means "no estimate" and is stored as null. assigneeId must be an org member; projectId/cycleId/parentId must reference rows inside the caller's org (else 400 "invalid …Id"). Records a "created" activity and notifies the assignee (import-mode creates do not notify). The creator and the assignee are seeded as followers of the issue, on imported creates too: seeding notifies nobody, it only decides who hears about later activity. A description containing @[Name](mention:memberId) tokens is processed the same as on a comment (see POST /v1/issues/{id}/comments) — each resolvable mention notifies and follows, even though the description arrived at creation rather than through a later edit.
View as MarkdownAuthorization
bearer In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/issues" \ -H "Content-Type: application/json" \ -d '{ "teamId": "a4ede8ba-7c0a-4485-8763-cbd9b282fbec", "title": "string" }'{ "issue": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "teamId": "a4ede8ba-7c0a-4485-8763-cbd9b282fbec", "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8", "number": 0, "title": "string", "description": "string", "stateId": "871bb69c-5872-42b2-88b0-72e9da663aaa", "state": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "teamId": "a4ede8ba-7c0a-4485-8763-cbd9b282fbec", "name": "string", "type": "backlog", "color": "string", "position": 0, "description": "string", "canDelete": true }, "priority": 0, "assigneeId": "665a9750-71bd-4b96-bacd-9efa4ae022dd", "assignee": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b", "name": "string", "email": "string", "created": "2019-08-24T14:15:22Z" }, "creatorId": "688ebf54-d343-4104-8711-82c2feac534a", "parentId": "70850378-7d3c-4f45-91b7-942d4dfbbd43", "cycleId": "811bdbf8-a42f-4f8c-b62e-39c77332ffe1", "estimate": 0, "position": 0, "dueDate": "2019-08-24", "labels": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "teamId": "a4ede8ba-7c0a-4485-8763-cbd9b282fbec", "name": "string", "color": "string" } ], "childCount": 0, "blockedByCount": 0, "match": { "field": "title", "snippet": [ { "text": "string", "hit": true } ], "commentId": "ee0469af-2fa1-4b7e-b5f1-8e711a95821b", "author": "string", "at": "2019-08-24T14:15:22Z" }, "created": "2019-08-24T14:15:22Z", "modified": "2019-08-24T14:15:22Z", "completedAt": "2019-08-24T14:15:22Z", "mentions": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "email": "string" } ], "following": true, "importedFrom": { "namespace": "string", "key": "string" } }}List issues
Issues across the teams the CALLER IS IN (see listTeams for how that set is decided), ordered by position, then number, then id. Each row OMITS description: descriptions are unbounded markdown and no list renders one, so read it from getIssue instead. Filters combine with AND; q is a case-insensitive title substring match (LIKE wildcards in q are escaped and match literally), or with scope=all a full-text search over titles, descriptions and comments. KEYSET PAGED. Send limit to choose a page size and pass the nextCursor from the previous response to continue. nextCursor is present only while more rows remain, so its absence means the end of the list rather than a truncation the caller was never told about. total counts every row the filters match, not the page, because counts and progress in the UI are drawn from it and a page cannot say how many there are. Cursors are opaque and must not be constructed or parsed by clients: the sort key they encode is free to change. A malformed cursor is a 400 rather than a silent restart, which would re-deliver the whole list. limit defaults to 50. The old behaviour of returning up to 1000 rows in one response is still available by asking for it. An issue in a team the caller is not in is invisible everywhere, not just here: reading one by id is a 404, never a 403, so the response does not confirm that it exists.
Grouped issue counts
Totals for the issues the caller can see, grouped, honouring every filter listIssues honours because it shares the same query builder. A count walking a different predicate than the list beside it would put two numbers on screen that disagree, with neither looking wrong alone. Exists because a paged list cannot answer "how many". Group headers, board columns and the progress bars on the cycles and projects pages each need a real total per group, and one grouped query serves a whole screen where per-group requests would take one per column. Each group carries `total` and `done` - both, because a progress bar needs two numbers and fetching them separately would double the requests per bar. `done` counts issues whose state is of the `completed` type. `key` is always a string, including for priority, which groups on an integer column. A null key is a real group: unassigned, no project, or no cycle. Groups holding no issues are ABSENT rather than zero - the caller knows its own states, projects and cycles and can render those as zero, which the server cannot do for assignees.