PerspecTaskPerspecTask

Link a pull request to a task

Link a PR by its URL. Usually unnecessary: a PR whose title, branch or description contains the task's `pr_token` links itself. Linking an already-linked PR refreshes it. Needs the PerspecTask GitHub app installed on the repository (Account → GitHub in the web app). Answers 404 with `code: "not_installed"` when the app isn't on that repository or your GitHub account can't read it.

POST
/tasks/{id}/pull-requests

Link a PR by its URL. Usually unnecessary: a PR whose title, branch or description contains the task's pr_token links itself. Linking an already-linked PR refreshes it. Needs the PerspecTask GitHub app installed on the repository (Account → GitHub in the web app). Answers 404 with code: "not_installed" when the app isn't on that repository or your GitHub account can't read it.

Authorization

bearerAuth
AuthorizationBearer <token>

Your PerspecTask API key (starts with pt_live_). Each key carries scopes: tasks:read (GET), tasks:write (full create/update), and tasks:write:meta (create/update everything EXCEPT editing title/description of existing tasks — for automation that manages workflow without rewriting human-authored content).

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/tasks/string/pull-requests" \  -H "Content-Type: application/json" \  -d '{    "url": "https://github.com/octocat/hello-world/pull/42"  }'
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "repo": "octocat/hello-world",
  "number": 0,
  "title": "string",
  "url": "string",
  "state": "open",
  "draft": true,
  "checks": "pending",
  "review": "approved",
  "preview_url": "string",
  "preview_status": "building",
  "linked_by": "auto"
}
Empty
Empty
Empty