Pencil Phases API
Ordered, optionally gated execution stages within an Epic.
Ordered, optionally gated execution stages within an Epic.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/pencil-ink:pencil-ink-phases-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Pencil Public Phases API
version: 1.0.0
description: 'Programmatic access to Pencil tasks, projects, agents, ideas, content, phases, and meetings.
**Authentication.** Every request must send an org-scoped API key as a bearer token:
```
Authorization: Bearer pk_live_…
```
Create and manage keys in Pencil under **Settings → API Keys**. A key is scoped to a single organization — the org is determined by the key, so you never pass an org id. Each key carries a single coarse role:
- `read` — may call any `GET` endpoint.
- `write` — may additionally call `POST`/`PATCH`/`DELETE`. A read-only key calling a write endpoint gets `403`.
**Responses.** Single resources are wrapped as `{ "data": … }`. List endpoints return `{ "data": [...], "pagination": { "nextCursor": string | null, "hasMore": boolean } }`; pass the returned `nextCursor` back as the `cursor` query param to page. Errors use `{ "error": { "code": …, "message": … } }`.
**Rate limits.** Requests are limited per key. Exceeding the limit returns `429` with a `Retry-After` header (seconds until the window resets).'
servers:
- url: https://app.pencil.ink/api/v1
description: This deployment
security:
- bearerAuth: []
tags:
- name: Phases
description: Ordered, optionally gated execution stages within an Epic.
paths:
/epics/{epicId}/phases:
parameters:
- name: epicId
in: path
required: true
schema:
type: string
get:
tags:
- Phases
summary: List an Epic's phases
operationId: listEpicPhases
responses:
'200':
description: The Epic's phases in execution order.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/Phase'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
post:
tags:
- Phases
summary: Create an Epic phase
description: Appends a phase to the Epic. Requires a `write` key.
operationId: createEpicPhase
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PhaseCreate'
responses:
'201':
$ref: '#/components/responses/PhaseResource'
'400':
$ref: '#/components/responses/ValidationError'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
/phases/{phaseId}:
parameters:
- name: phaseId
in: path
required: true
schema:
type: string
get:
tags:
- Phases
summary: Get a phase
operationId: getPhase
responses:
'200':
$ref: '#/components/responses/PhaseResource'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
patch:
tags:
- Phases
summary: Update a phase
description: Requires a `write` key.
operationId: updatePhase
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PhaseUpdate'
responses:
'200':
$ref: '#/components/responses/PhaseResource'
'400':
$ref: '#/components/responses/ValidationError'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'409':
$ref: '#/components/responses/PhaseGateLocked'
delete:
tags:
- Phases
summary: Delete a phase
description: Detaches its tasks and rewrites remaining positions. Requires a `write` key.
operationId: deletePhase
responses:
'200':
description: The resource.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/DeleteResult'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
/epics/{epicId}/phases/reorder:
parameters:
- name: epicId
in: path
required: true
schema:
type: string
post:
tags:
- Phases
summary: Reorder an Epic's phases
description: The array must contain every current phase exactly once. Requires a `write` key.
operationId: reorderEpicPhases
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- phaseIds
properties:
phaseIds:
type: array
items:
type: string
responses:
'200':
description: The reordered phases.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/Phase'
'400':
$ref: '#/components/responses/ValidationError'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'409':
$ref: '#/components/responses/PhaseGateLocked'
/phases/{phaseId}/override:
parameters:
- name: phaseId
in: path
required: true
schema:
type: string
post:
tags:
- Phases
summary: Override a locked phase gate
description: Creates a revision-bound, audited override. Requires a `write` key.
operationId: overridePhaseGate
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- reason
properties:
reason:
type: string
maxLength: 1000
responses:
'200':
$ref: '#/components/responses/PhaseResource'
'400':
$ref: '#/components/responses/ValidationError'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
delete:
tags:
- Phases
summary: Clear a phase gate override
description: Requires a `write` key.
operationId: clearPhaseGateOverride
responses:
'200':
$ref: '#/components/responses/PhaseResource'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
/tasks/{id}/phase:
parameters:
- $ref: '#/components/parameters/PathId'
put:
tags:
- Phases
summary: Assign a task to an Epic phase
description: Set `phaseId` to null to detach it. The phase must belong to the task's Epic. Requires a `write` key.
operationId: setTaskPhase
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- phaseId
properties:
phaseId:
type:
- string
- 'null'
responses:
'200':
description: The resource.
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/TaskPhaseAssignment'
'400':
$ref: '#/components/responses/ValidationError'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'409':
$ref: '#/components/responses/PhaseGateLocked'
components:
responses:
Unauthorized:
description: Missing or invalid API key (`unauthorized`).
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
PhaseGateLocked:
description: A strict phase gate prevents the requested start (`phase_gate_locked`).
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
Forbidden:
description: The key is read-only and may not write (`forbidden`).
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
ValidationError:
description: Malformed request or invalid field (`validation_error`).
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
PhaseResource:
description: Referenced by this document but never defined in it. API Evangelist added this empty placeholder so the document resolves; the shape is unknown and is NOT a claim about the API.
x-ae-placeholder: true
NotFound:
description: Resource not found in this org (`not_found`).
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
schemas:
DeleteResult:
type: object
properties:
deleted:
type: boolean
PhaseUpdate:
type: object
properties:
name:
type: string
maxLength: 120
description:
type: string
nullable: true
gateMode:
$ref: '#/components/schemas/PhaseGateMode'
targetDate:
type: integer
nullable: true
description: Epoch ms.
docUrl:
type: string
nullable: true
format: uri
ownerId:
type: string
nullable: true
PhaseWorkState:
type: string
enum:
- empty
- planned
- active
- done
PhaseCreate:
type: object
required:
- name
properties:
name:
type: string
maxLength: 120
description:
type: string
gateMode:
$ref: '#/components/schemas/PhaseGateMode'
targetDate:
type: integer
description: Epoch ms.
docUrl:
type: string
format: uri
ownerId:
type: string
TaskPhaseAssignment:
type: object
required:
- taskId
- phaseId
properties:
taskId:
type: string
phaseId:
type: string
nullable: true
PhaseGateState:
type: string
enum:
- open
- locked
- overridden
Error:
type: object
properties:
error:
type: object
properties:
code:
type: string
enum:
- unauthorized
- forbidden
- rate_limited
- validation_error
- phase_gate_locked
- conflict
- not_found
- internal_error
message:
type: string
Phase:
type: object
required:
- id
- globalId
- epicId
- name
- position
- gateMode
- workState
- gateState
- taskCount
- completedTaskCount
- remainingTaskCount
properties:
id:
type: string
globalId:
type: string
example: PH-12
epicId:
type: string
name:
type: string
description:
type: string
nullable: true
position:
type: integer
minimum: 0
gateMode:
$ref: '#/components/schemas/PhaseGateMode'
workState:
$ref: '#/components/schemas/PhaseWorkState'
gateState:
$ref: '#/components/schemas/PhaseGateState'
blockingPhase:
type: object
nullable: true
properties:
id:
type: string
globalId:
type: string
name:
type: string
remainingTaskCount:
type: integer
taskCount:
type: integer
completedTaskCount:
type: integer
remainingTaskCount:
type: integer
targetDate:
type: integer
nullable: true
description: Epoch ms.
docUrl:
type: string
nullable: true
format: uri
ownerId:
type: string
nullable: true
gateOverride:
type: object
nullable: true
properties:
at:
type: integer
description: Epoch ms.
byUserId:
type: string
nullable: true
byAgent:
type: string
nullable: true
reason:
type: string
nullable: true
createdAt:
type: integer
description: Epoch ms.
updatedAt:
type: integer
description: Epoch ms.
PhaseGateMode:
type: string
enum:
- advisory
- strict
parameters:
PathId:
name: id
in: path
required: true
schema:
type: string
description: The resource id.
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: Org-scoped API key, e.g. `pk_live_…`.