Get a task
One card, and every commit and pull request that named it, newest first.
GET
/tasks/{task}Authorization
AuthorizationBearer token · headerrequired`MEDIAN_KEY` from Settings under API, or an MCP OAuth access token. A key acts as the organization; a token acts as the person who approved it.
Path parameters
taskstringrequiredA task key like "MED-12", its number, its id, or a link to the card.
Responses
200The card.
idstringkeystringWhat a commit message says: "MED-12".
numberintegertitlestringdescriptionstringThe write-up, as markdown.
statusstringAllowed:
requestsplannedin_progressin_reviewdoneprioritystring | nullAllowed:
urgenthighmediumlownullassigneeobject | nullShow propertiesHide properties
userIdstringnamestringemailstring | nullcreatedByNamestringcreatedAtintegerupdatedAtintegerdoneAtinteger | nullsignalIdstring | nullThe report it was adopted from, for `GET /v1/signals/{id}`.
linearobject | nullShow propertiesHide properties
identifierstringurlstringgithubobject | nullShow propertiesHide properties
numberintegerurlstringcommitsintegerpullRequestsintegerurlstring | nullThe card's page, or null where no board address is set.
codeTaskCode[]Every commit and pull request that named the card, newest first.
Show propertiesHide properties
Array of
TaskCodekindstringAllowed:
commitpull_requestrepostring"owner/repo".
refstringThe short sha, or the pull request number.
titlestringurlstringauthorstringviastringWhether the key was in the text, or a model read the push and matched it.
Allowed:
keyaistatestring | nullAllowed:
openmergedclosednulldraftbooleanupdatedAtinteger401The bearer token is missing, revoked, or expired.
errorobjectShow propertiesHide properties
codestringmessagestring404Not one of yours, or not there at all.
errorobjectShow propertiesHide properties
codestringmessagestring429Too many requests. Wait the seconds in `Retry-After`. Limits depend on the plan. See [rate limits](/api/errors-and-limits#rate-limits).
errorobjectShow propertiesHide properties
codestringmessagestringRequest
curl -X GET "https://api.median.sh/v1/tasks/string" \
-H "Authorization: Bearer YOUR_TOKEN"const response = await fetch("https://api.median.sh/v1/tasks/string", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_TOKEN"
}
});Response
{
"id": "string",
"key": "string",
"number": 0,
"title": "string",
"description": "string",
"status": "requests",
"priority": "urgent",
"assignee": {
"userId": "string",
"name": "string",
"email": "string"
},
"createdByName": "string",
"createdAt": 0,
"updatedAt": 0,
"doneAt": 0,
"signalId": "string",
"linear": {
"identifier": "string",
"url": "string"
},
"github": {
"number": 0,
"url": "string"
},
"commits": 0,
"pullRequests": 0,
"url": "string",
"code": [
{
"kind": "commit",
"repo": "string",
"ref": "string",
"title": "string",
"url": "string",
"author": "string",
"via": "key",
"state": "open",
"draft": true,
"updatedAt": 0
}
]
}{
"error": {
"code": "string",
"message": "string"
}
}{
"error": {
"code": "string",
"message": "string"
}
}{
"error": {
"code": "string",
"message": "string"
}
}