Skip to content

Automation Endpoints

All paths below are relative to the Stib Server origin and require an allowed stib_ak_… Bearer token.

Endpoint summary

MethodPathPermission
GET/api/external/projects/{projectId}/boardscards.read
GET/api/external/projects/{projectId}/cardscards.read
POST/api/external/projects/{projectId}/cardscards.create or pipelines.trigger
GET/api/external/projects/{projectId}/cards/{cardId}cards.read
GET/api/external/projects/{projectId}/statscards.read
PATCH/api/external/projects/{projectId}/cards/{cardId}/movecards.move
POST/api/external/projects/{projectId}/cards/{cardId}/archiveagents.archive
POST/api/external/projects/{projectId}/cards/{cardId}/agent/cancelagents.cancel

List boards and columns

http
GET /api/external/projects/{projectId}/boards

Returns each board with its id, name, and ordered columns. A column includes id, name, columnType, and position. Use this endpoint to resolve a destination columnId instead of hard-coding IDs from another server.

List cards

http
GET /api/external/projects/{projectId}/cards

Optional query parameters:

ParameterMeaning
columnIdFilter by column ID
statusFilter by exact runtime status
labelFilter cards whose serialized labels contain the value
limitPage size; default 50, maximum 100
cursorReturn cards with an ID greater than this cursor

The response data contains items and nextCursor. nextCursor is null when no later page exists. Deleted, archived, and non-Kanban cards are excluded.

Create a card

http
POST /api/external/projects/{projectId}/cards
Content-Type: application/json
json
{
  "title": "Add search filters",
  "prompt": "Add status and agent filters to global search and cover them with tests.",
  "columnId": 17,
  "useWorktree": true
}

title is required. prompt, columnId, and useWorktree are optional. Without columnId, Stib uses the first column of the default board. The chosen column must belong to that default board. useWorktree defaults to true.

Returns 201 Created and the created card in data. Creation initializes its default pipeline configuration but leaves the card inactive; activate it through an explicit supported workflow when execution is desired.

Get a card

http
GET /api/external/projects/{projectId}/cards/{cardId}

Returns card identity, project/column/group, title and prompt, runtime status, position, unread state, Git branch, worktree preference, last agent action, timestamps, locks, and session summaries. The external response deliberately omits the server filesystem worktree path.

Project statistics

http
GET /api/external/projects/{projectId}/stats

Returns active Kanban-card totals by runtime status and column plus the available token snapshot total. Archived, deleted, and non-Kanban cards are excluded.

Move a card

http
PATCH /api/external/projects/{projectId}/cards/{cardId}/move
Content-Type: application/json
json
{
  "targetColumnId": 18,
  "position": 0
}

Moving a card triggers the configured move webhooks and revokes callback tokens when leaving active execution. This endpoint does not start the target column's agent behavior. Resolve the target column from the same project before calling.

Archive a card

http
POST /api/external/projects/{projectId}/cards/{cardId}/archive

Archives the card and revokes its assistant callback tokens. The response data is { "ok": true }.

Cancel an agent

http
POST /api/external/projects/{projectId}/cards/{cardId}/agent/cancel

Requests cancellation of the card's active agent. The response data is { "ok": true } when the manager accepted the operation. Inspect card state and Git changes afterward; cancellation does not roll back files.

Compatibility note

Legacy /api/cards endpoints still exist for backward compatibility, but new integrations should use the project-scoped /api/external/projects/... routes so scope and permissions are explicit.

Card monitors

These daemon-side endpoints are reserved for short-lived agent tokens scoped to their own card. Long-lived external API keys cannot access them.

Create a monitor

http
POST /api/projects/{projectId}/cards/{cardId}/monitors
Content-Type: application/json
json
{
  "command": "./check-ci",
  "intervalSecs": 45,
  "description": "CI status",
  "cwd": "/absolute/card/worktree",
  "allowUnsandboxed": true
}

Creates a persistent monitor and returns it with 201 Created. allowUnsandboxed must be true: commands run outside the agent sandbox with the Stib server's operating-system permissions. The interval must be between 10 and 86,400 seconds, and cwd must resolve inside the card repository, managed worktree, or attached worktree. A card can have at most eight monitors.

List monitors

http
GET /api/projects/{projectId}/cards/{cardId}/monitors

Returns the card's monitors in creation order with their latest status, timestamps, exit code, and diagnostic error.

Delete a monitor

http
DELETE /api/projects/{projectId}/cards/{cardId}/monitors/{monitorId}

Deletes the scoped monitor and returns 204 No Content. A running command and its descendants are terminated by the daemon reconciliation loop.

Stable errors include MONITOR_UNSANDBOXED_ACK_REQUIRED, MONITOR_COMMAND_INVALID, MONITOR_INTERVAL_INVALID, MONITOR_DESCRIPTION_INVALID, MONITOR_CWD_INVALID, MONITOR_CWD_OUTSIDE_CARD, MONITOR_LIMIT_REACHED, MONITOR_CARD_INACTIVE, MONITOR_TERMINAL_CARD_UNSUPPORTED, and MONITOR_NOT_FOUND.