Board publication — K8 HQ Content API
Board publication operations for K8 HQ Content API. Requests, permissions and responses.
Version 1OpenAPI description (JSON)
Before making requests, read the authentication and request requirements.
Write a task's progress back to its linked external issues, under the board's publication policy.
Writing to linked external issues (board item #187): the board's publication policy, tasks' milestone facts, the plan, publishing its templated milestone comments and closure, and people's own replies. Nothing is published without an explicit run.
Base URL
| Base URL | For |
https://api.k8hq.com/v1 | API tokens and the K8 HQ web app |
Endpoints
Board publication
Preview what publishing an issue would write
GET/boards/{board}/intake/issues/{issue}/publication
The plan (each milestone comment's exact text, the closure and what it waits for) and what was already written, with provenance. Writes nothing. For anyone on the board.
For API tokens with boards:read and the web app.
Parameters
| Name | Type | Description |
board (path) required | string | Board ID (brd_…). |
issue (path) required | string | External issue ID on the board (xis_…). |
Response body (JSON)
| Field | Type | Description |
plan required | PublicationPlan | |
written required | OutwardWrite[] | |
Responses
| Status | Body | Meaning |
| 200 | JSON | The plan and the writes. |
| 400 | application/problem+json | The request is malformed (invalid). |
| 401 | application/problem+json | No token, or it expired: sign in again (unauthenticated). |
| 403 | application/problem+json | The token lacks the scope (scope_missing), the container is zero-access (zero_access), or the caller may not use this operation (forbidden). |
| 404 | application/problem+json | Not found, or not yours (not_found). |
| 426 | application/problem+json | K8 HQ has been updated. Reload this page. |
| 429 | application/problem+json | Too many requests (rate_limited). The token is paused until midnight UTC if it goes over its daily request or download limit, or reaches its daily recipient limit. A message with more recipients than the token has left today is refused. If the token has some recipients left, you can send to fewer. Too many attempts with a wrong token also return this response. |
| 503 | application/problem+json | Temporary failure; try again (unavailable). |
Publish to an external issue
POST/boards/{board}/intake/issues/{issue}/publish
Writes the plan previewed (its planHash, required; for tokens too: fetch the plan first) through the issue's source connection: each milestone comment the policy turns on, from its template, once per issue, milestone and task (retries and concurrent publishers never post twice), then, if the resolution rule holds for every linked task, a closing comment and the closure. Nothing from a task's text is published. For someone who may change the board, holding boards.issues.publish, allowed to use the connection now (a token: boards:write and connections:use, with its own authorization).
For API tokens with boards:write and the web app.
Parameters
| Name | Type | Description |
board (path) required | string | Board ID (brd_…). |
issue (path) required | string | External issue ID on the board (xis_…). |
Idempotency-Key (header) | string | Up to 255 characters; a retry with the same key gets the first response. |
Request body (JSON)
| Field | Type | Description |
planHash required | string | The planHash of the plan previewed (GET …/publication). |
Response body (JSON)
| Field | Type | Description |
closed required | boolean | |
plan required | PublicationPlan | |
written required | OutwardWrite[] | |
Responses
| Status | Body | Meaning |
| 200 | JSON | What was written. |
| 400 | application/problem+json | The request is malformed (invalid). |
| 401 | application/problem+json | No token, or it expired: sign in again (unauthenticated). |
| 402 | application/problem+json | The organization is read-only (read_only, design note 0024): it has been out of credit for 60 days, so nothing can be changed until an owner adds credit. |
| 403 | application/problem+json | The token lacks the scope (scope_missing), the container is zero-access (zero_access), or the caller may not use this operation (forbidden). |
| 404 | application/problem+json | Not found, or not yours (not_found). |
| 409 | application/problem+json | What it would write changed since the preview (plan_changed, with the fresh plan; nothing written), the connection isn't available (connection_unavailable) or can't write the repository's issues, the source was removed, or another publisher is writing (in_progress). |
| 426 | application/problem+json | K8 HQ has been updated. Reload this page. |
| 429 | application/problem+json | Too many requests (rate_limited). The token is paused until midnight UTC if it goes over its daily request or download limit, or reaches its daily recipient limit. A message with more recipients than the token has left today is refused. If the token has some recipients left, you can send to fewer. Too many attempts with a wrong token also return this response. |
| 503 | application/problem+json | Temporary failure; try again (unavailable). |
Reply on an external issue
POST/boards/{board}/intake/issues/{issue}/replies
Posts the person's own text on the issue, once for the reply's ID (xpc_, minted by the browser: a retry answers the reply as posted; other text under it is a conflict). No closing keywords. For a person signed in holding boards.issues.publish, allowed to use the connection; the app shows the text before it's sent.
For the web app.
Parameters
| Name | Type | Description |
board (path) required | string | Board ID (brd_…). |
issue (path) required | string | External issue ID on the board (xis_…). |
Idempotency-Key (header) | string | Up to 255 characters; a retry with the same key gets the first response. |
Request body (JSON)
| Field | Type | Description |
id required | string | |
text required | string | |
Response body (JSON)
| Field | Type | Description |
bodyHash required | string | SHA-256 of what was posted (a reply's text isn't kept). |
by required | string | |
claimedAt required | string | |
connection required | string | |
id required | string | xpc_ |
issue required | string | |
kind required | milestone | reply | closure | |
schemaVersion required | integer | |
state required | posting | posted | closed | |
via required | string | |
comment | string | The provider's comment ID. |
item | string | |
milestone | string | |
postedAt | string | |
template | integer | |
url | string | |
Responses
| Status | Body | Meaning |
| 200 | OutwardWrite | The reply's write. |
| 400 | application/problem+json | The request is malformed (invalid). |
| 401 | application/problem+json | No token, or it expired: sign in again (unauthenticated). |
| 402 | application/problem+json | The organization is read-only (read_only, design note 0024): it has been out of credit for 60 days, so nothing can be changed until an owner adds credit. |
| 403 | application/problem+json | The token lacks the scope (scope_missing), the container is zero-access (zero_access), or the caller may not use this operation (forbidden). |
| 404 | application/problem+json | Not found, or not yours (not_found). |
| 409 | application/problem+json | That ID was used for other text, the connection can't write, or another publisher is writing (in_progress). |
| 413 | application/problem+json | The text is too long. |
| 426 | application/problem+json | K8 HQ has been updated. Reload this page. |
| 429 | application/problem+json | Too many requests (rate_limited). The token is paused until midnight UTC if it goes over its daily request or download limit, or reaches its daily recipient limit. A message with more recipients than the token has left today is refused. If the token has some recipients left, you can send to fewer. Too many attempts with a wrong token also return this response. |
| 503 | application/problem+json | Temporary failure; try again (unavailable). |
Read a board's publication policy
GET/boards/{board}/intake/publication
Which milestones are commented on linked issues and the resolution rule. For anyone on the board.
For API tokens with boards:read and the web app.
Parameters
| Name | Type | Description |
board (path) required | string | Board ID (brd_…). |
Response body (JSON)
| Field | Type | Description |
milestones required | tracked | integrated | promoted | released | deployed[] | |
resolution required | off | integrated | promoted | released | deployed | |
schemaVersion required | integer | |
version required | integer | |
setAt | string | |
setBy | string | |
Responses
| Status | Body | Meaning |
| 200 | PublicationPolicy | The policy. |
| 400 | application/problem+json | The request is malformed (invalid). |
| 401 | application/problem+json | No token, or it expired: sign in again (unauthenticated). |
| 403 | application/problem+json | The token lacks the scope (scope_missing), the container is zero-access (zero_access), or the caller may not use this operation (forbidden). |
| 404 | application/problem+json | Not found, or not yours (not_found). |
| 426 | application/problem+json | K8 HQ has been updated. Reload this page. |
| 429 | application/problem+json | Too many requests (rate_limited). The token is paused until midnight UTC if it goes over its daily request or download limit, or reaches its daily recipient limit. A message with more recipients than the token has left today is refused. If the token has some recipients left, you can send to fewer. Too many attempts with a wrong token also return this response. |
| 503 | application/problem+json | Temporary failure; try again (unavailable). |
Set a board's publication policy
PUT/boards/{board}/intake/publication
Turns milestone comments on or off and sets the resolution rule: off (K8 HQ never closes issues; the default), or the milestone every linked task must reach. For a person signed in holding boards.issues.publish on the board. Nothing is published until someone publishes an issue.
For the web app.
Parameters
| Name | Type | Description |
board (path) required | string | Board ID (brd_…). |
Idempotency-Key (header) | string | Up to 255 characters; a retry with the same key gets the first response. |
Request body (JSON)
| Field | Type | Description |
milestones required | tracked | integrated | promoted | released | deployed[] | |
resolution required | string | |
version required | integer | |
Response body (JSON)
| Field | Type | Description |
milestones required | tracked | integrated | promoted | released | deployed[] | |
resolution required | off | integrated | promoted | released | deployed | |
schemaVersion required | integer | |
version required | integer | |
setAt | string | |
setBy | string | |
Responses
| Status | Body | Meaning |
| 200 | PublicationPolicy | The policy. |
| 400 | application/problem+json | The request is malformed (invalid). |
| 401 | application/problem+json | No token, or it expired: sign in again (unauthenticated). |
| 402 | application/problem+json | The organization is read-only (read_only, design note 0024): it has been out of credit for 60 days, so nothing can be changed until an owner adds credit. |
| 403 | application/problem+json | The token lacks the scope (scope_missing), the container is zero-access (zero_access), or the caller may not use this operation (forbidden). |
| 404 | application/problem+json | Not found, or not yours (not_found). |
| 409 | application/problem+json | A request with the same Idempotency-Key is still running (in_progress). |
| 412 | application/problem+json | The policy changed since that version (version_mismatch). |
| 426 | application/problem+json | K8 HQ has been updated. Reload this page. |
| 429 | application/problem+json | Too many requests (rate_limited). The token is paused until midnight UTC if it goes over its daily request or download limit, or reaches its daily recipient limit. A message with more recipients than the token has left today is refused. If the token has some recipients left, you can send to fewer. Too many attempts with a wrong token also return this response. |
| 503 | application/problem+json | Temporary failure; try again (unavailable). |
List a task's milestones
GET/boards/{board}/items/{item}/milestones
The task's recorded milestone facts. For anyone on the board.
For API tokens with boards:read and the web app.
Parameters
| Name | Type | Description |
board (path) required | string | Board ID (brd_…). |
item (path) required | string | Item ID (itm_…). |
Response body (JSON)
| Field | Type | Description |
item required | string | |
milestones required | MilestoneFact[] | |
Responses
| Status | Body | Meaning |
| 200 | JSON | The facts. |
| 400 | application/problem+json | The request is malformed (invalid). |
| 401 | application/problem+json | No token, or it expired: sign in again (unauthenticated). |
| 403 | application/problem+json | The token lacks the scope (scope_missing), the container is zero-access (zero_access), or the caller may not use this operation (forbidden). |
| 404 | application/problem+json | Not found, or not yours (not_found). |
| 426 | application/problem+json | K8 HQ has been updated. Reload this page. |
| 429 | application/problem+json | Too many requests (rate_limited). The token is paused until midnight UTC if it goes over its daily request or download limit, or reaches its daily recipient limit. A message with more recipients than the token has left today is refused. If the token has some recipients left, you can send to fewer. Too many attempts with a wrong token also return this response. |
| 503 | application/problem+json | Temporary failure; try again (unavailable). |
Record a task's milestone
PUT/boards/{board}/items/{item}/milestones/{milestone}
Records that the task reached the milestone, with an optional evidence reference (a commit or ref name). The first record stands (200 again). It publishes nothing by itself. For anyone who may change the board.
For API tokens with boards:write and the web app.
Parameters
| Name | Type | Description |
board (path) required | string | Board ID (brd_…). |
item (path) required | string | Item ID (itm_…). |
milestone (path) required | integrated | promoted | released | deployed | integrated, promoted, released or deployed. |
Idempotency-Key (header) | string | Up to 255 characters; a retry with the same key gets the first response. |
Request body (JSON)
| Field | Type | Description |
evidence | string | |
Response body (JSON)
| Field | Type | Description |
at required | string | |
by required | string | |
item required | string | |
milestone required | string | |
schemaVersion required | integer | |
via required | string | person, or the token (tok_). |
evidence | string | A commit or ref name. |
Responses
| Status | Body | Meaning |
| 200 | MilestoneFact | Already recorded. |
| 201 | MilestoneFact | Recorded. |
| 400 | application/problem+json | The request is malformed (invalid). |
| 401 | application/problem+json | No token, or it expired: sign in again (unauthenticated). |
| 402 | application/problem+json | The organization is read-only (read_only, design note 0024): it has been out of credit for 60 days, so nothing can be changed until an owner adds credit. |
| 403 | application/problem+json | The token lacks the scope (scope_missing), the container is zero-access (zero_access), or the caller may not use this operation (forbidden). |
| 404 | application/problem+json | Not found, or not yours (not_found). |
| 409 | application/problem+json | The task is in Trash, or a request with the same Idempotency-Key is still running (in_progress). |
| 426 | application/problem+json | K8 HQ has been updated. Reload this page. |
| 429 | application/problem+json | Too many requests (rate_limited). The token is paused until midnight UTC if it goes over its daily request or download limit, or reaches its daily recipient limit. A message with more recipients than the token has left today is refused. If the token has some recipients left, you can send to fewer. Too many attempts with a wrong token also return this response. |
| 503 | application/problem+json | Temporary failure; try again (unavailable). |
Retract a task's milestone
DELETE/boards/{board}/items/{item}/milestones/{milestone}
Removes a fact recorded in error. What was published stays. For anyone who may change the board.
For API tokens with boards:write and the web app.
Parameters
| Name | Type | Description |
board (path) required | string | Board ID (brd_…). |
item (path) required | string | Item ID (itm_…). |
milestone (path) required | integrated | promoted | released | deployed | integrated, promoted, released or deployed. |
Idempotency-Key (header) | string | Up to 255 characters; a retry with the same key gets the first response. |
Responses
| Status | Body | Meaning |
| 204 | | Retracted. |
| 400 | application/problem+json | The request is malformed (invalid). |
| 401 | application/problem+json | No token, or it expired: sign in again (unauthenticated). |
| 402 | application/problem+json | The organization is read-only (read_only, design note 0024): it has been out of credit for 60 days, so nothing can be changed until an owner adds credit. |
| 403 | application/problem+json | The token lacks the scope (scope_missing), the container is zero-access (zero_access), or the caller may not use this operation (forbidden). |
| 404 | application/problem+json | Not found, or not yours (not_found). |
| 409 | application/problem+json | A request with the same Idempotency-Key is still running (in_progress). |
| 426 | application/problem+json | K8 HQ has been updated. Reload this page. |
| 429 | application/problem+json | Too many requests (rate_limited). The token is paused until midnight UTC if it goes over its daily request or download limit, or reaches its daily recipient limit. A message with more recipients than the token has left today is refused. If the token has some recipients left, you can send to fewer. Too many attempts with a wrong token also return this response. |
| 503 | application/problem+json | Temporary failure; try again (unavailable). |