Skip to content

API reference

This page is generated from @zupflow/contract (API version 0.1.0), the same source the server, the SDK and the Console are checked against. Download the full OpenAPI document.

Authentication

Send a bearer token on every request. An API key (zf_test_… in Sandbox, zf_live_… in Production) acts in its organization and environment, and sees nothing of the other environment. Keep keys on your backend, never in a browser.

A Console session also sends Zupflow-Organization to say which organization it acts in.

Authenticated request
curl https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"

Responses and errors

Every response is an envelope: data on success, error on failure, and meta for paging. Branch on error.code, never on error.message. A validation error names the fields that failed in error.fields.

IDs are prefixed and opaque (ws_…, run_…). A malformed ID, an ID of another type, or one in another organization answers 404, exactly like a missing one.

Error400
{
  "data": null,
  "meta": null,
  "error": {
    "code": "validation_failed",
    "message": "The request body is invalid.",
    "fields": { "slug": "Use lowercase letters, digits and dashes." }
  }
}

Pagination

Lists are paged on the server. Pass limit (1 to 100, default 25) and, for the next page, the cursor from meta.pagination.next_cursor. When next_cursor is null, you have every item. The SDK's list methods page for you.

Next page
curl "https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/workspaces?limit=25&cursor=eyJpZCI6IjAzNEgifQ" \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"

Idempotency

Every POST accepts an Idempotency-Key. Sending the same key and request again replays the first response, so a retry after a timeout never creates two runs. The same key with a different request answers 422; one still in flight answers 409. Keys are kept for 24 hours. The SDK sets one for you.

Secrets (API keys, webhook signing secrets) appear once, in the response that creates them. A replay of that request answers 409 rather than showing the secret again.

Safe retry
curl -X POST https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/agents/agt_034HXHH2LZFzvoaSAhfGVC/runs \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY" \
  -H "Idempotency-Key: 6f1c0f2e-run-acct_1042-42" \
  -H "Content-Type: application/json" \
  -d '{ "input": "What is due this week?" }'
120 of 120

Identity

The signed-in member and their organizations

GET/v1/me

Console sessiongetViewer

Returns

200 with data: Viewer

GET/v1/me
curl https://zupflow.example.com/v1/me \
  -H "Authorization: Bearer $CONSOLE_TOKEN"
Response200
{
  "data": {
    "user": {
      "id": "usr_0344un49YpnirMXyqfkTed",
      "name": "Acme Corp",
      "email": "ada@example.com",
      "avatar_url": "https://example.com/asset"
    },
    "organizations": [
      {
        "id": "org_034WrceamQGAwHgTod2dHN",
        "name": "Acme Corp",
        "slug": "acme",
        "role": "owner",
        "created_at": null,
        "setup": null
      }
    ]
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}
GET/v1/me/invitations
curl https://zupflow.example.com/v1/me/invitations \
  -H "Authorization: Bearer $CONSOLE_TOKEN"
Response200
{
  "data": [
    {
      "id": "mem_0340gXOnK5IPTQna7u9cyT",
      "organization": {
        "id": "org_034WrceamQGAwHgTod2dHN",
        "name": "Acme Corp",
        "slug": "acme"
      },
      "role": "owner",
      "invited_by": {
        "name": "Acme Corp",
        "email": "ada@example.com"
      },
      "status": "pending",
      "invited_at": "2026-10-04T21:04:11.000Z",
      "expires_at": "2026-10-04T21:04:11.000Z"
    }
  ],
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Join the invitation's organization with the invited role. Someone else's invitation, or one withdrawn (by an admin, or because its grantor can't grant it any more) or declined, is 404; an accepted one 409 invitation_accepted; an expired one 422 invitation_expired; 403 email_unverified as for the list (backend only)

POST/v1/me/invitations/{invitation}/accept

Console sessionacceptInvitation

Path parameters

invitationMemberIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Returns

200 with data: Organization

POST/v1/me/invitations/{invitation}/accept
curl -X POST https://zupflow.example.com/v1/me/invitations/mem_0340gXOnK5IPTQna7u9cyT/accept \
  -H "Authorization: Bearer $CONSOLE_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)"
Response200
{
  "data": {
    "id": "org_034WrceamQGAwHgTod2dHN",
    "name": "Acme Corp",
    "slug": "acme",
    "role": "owner",
    "created_at": "2026-10-04T21:04:11.000Z",
    "setup": {
      "has_app": true,
      "has_ready_configuration": true,
      "has_workspace": true,
      "has_api_key": true,
      "has_installation": true,
      "has_agent": true,
      "has_run": true
    }
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Decline an invitation, expired or not: it's withdrawn. Someone else's, or one already gone, is 404; an accepted one 409 invitation_accepted; 403 email_unverified as for the list (backend only)

POST/v1/me/invitations/{invitation}/decline

Console sessiondeclineInvitation

Path parameters

invitationMemberIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Returns

204 with an empty body

POST/v1/me/invitations/{invitation}/decline
curl -X POST https://zupflow.example.com/v1/me/invitations/mem_0340gXOnK5IPTQna7u9cyT/decline \
  -H "Authorization: Bearer $CONSOLE_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)"

Organizations

Create an organization; the caller becomes its owner

POST/v1/organizations

Console sessioncreateOrganization

Body

namestringrequired
slugstringrequired

Returns

201 with data: Organization

POST/v1/organizations
curl -X POST https://zupflow.example.com/v1/organizations \
  -H "Authorization: Bearer $CONSOLE_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme Corp",
    "slug": "acme"
  }'
Response201
{
  "data": {
    "id": "org_034WrceamQGAwHgTod2dHN",
    "name": "Acme Corp",
    "slug": "acme",
    "role": "owner",
    "created_at": "2026-10-04T21:04:11.000Z",
    "setup": {
      "has_app": true,
      "has_ready_configuration": true,
      "has_workspace": true,
      "has_api_key": true,
      "has_installation": true,
      "has_agent": true,
      "has_run": true
    }
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

An organization

GET/v1/organizations/{org}

Console sessiongetOrganization

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Returns

200 with data: Organization

GET/v1/organizations/{org}
curl https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN \
  -H "Authorization: Bearer $CONSOLE_TOKEN"
Response200
{
  "data": {
    "id": "org_034WrceamQGAwHgTod2dHN",
    "name": "Acme Corp",
    "slug": "acme",
    "role": "owner",
    "created_at": "2026-10-04T21:04:11.000Z",
    "setup": {
      "has_app": true,
      "has_ready_configuration": true,
      "has_workspace": true,
      "has_api_key": true,
      "has_installation": true,
      "has_agent": true,
      "has_run": true
    }
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Rename an organization

PATCH/v1/organizations/{org}

Console sessionupdateOrganization

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Body

namestring
slugstring

Returns

200 with data: Organization

PATCH/v1/organizations/{org}
curl -X PATCH https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN \
  -H "Authorization: Bearer $CONSOLE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme Corp",
    "slug": "acme"
  }'
Response200
{
  "data": {
    "id": "org_034WrceamQGAwHgTod2dHN",
    "name": "Acme Corp",
    "slug": "acme",
    "role": "owner",
    "created_at": "2026-10-04T21:04:11.000Z",
    "setup": {
      "has_app": true,
      "has_ready_configuration": true,
      "has_workspace": true,
      "has_api_key": true,
      "has_installation": true,
      "has_agent": true,
      "has_run": true
    }
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Runs, failures, tool calls and tokens per UTC day

GET/v1/organizations/{org}/usage

Console sessionAPI keygetUsage

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Query parameters

environmentEnvironmentrequired
daysinteger
1 to 90 (default 14); values outside are clamped, and a non-integer means the default.

Returns

200 with data: UsageReport

GET/v1/organizations/{org}/usage
curl https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/usage \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"
Response200
{
  "data": {
    "environment": "sandbox",
    "days": [
      {
        "date": "date",
        "runs": 1,
        "failed_runs": 1,
        "tool_calls": 1,
        "input_tokens": 1,
        "output_tokens": 1,
        "cache_read_input_tokens": 1,
        "cache_write_input_tokens": 1
      }
    ],
    "totals": {
      "runs": 1,
      "failed_runs": 1,
      "tool_calls": 1,
      "input_tokens": 1,
      "output_tokens": 1,
      "cache_read_input_tokens": 1,
      "cache_write_input_tokens": 1
    }
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Members

Members and invitations

GET/v1/organizations/{org}/members

Console sessionlistMembers

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Returns

200 with data: Member[]

GET/v1/organizations/{org}/members
curl https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/members \
  -H "Authorization: Bearer $CONSOLE_TOKEN"
Response200
{
  "data": [
    {
      "id": "mem_0340gXOnK5IPTQna7u9cyT",
      "organization_id": "org_034WrceamQGAwHgTod2dHN",
      "user": {
        "id": "usr_0344un49YpnirMXyqfkTed",
        "name": "Acme Corp",
        "email": "ada@example.com",
        "avatar_url": "https://example.com/asset"
      },
      "role": "owner",
      "status": "active",
      "invited_at": "2026-10-04T21:04:11.000Z",
      "expires_at": "2026-10-04T21:04:11.000Z",
      "joined_at": "2026-10-04T21:04:11.000Z",
      "last_active_at": "2026-10-04T21:04:11.000Z"
    }
  ],
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Invite a member: an owner or admin, and an owner to invite an owner. Inviting an address whose invitation expired renews it, with this role and grantor

POST/v1/organizations/{org}/members

Console sessioninviteMember

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Body

emailstringrequired
role"owner" | "admin" | "developer" | "viewer"required

Returns

201 with data: Member

POST/v1/organizations/{org}/members
curl -X POST https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/members \
  -H "Authorization: Bearer $CONSOLE_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "ada@example.com",
    "role": "owner"
  }'
Response201
{
  "data": {
    "id": "mem_0340gXOnK5IPTQna7u9cyT",
    "organization_id": "org_034WrceamQGAwHgTod2dHN",
    "user": {
      "id": "usr_0344un49YpnirMXyqfkTed",
      "name": "Acme Corp",
      "email": "ada@example.com",
      "avatar_url": "https://example.com/asset"
    },
    "role": "owner",
    "status": "active",
    "invited_at": "2026-10-04T21:04:11.000Z",
    "expires_at": "2026-10-04T21:04:11.000Z",
    "joined_at": "2026-10-04T21:04:11.000Z",
    "last_active_at": "2026-10-04T21:04:11.000Z"
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Change a member's role. On an invitation, the owner changing it becomes its grantor; a member demoted loses the invitations they granted above what they can grant now

PATCH/v1/organizations/{org}/members/{member}

Console sessionupdateMember

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
memberMemberIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Body

role"owner" | "admin" | "developer" | "viewer"required

Returns

200 with data: Member

PATCH/v1/organizations/{org}/members/{member}
curl -X PATCH https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/members/mem_0340gXOnK5IPTQna7u9cyT \
  -H "Authorization: Bearer $CONSOLE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "role": "owner"
  }'
Response200
{
  "data": {
    "id": "mem_0340gXOnK5IPTQna7u9cyT",
    "organization_id": "org_034WrceamQGAwHgTod2dHN",
    "user": {
      "id": "usr_0344un49YpnirMXyqfkTed",
      "name": "Acme Corp",
      "email": "ada@example.com",
      "avatar_url": "https://example.com/asset"
    },
    "role": "owner",
    "status": "active",
    "invited_at": "2026-10-04T21:04:11.000Z",
    "expires_at": "2026-10-04T21:04:11.000Z",
    "joined_at": "2026-10-04T21:04:11.000Z",
    "last_active_at": "2026-10-04T21:04:11.000Z"
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Remove a member or withdraw an invitation. Removing a member withdraws the invitations they granted; so does a demotion, for the roles they can't grant any more

DELETE/v1/organizations/{org}/members/{member}

Console sessionremoveMember

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
memberMemberIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Query parameters

status"invited"
invited: withdraw an invitation only. One accepted in the meantime is left alone, and answers 409 invitation_accepted.

Returns

204 with an empty body

DELETE/v1/organizations/{org}/members/{member}
curl -X DELETE https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/members/mem_0340gXOnK5IPTQna7u9cyT \
  -H "Authorization: Bearer $CONSOLE_TOKEN"

Runs

Runs across the organization's workspaces, newest first

GET/v1/organizations/{org}/runs

Console sessionAPI keylistOrganizationRuns

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Query parameters

environmentEnvironment
workspace_idWorkspaceId
Only this workspace's rows. A malformed or unknown ID matches nothing.
status"queued" | "running" | "waiting_for_approval" | "completed" | …
cursorstring
limitinteger
Page size, 1 to 100 (default 25); values outside are clamped, and a non-integer means the default.

Returns

200 with data: OrganizationRun[]

GET/v1/organizations/{org}/runs
curl https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/runs \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"
Response200
{
  "data": [
    {
      "id": "run_034NRN3tk3efa42EcmTqpS",
      "workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
      "agent_id": "agt_034ywLOuKYCjR5w5Q59KRz",
      "agent_name": "agent name",
      "session_id": "ses_034cKnpq00MQYN3AkZWtMd",
      "trigger": "api",
      "channel": {
        "connection_id": "chcon_034UNYVNxd3k7NFOVSWyAe",
        "conversation_id": "conv_034UNYVNxd3k7BFPdmTECW",
        "thread_key": "thread key",
        "origin_message_id": "chmsg_034UNYVNxdRCAxtYiHCvOx",
        "reason": "direct_message",
        "silent_reason": "silent reason"
      },
      "status": "queued",
      "input": "What's due this week?",
      "output": "output",
      "usage": {
        "input_tokens": 1,
        "output_tokens": 1,
        "cache_read_input_tokens": 1,
        "cache_write_input_tokens": 1,
        "tool_calls": 1
      },
      "error": {
        "code": "code",
        "message": "message"
      },
      "created_at": "2026-10-04T21:04:11.000Z",
      "started_at": "2026-10-04T21:04:11.000Z",
      "finished_at": "2026-10-04T21:04:11.000Z",
      "workspace": {
        "id": "ws_034a8swzUzvsQ2inuZzZfA",
        "name": "Acme Corp",
        "slug": "acme",
        "environment": null
      }
    }
  ],
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Start a run on the agent's model, or its environment's default. With neither, 422 model_not_configured

POST/v1/workspaces/{ws}/agents/{agent}/runs

Console sessionAPI keystartRun

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
agentAgentIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Body

inputstringrequired

Returns

201 with data: Run

POST/v1/workspaces/{ws}/agents/{agent}/runs
curl -X POST https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/agents/agt_034ywLOuKYCjR5w5Q59KRz/runs \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "input": "What'\''s due this week?"
  }'
Response201
{
  "data": {
    "id": "run_034NRN3tk3efa42EcmTqpS",
    "workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
    "agent_id": "agt_034ywLOuKYCjR5w5Q59KRz",
    "agent_name": "agent name",
    "session_id": "ses_034cKnpq00MQYN3AkZWtMd",
    "trigger": "api",
    "channel": {
      "connection_id": "chcon_034UNYVNxd3k7NFOVSWyAe",
      "conversation_id": "conv_034UNYVNxd3k7BFPdmTECW",
      "thread_key": "thread key",
      "origin_message_id": "chmsg_034UNYVNxdRCAxtYiHCvOx",
      "reason": "direct_message",
      "silent_reason": "silent reason"
    },
    "status": "queued",
    "input": "What's due this week?",
    "output": "output",
    "usage": {
      "input_tokens": 1,
      "output_tokens": 1,
      "cache_read_input_tokens": 1,
      "cache_write_input_tokens": 1,
      "tool_calls": 1
    },
    "error": {
      "code": "code",
      "message": "message"
    },
    "created_at": "2026-10-04T21:04:11.000Z",
    "started_at": "2026-10-04T21:04:11.000Z",
    "finished_at": "2026-10-04T21:04:11.000Z"
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

A workspace's runs, newest first

GET/v1/workspaces/{ws}/runs

Console sessionAPI keylistRuns

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Query parameters

agent_idAgentId
Only this agent's runs. A malformed or unknown ID matches nothing.
status"queued" | "running" | "waiting_for_approval" | "completed" | …
cursorstring
limitinteger
Page size, 1 to 100 (default 25); values outside are clamped, and a non-integer means the default.

Returns

200 with data: Run[]

GET/v1/workspaces/{ws}/runs
curl https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/runs \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"
Response200
{
  "data": [
    {
      "id": "run_034NRN3tk3efa42EcmTqpS",
      "workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
      "agent_id": "agt_034ywLOuKYCjR5w5Q59KRz",
      "agent_name": "agent name",
      "session_id": "ses_034cKnpq00MQYN3AkZWtMd",
      "trigger": "api",
      "channel": {
        "connection_id": "chcon_034UNYVNxd3k7NFOVSWyAe",
        "conversation_id": "conv_034UNYVNxd3k7BFPdmTECW",
        "thread_key": "thread key",
        "origin_message_id": "chmsg_034UNYVNxdRCAxtYiHCvOx",
        "reason": "direct_message",
        "silent_reason": "silent reason"
      },
      "status": "queued",
      "input": "What's due this week?",
      "output": "output",
      "usage": {
        "input_tokens": 1,
        "output_tokens": 1,
        "cache_read_input_tokens": 1,
        "cache_write_input_tokens": 1,
        "tool_calls": 1
      },
      "error": {
        "code": "code",
        "message": "message"
      },
      "created_at": "2026-10-04T21:04:11.000Z",
      "started_at": "2026-10-04T21:04:11.000Z",
      "finished_at": "2026-10-04T21:04:11.000Z"
    }
  ],
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

A run

GET/v1/workspaces/{ws}/runs/{run}

Console sessionAPI keygetRun

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
runRunIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Returns

200 with data: Run

GET/v1/workspaces/{ws}/runs/{run}
curl https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/runs/run_034NRN3tk3efa42EcmTqpS \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"
Response200
{
  "data": {
    "id": "run_034NRN3tk3efa42EcmTqpS",
    "workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
    "agent_id": "agt_034ywLOuKYCjR5w5Q59KRz",
    "agent_name": "agent name",
    "session_id": "ses_034cKnpq00MQYN3AkZWtMd",
    "trigger": "api",
    "channel": {
      "connection_id": "chcon_034UNYVNxd3k7NFOVSWyAe",
      "conversation_id": "conv_034UNYVNxd3k7BFPdmTECW",
      "thread_key": "thread key",
      "origin_message_id": "chmsg_034UNYVNxdRCAxtYiHCvOx",
      "reason": "direct_message",
      "silent_reason": "silent reason"
    },
    "status": "queued",
    "input": "What's due this week?",
    "output": "output",
    "usage": {
      "input_tokens": 1,
      "output_tokens": 1,
      "cache_read_input_tokens": 1,
      "cache_write_input_tokens": 1,
      "tool_calls": 1
    },
    "error": {
      "code": "code",
      "message": "message"
    },
    "created_at": "2026-10-04T21:04:11.000Z",
    "started_at": "2026-10-04T21:04:11.000Z",
    "finished_at": "2026-10-04T21:04:11.000Z"
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

A run's timeline, in order

GET/v1/workspaces/{ws}/runs/{run}/events

Console sessionAPI keylistRunEvents

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
runRunIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Query parameters

afterinteger

Returns

200 with data: RunEvent[]

GET/v1/workspaces/{ws}/runs/{run}/events
curl https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/runs/run_034NRN3tk3efa42EcmTqpS/events \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"
Response200
{
  "data": [
    {
      "id": "rev_034NRN5TbBGHquQycqE0V2",
      "run_id": "run_034NRN3tk3efa42EcmTqpS",
      "workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
      "sequence": 1,
      "created_at": "2026-10-04T21:04:11.000Z",
      "type": "run.queued",
      "data": {}
    }
  ],
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Cancel a run

POST/v1/workspaces/{ws}/runs/{run}/cancel

Console sessionAPI keycancelRun

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
runRunIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Returns

200 with data: Run

POST/v1/workspaces/{ws}/runs/{run}/cancel
curl -X POST https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/runs/run_034NRN3tk3efa42EcmTqpS/cancel \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
Response200
{
  "data": {
    "id": "run_034NRN3tk3efa42EcmTqpS",
    "workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
    "agent_id": "agt_034ywLOuKYCjR5w5Q59KRz",
    "agent_name": "agent name",
    "session_id": "ses_034cKnpq00MQYN3AkZWtMd",
    "trigger": "api",
    "channel": {
      "connection_id": "chcon_034UNYVNxd3k7NFOVSWyAe",
      "conversation_id": "conv_034UNYVNxd3k7BFPdmTECW",
      "thread_key": "thread key",
      "origin_message_id": "chmsg_034UNYVNxdRCAxtYiHCvOx",
      "reason": "direct_message",
      "silent_reason": "silent reason"
    },
    "status": "queued",
    "input": "What's due this week?",
    "output": "output",
    "usage": {
      "input_tokens": 1,
      "output_tokens": 1,
      "cache_read_input_tokens": 1,
      "cache_write_input_tokens": 1,
      "tool_calls": 1
    },
    "error": {
      "code": "code",
      "message": "message"
    },
    "created_at": "2026-10-04T21:04:11.000Z",
    "started_at": "2026-10-04T21:04:11.000Z",
    "finished_at": "2026-10-04T21:04:11.000Z"
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Record a decision your product made; API keys only

POST/v1/workspaces/{ws}/runs/{run}/approvals

API keyresolveApproval

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
runRunIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Body

call_idToolCallIdrequired
decision"approved" | "denied"required
reasonstring

Returns

200 with data: Run

POST/v1/workspaces/{ws}/runs/{run}/approvals
curl -X POST https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/runs/run_034NRN3tk3efa42EcmTqpS/approvals \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "call_id": "call_034ptAVGI4F0rFleDY0wrs",
    "decision": "approved"
  }'
Response200
{
  "data": {
    "id": "run_034NRN3tk3efa42EcmTqpS",
    "workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
    "agent_id": "agt_034ywLOuKYCjR5w5Q59KRz",
    "agent_name": "agent name",
    "session_id": "ses_034cKnpq00MQYN3AkZWtMd",
    "trigger": "api",
    "channel": {
      "connection_id": "chcon_034UNYVNxd3k7NFOVSWyAe",
      "conversation_id": "conv_034UNYVNxd3k7BFPdmTECW",
      "thread_key": "thread key",
      "origin_message_id": "chmsg_034UNYVNxdRCAxtYiHCvOx",
      "reason": "direct_message",
      "silent_reason": "silent reason"
    },
    "status": "queued",
    "input": "What's due this week?",
    "output": "output",
    "usage": {
      "input_tokens": 1,
      "output_tokens": 1,
      "cache_read_input_tokens": 1,
      "cache_write_input_tokens": 1,
      "tool_calls": 1
    },
    "error": {
      "code": "code",
      "message": "message"
    },
    "created_at": "2026-10-04T21:04:11.000Z",
    "started_at": "2026-10-04T21:04:11.000Z",
    "finished_at": "2026-10-04T21:04:11.000Z"
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Audit log

The audit log

GET/v1/organizations/{org}/audit-events

Console sessionlistAuditEvents

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Query parameters

workspace_idWorkspaceId
Only this workspace's rows. A malformed or unknown ID matches nothing.
cursorstring
limitinteger
Page size, 1 to 100 (default 50); values outside are clamped, and a non-integer means the default.

Returns

200 with data: AuditEvent[]

GET/v1/organizations/{org}/audit-events
curl https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/audit-events \
  -H "Authorization: Bearer $CONSOLE_TOKEN"
Response200
{
  "data": [
    {
      "id": "aud_034yYKI6ssgOVE90WsIYKo",
      "organization_id": "org_034WrceamQGAwHgTod2dHN",
      "workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
      "workspace": {
        "id": "ws_034a8swzUzvsQ2inuZzZfA",
        "name": "Acme Corp",
        "slug": "acme",
        "environment": null
      },
      "environment": "sandbox",
      "actor": {
        "type": "user",
        "id": "id",
        "name": "Acme Corp"
      },
      "action": "action",
      "target": {
        "type": "type",
        "id": "id",
        "name": "Acme Corp"
      },
      "created_at": "2026-10-04T21:04:11.000Z"
    }
  ],
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Workspaces

Workspaces, searched and paged on the server

GET/v1/organizations/{org}/workspaces

Console sessionAPI keylistWorkspaces

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Query parameters

environmentEnvironment
qstring
sort"name" | "activity"
cursorstring
limitinteger
Page size, 1 to 100 (default 25); values outside are clamped, and a non-integer means the default.

Returns

200 with data: Workspace[]

GET/v1/organizations/{org}/workspaces
curl https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/workspaces \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"
Response200
{
  "data": [
    {
      "id": "ws_034a8swzUzvsQ2inuZzZfA",
      "organization_id": "org_034WrceamQGAwHgTod2dHN",
      "name": "Acme Corp",
      "slug": "acme",
      "environment": "sandbox",
      "external_id": "cus_1042",
      "created_at": "2026-10-04T21:04:11.000Z",
      "stats": {
        "agents": 1,
        "installations": 1,
        "runs_last_24h": 1
      }
    }
  ],
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Create a workspace in one environment

POST/v1/organizations/{org}/workspaces

Console sessionAPI keycreateWorkspace

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Body

namestringrequired
slugstringrequired
environmentEnvironmentrequired
external_idstring | nullrequired

Returns

201 with data: Workspace

POST/v1/organizations/{org}/workspaces
curl -X POST https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/workspaces \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme Corp",
    "slug": "acme",
    "environment": "sandbox",
    "external_id": "cus_1042"
  }'
Response201
{
  "data": {
    "id": "ws_034a8swzUzvsQ2inuZzZfA",
    "organization_id": "org_034WrceamQGAwHgTod2dHN",
    "name": "Acme Corp",
    "slug": "acme",
    "environment": "sandbox",
    "external_id": "cus_1042",
    "created_at": "2026-10-04T21:04:11.000Z",
    "stats": {
      "agents": 1,
      "installations": 1,
      "runs_last_24h": 1
    }
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

A workspace

GET/v1/workspaces/{ws}

Console sessionAPI keygetWorkspace

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Returns

200 with data: Workspace

GET/v1/workspaces/{ws}
curl https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"
Response200
{
  "data": {
    "id": "ws_034a8swzUzvsQ2inuZzZfA",
    "organization_id": "org_034WrceamQGAwHgTod2dHN",
    "name": "Acme Corp",
    "slug": "acme",
    "environment": "sandbox",
    "external_id": "cus_1042",
    "created_at": "2026-10-04T21:04:11.000Z",
    "stats": {
      "agents": 1,
      "installations": 1,
      "runs_last_24h": 1
    }
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Rename a workspace or change its External ID

PATCH/v1/workspaces/{ws}

Console sessionAPI keyupdateWorkspace

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Body

namestring
external_idstring | null

Returns

200 with data: Workspace

PATCH/v1/workspaces/{ws}
curl -X PATCH https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme Corp",
    "external_id": "cus_1042"
  }'
Response200
{
  "data": {
    "id": "ws_034a8swzUzvsQ2inuZzZfA",
    "organization_id": "org_034WrceamQGAwHgTod2dHN",
    "name": "Acme Corp",
    "slug": "acme",
    "environment": "sandbox",
    "external_id": "cus_1042",
    "created_at": "2026-10-04T21:04:11.000Z",
    "stats": {
      "agents": 1,
      "installations": 1,
      "runs_last_24h": 1
    }
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Delete a workspace and everything in it

DELETE/v1/workspaces/{ws}

Console sessionAPI keydeleteWorkspace

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Returns

204 with an empty body

DELETE/v1/workspaces/{ws}
curl -X DELETE https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"

Apps

The organization's app catalog

GET/v1/organizations/{org}/apps

Console sessionAPI keylistOrganizationApps

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Returns

200 with data: App[]

GET/v1/organizations/{org}/apps
curl https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/apps \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"
Response200
{
  "data": [
    {
      "id": "app_034yLNzn9tcN2FM4UEOmrQ",
      "organization_id": "org_034WrceamQGAwHgTod2dHN",
      "owner_workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
      "owner_scope": "organization",
      "kind": "mcp",
      "name": "Acme Corp",
      "key": "linear",
      "description": "Lists the issues assigned to you.",
      "icon": {
        "glyph": "glyph",
        "color": "color"
      },
      "auth": {
        "type": null,
        "authorize_url": null,
        "token_url": null,
        "issuer": null,
        "available_scopes": null,
        "pkce": null,
        "identity_url": null
      },
      "tools": [
        {
          "name": null,
          "title": null,
          "description": null,
          "effect": null
        }
      ],
      "version": 1,
      "configurations": [
        {
          "environment": null,
          "status": null,
          "version": null,
          "updated_at": null
        }
      ],
      "installation_count": 3,
      "created_at": "2026-10-04T21:04:11.000Z",
      "updated_at": "2026-10-04T21:04:11.000Z"
    }
  ],
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Add an app to the catalog

POST/v1/organizations/{org}/apps

Console sessionAPI keycreateOrganizationApp

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Body

kind"mcp"required
namestringrequired
keystringrequired
descriptionstringrequired
auth_type"oauth2" | "mcp_oauth" | "token"required

Returns

201 with data: App

POST/v1/organizations/{org}/apps
curl -X POST https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/apps \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "kind": "mcp",
    "name": "Acme Corp",
    "key": "linear",
    "description": "Lists the issues assigned to you.",
    "auth_type": "oauth2"
  }'
Response201
{
  "data": {
    "id": "app_034yLNzn9tcN2FM4UEOmrQ",
    "organization_id": "org_034WrceamQGAwHgTod2dHN",
    "owner_workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
    "owner_scope": "organization",
    "kind": "mcp",
    "name": "Acme Corp",
    "key": "linear",
    "description": "Lists the issues assigned to you.",
    "icon": {
      "glyph": "glyph",
      "color": "color"
    },
    "auth": {
      "type": "oauth2",
      "authorize_url": "https://example.com/asset",
      "token_url": "https://example.com/asset",
      "issuer": "issuer",
      "available_scopes": [],
      "pkce": true,
      "identity_url": "https://example.com/asset"
    },
    "tools": [
      {
        "name": "Acme Corp",
        "title": "Plan my week",
        "description": "Lists the issues assigned to you.",
        "effect": "read"
      }
    ],
    "version": 1,
    "configurations": [
      {
        "environment": null,
        "status": "unconfigured",
        "version": 1,
        "updated_at": null
      }
    ],
    "installation_count": 3,
    "created_at": "2026-10-04T21:04:11.000Z",
    "updated_at": "2026-10-04T21:04:11.000Z"
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

A catalog app

GET/v1/organizations/{org}/apps/{app}

Console sessionAPI keygetOrganizationApp

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
appAppIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Returns

200 with data: App

GET/v1/organizations/{org}/apps/{app}
curl https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/apps/app_034yLNzn9tcN2FM4UEOmrQ \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"
Response200
{
  "data": {
    "id": "app_034yLNzn9tcN2FM4UEOmrQ",
    "organization_id": "org_034WrceamQGAwHgTod2dHN",
    "owner_workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
    "owner_scope": "organization",
    "kind": "mcp",
    "name": "Acme Corp",
    "key": "linear",
    "description": "Lists the issues assigned to you.",
    "icon": {
      "glyph": "glyph",
      "color": "color"
    },
    "auth": {
      "type": "oauth2",
      "authorize_url": "https://example.com/asset",
      "token_url": "https://example.com/asset",
      "issuer": "issuer",
      "available_scopes": [],
      "pkce": true,
      "identity_url": "https://example.com/asset"
    },
    "tools": [
      {
        "name": "Acme Corp",
        "title": "Plan my week",
        "description": "Lists the issues assigned to you.",
        "effect": "read"
      }
    ],
    "version": 1,
    "configurations": [
      {
        "environment": null,
        "status": "unconfigured",
        "version": 1,
        "updated_at": null
      }
    ],
    "installation_count": 3,
    "created_at": "2026-10-04T21:04:11.000Z",
    "updated_at": "2026-10-04T21:04:11.000Z"
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Rename or describe a catalog app, or set how it authenticates

PATCH/v1/organizations/{org}/apps/{app}

Console sessionAPI keyupdateOrganizationApp

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
appAppIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Body

namestring
descriptionstring
authAuthTemplate

Returns

200 with data: App

PATCH/v1/organizations/{org}/apps/{app}
curl -X PATCH https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/apps/app_034yLNzn9tcN2FM4UEOmrQ \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme Corp",
    "description": "Lists the issues assigned to you."
  }'
Response200
{
  "data": {
    "id": "app_034yLNzn9tcN2FM4UEOmrQ",
    "organization_id": "org_034WrceamQGAwHgTod2dHN",
    "owner_workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
    "owner_scope": "organization",
    "kind": "mcp",
    "name": "Acme Corp",
    "key": "linear",
    "description": "Lists the issues assigned to you.",
    "icon": {
      "glyph": "glyph",
      "color": "color"
    },
    "auth": {
      "type": "oauth2",
      "authorize_url": "https://example.com/asset",
      "token_url": "https://example.com/asset",
      "issuer": "issuer",
      "available_scopes": [],
      "pkce": true,
      "identity_url": "https://example.com/asset"
    },
    "tools": [
      {
        "name": "Acme Corp",
        "title": "Plan my week",
        "description": "Lists the issues assigned to you.",
        "effect": "read"
      }
    ],
    "version": 1,
    "configurations": [
      {
        "environment": null,
        "status": "unconfigured",
        "version": 1,
        "updated_at": null
      }
    ],
    "installation_count": 3,
    "created_at": "2026-10-04T21:04:11.000Z",
    "updated_at": "2026-10-04T21:04:11.000Z"
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

A catalog app's client configuration in one environment

GET/v1/organizations/{org}/apps/{app}/environments/{env}/configuration

Console sessionAPI keygetOrganizationAppConfiguration

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
appAppIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
envEnvironmentrequired

Returns

200 with data: ClientConfiguration

GET/v1/organizations/{org}/apps/{app}/environments/{env}/configuration
curl https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/apps/app_034yLNzn9tcN2FM4UEOmrQ/environments/sandbox/configuration \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"
Response200
{
  "data": {
    "app_id": "app_034yLNzn9tcN2FM4UEOmrQ",
    "environment": "sandbox",
    "status": "unconfigured",
    "version": 1,
    "mcp": {
      "server_url": "https://example.com/asset",
      "transport": "streamable_http"
    },
    "oauth": {
      "client_id": "client id",
      "client_secret": {
        "set": true,
        "last4": "last4",
        "updated_at": null
      },
      "redirect_uri": "redirect uri",
      "scopes": [
        "scopes"
      ]
    },
    "missing": [
      "missing"
    ],
    "updated_at": "2026-10-04T21:04:11.000Z",
    "updated_by": {
      "id": "usr_0344un49YpnirMXyqfkTed",
      "name": "Acme Corp",
      "email": "ada@example.com",
      "avatar_url": "https://example.com/asset"
    }
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Set a catalog app's client configuration in one environment

PUT/v1/organizations/{org}/apps/{app}/environments/{env}/configuration

Console sessionAPI keyupdateOrganizationAppConfiguration

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
appAppIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
envEnvironmentrequired

Body

mcp_server_urlstring | null
oauth_client_idstring | null
oauth_client_secretstring
oauth_scopesstring[]

Returns

200 with data: ClientConfiguration

PUT/v1/organizations/{org}/apps/{app}/environments/{env}/configuration
curl -X PUT https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/apps/app_034yLNzn9tcN2FM4UEOmrQ/environments/sandbox/configuration \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "mcp_server_url": "https://example.com/asset",
    "oauth_client_id": "oauth client id"
  }'
Response200
{
  "data": {
    "app_id": "app_034yLNzn9tcN2FM4UEOmrQ",
    "environment": "sandbox",
    "status": "unconfigured",
    "version": 1,
    "mcp": {
      "server_url": "https://example.com/asset",
      "transport": "streamable_http"
    },
    "oauth": {
      "client_id": "client id",
      "client_secret": {
        "set": true,
        "last4": "last4",
        "updated_at": null
      },
      "redirect_uri": "redirect uri",
      "scopes": [
        "scopes"
      ]
    },
    "missing": [
      "missing"
    ],
    "updated_at": "2026-10-04T21:04:11.000Z",
    "updated_by": {
      "id": "usr_0344un49YpnirMXyqfkTed",
      "name": "Acme Corp",
      "email": "ada@example.com",
      "avatar_url": "https://example.com/asset"
    }
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Installations of a catalog app across workspaces

GET/v1/organizations/{org}/apps/{app}/installations

Console sessionAPI keylistOrganizationAppInstallations

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
appAppIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Query parameters

environmentEnvironment
cursorstring
limitinteger
Page size, 1 to 100 (default 25); values outside are clamped, and a non-integer means the default.

Returns

200 with data: AppInstallationRef[]

GET/v1/organizations/{org}/apps/{app}/installations
curl https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/apps/app_034yLNzn9tcN2FM4UEOmrQ/installations \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"
Response200
{
  "data": [
    {
      "installation": {
        "id": "inst_0342dcXGvZf3hgl01YboFc",
        "workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
        "app": null,
        "short_id": null,
        "label": "label",
        "status": "connected",
        "configuration_version": 1,
        "connection": null,
        "grant_count": 3,
        "created_at": null,
        "updated_at": null
      },
      "workspace": {
        "id": "ws_034a8swzUzvsQ2inuZzZfA",
        "name": "Acme Corp",
        "slug": "acme",
        "environment": null
      }
    }
  ],
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

The workspace's own apps

GET/v1/workspaces/{ws}/apps

Console sessionAPI keylistWorkspaceApps

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Returns

200 with data: App[]

GET/v1/workspaces/{ws}/apps
curl https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/apps \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"
Response200
{
  "data": [
    {
      "id": "app_034yLNzn9tcN2FM4UEOmrQ",
      "organization_id": "org_034WrceamQGAwHgTod2dHN",
      "owner_workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
      "owner_scope": "organization",
      "kind": "mcp",
      "name": "Acme Corp",
      "key": "linear",
      "description": "Lists the issues assigned to you.",
      "icon": {
        "glyph": "glyph",
        "color": "color"
      },
      "auth": {
        "type": null,
        "authorize_url": null,
        "token_url": null,
        "issuer": null,
        "available_scopes": null,
        "pkce": null,
        "identity_url": null
      },
      "tools": [
        {
          "name": null,
          "title": null,
          "description": null,
          "effect": null
        }
      ],
      "version": 1,
      "configurations": [
        {
          "environment": null,
          "status": null,
          "version": null,
          "updated_at": null
        }
      ],
      "installation_count": 3,
      "created_at": "2026-10-04T21:04:11.000Z",
      "updated_at": "2026-10-04T21:04:11.000Z"
    }
  ],
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Add an app only this workspace can use

POST/v1/workspaces/{ws}/apps

Console sessionAPI keycreateWorkspaceApp

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Body

kind"mcp"required
namestringrequired
keystringrequired
descriptionstringrequired
auth_type"oauth2" | "mcp_oauth" | "token"required

Returns

201 with data: App

POST/v1/workspaces/{ws}/apps
curl -X POST https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/apps \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "kind": "mcp",
    "name": "Acme Corp",
    "key": "linear",
    "description": "Lists the issues assigned to you.",
    "auth_type": "oauth2"
  }'
Response201
{
  "data": {
    "id": "app_034yLNzn9tcN2FM4UEOmrQ",
    "organization_id": "org_034WrceamQGAwHgTod2dHN",
    "owner_workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
    "owner_scope": "organization",
    "kind": "mcp",
    "name": "Acme Corp",
    "key": "linear",
    "description": "Lists the issues assigned to you.",
    "icon": {
      "glyph": "glyph",
      "color": "color"
    },
    "auth": {
      "type": "oauth2",
      "authorize_url": "https://example.com/asset",
      "token_url": "https://example.com/asset",
      "issuer": "issuer",
      "available_scopes": [],
      "pkce": true,
      "identity_url": "https://example.com/asset"
    },
    "tools": [
      {
        "name": "Acme Corp",
        "title": "Plan my week",
        "description": "Lists the issues assigned to you.",
        "effect": "read"
      }
    ],
    "version": 1,
    "configurations": [
      {
        "environment": null,
        "status": "unconfigured",
        "version": 1,
        "updated_at": null
      }
    ],
    "installation_count": 3,
    "created_at": "2026-10-04T21:04:11.000Z",
    "updated_at": "2026-10-04T21:04:11.000Z"
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

A workspace app

GET/v1/workspaces/{ws}/apps/{app}

Console sessionAPI keygetWorkspaceApp

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
appAppIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Returns

200 with data: App

GET/v1/workspaces/{ws}/apps/{app}
curl https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/apps/app_034yLNzn9tcN2FM4UEOmrQ \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"
Response200
{
  "data": {
    "id": "app_034yLNzn9tcN2FM4UEOmrQ",
    "organization_id": "org_034WrceamQGAwHgTod2dHN",
    "owner_workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
    "owner_scope": "organization",
    "kind": "mcp",
    "name": "Acme Corp",
    "key": "linear",
    "description": "Lists the issues assigned to you.",
    "icon": {
      "glyph": "glyph",
      "color": "color"
    },
    "auth": {
      "type": "oauth2",
      "authorize_url": "https://example.com/asset",
      "token_url": "https://example.com/asset",
      "issuer": "issuer",
      "available_scopes": [],
      "pkce": true,
      "identity_url": "https://example.com/asset"
    },
    "tools": [
      {
        "name": "Acme Corp",
        "title": "Plan my week",
        "description": "Lists the issues assigned to you.",
        "effect": "read"
      }
    ],
    "version": 1,
    "configurations": [
      {
        "environment": null,
        "status": "unconfigured",
        "version": 1,
        "updated_at": null
      }
    ],
    "installation_count": 3,
    "created_at": "2026-10-04T21:04:11.000Z",
    "updated_at": "2026-10-04T21:04:11.000Z"
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Rename or describe a workspace app, or set how it authenticates

PATCH/v1/workspaces/{ws}/apps/{app}

Console sessionAPI keyupdateWorkspaceApp

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
appAppIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Body

namestring
descriptionstring
authAuthTemplate

Returns

200 with data: App

PATCH/v1/workspaces/{ws}/apps/{app}
curl -X PATCH https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/apps/app_034yLNzn9tcN2FM4UEOmrQ \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme Corp",
    "description": "Lists the issues assigned to you."
  }'
Response200
{
  "data": {
    "id": "app_034yLNzn9tcN2FM4UEOmrQ",
    "organization_id": "org_034WrceamQGAwHgTod2dHN",
    "owner_workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
    "owner_scope": "organization",
    "kind": "mcp",
    "name": "Acme Corp",
    "key": "linear",
    "description": "Lists the issues assigned to you.",
    "icon": {
      "glyph": "glyph",
      "color": "color"
    },
    "auth": {
      "type": "oauth2",
      "authorize_url": "https://example.com/asset",
      "token_url": "https://example.com/asset",
      "issuer": "issuer",
      "available_scopes": [],
      "pkce": true,
      "identity_url": "https://example.com/asset"
    },
    "tools": [
      {
        "name": "Acme Corp",
        "title": "Plan my week",
        "description": "Lists the issues assigned to you.",
        "effect": "read"
      }
    ],
    "version": 1,
    "configurations": [
      {
        "environment": null,
        "status": "unconfigured",
        "version": 1,
        "updated_at": null
      }
    ],
    "installation_count": 3,
    "created_at": "2026-10-04T21:04:11.000Z",
    "updated_at": "2026-10-04T21:04:11.000Z"
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

A workspace app's client configuration

GET/v1/workspaces/{ws}/apps/{app}/configuration

Console sessionAPI keygetWorkspaceAppConfiguration

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
appAppIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Returns

200 with data: ClientConfiguration

GET/v1/workspaces/{ws}/apps/{app}/configuration
curl https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/apps/app_034yLNzn9tcN2FM4UEOmrQ/configuration \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"
Response200
{
  "data": {
    "app_id": "app_034yLNzn9tcN2FM4UEOmrQ",
    "environment": "sandbox",
    "status": "unconfigured",
    "version": 1,
    "mcp": {
      "server_url": "https://example.com/asset",
      "transport": "streamable_http"
    },
    "oauth": {
      "client_id": "client id",
      "client_secret": {
        "set": true,
        "last4": "last4",
        "updated_at": null
      },
      "redirect_uri": "redirect uri",
      "scopes": [
        "scopes"
      ]
    },
    "missing": [
      "missing"
    ],
    "updated_at": "2026-10-04T21:04:11.000Z",
    "updated_by": {
      "id": "usr_0344un49YpnirMXyqfkTed",
      "name": "Acme Corp",
      "email": "ada@example.com",
      "avatar_url": "https://example.com/asset"
    }
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Set a workspace app's client configuration

PUT/v1/workspaces/{ws}/apps/{app}/configuration

Console sessionAPI keyupdateWorkspaceAppConfiguration

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
appAppIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Body

mcp_server_urlstring | null
oauth_client_idstring | null
oauth_client_secretstring
oauth_scopesstring[]

Returns

200 with data: ClientConfiguration

PUT/v1/workspaces/{ws}/apps/{app}/configuration
curl -X PUT https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/apps/app_034yLNzn9tcN2FM4UEOmrQ/configuration \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "mcp_server_url": "https://example.com/asset",
    "oauth_client_id": "oauth client id"
  }'
Response200
{
  "data": {
    "app_id": "app_034yLNzn9tcN2FM4UEOmrQ",
    "environment": "sandbox",
    "status": "unconfigured",
    "version": 1,
    "mcp": {
      "server_url": "https://example.com/asset",
      "transport": "streamable_http"
    },
    "oauth": {
      "client_id": "client id",
      "client_secret": {
        "set": true,
        "last4": "last4",
        "updated_at": null
      },
      "redirect_uri": "redirect uri",
      "scopes": [
        "scopes"
      ]
    },
    "missing": [
      "missing"
    ],
    "updated_at": "2026-10-04T21:04:11.000Z",
    "updated_by": {
      "id": "usr_0344un49YpnirMXyqfkTed",
      "name": "Acme Corp",
      "email": "ada@example.com",
      "avatar_url": "https://example.com/asset"
    }
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Apps ready to install in this workspace

GET/v1/workspaces/{ws}/available-apps

Console sessionAPI keylistAvailableApps

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Returns

200 with data: AvailableApp[]

GET/v1/workspaces/{ws}/available-apps
curl https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/available-apps \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"
Response200
{
  "data": [
    {
      "app": {
        "id": "app_034yLNzn9tcN2FM4UEOmrQ",
        "organization_id": "org_034WrceamQGAwHgTod2dHN",
        "owner_workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
        "owner_scope": "organization",
        "kind": "mcp",
        "name": "Acme Corp",
        "key": null,
        "description": "Lists the issues assigned to you.",
        "icon": null,
        "auth": null,
        "tools": [],
        "version": 1,
        "configurations": [],
        "installation_count": 3,
        "created_at": null,
        "updated_at": null
      },
      "configuration": {
        "environment": null,
        "status": "unconfigured",
        "version": 1,
        "updated_at": null
      }
    }
  ],
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Tool policy

The organization's tool policy

GET/v1/organizations/{org}/tool-policy

Console sessionAPI keygetToolPolicy

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Returns

200 with data: ToolPolicy

GET/v1/organizations/{org}/tool-policy
curl https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/tool-policy \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"
Response200
{
  "data": {
    "organization_id": "org_034WrceamQGAwHgTod2dHN",
    "mode": "manual",
    "new_tool_level": "approve",
    "updated_at": "2026-10-04T21:04:11.000Z",
    "updated_by": {
      "id": "usr_0344un49YpnirMXyqfkTed",
      "name": "Acme Corp",
      "email": "ada@example.com",
      "avatar_url": "https://example.com/asset"
    }
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Set the organization's tool policy; owners and admins

PUT/v1/organizations/{org}/tool-policy

Console sessionupdateToolPolicy

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Body

mode"manual"required
new_tool_level"approve" | "deny"required

Returns

200 with data: ToolPolicy

PUT/v1/organizations/{org}/tool-policy
curl -X PUT https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/tool-policy \
  -H "Authorization: Bearer $CONSOLE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "mode": "manual",
    "new_tool_level": "approve"
  }'
Response200
{
  "data": {
    "organization_id": "org_034WrceamQGAwHgTod2dHN",
    "mode": "manual",
    "new_tool_level": "approve",
    "updated_at": "2026-10-04T21:04:11.000Z",
    "updated_by": {
      "id": "usr_0344un49YpnirMXyqfkTed",
      "name": "Acme Corp",
      "email": "ada@example.com",
      "avatar_url": "https://example.com/asset"
    }
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

The organization's levels for a catalog app's tools, a page at a time by name

GET/v1/organizations/{org}/apps/{app}/tool-levels

Console sessionAPI keylistAppToolLevels

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
appAppIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Query parameters

cursorstring
limitinteger
Page size, 1 to 100 (default 25); values outside are clamped, and a non-integer means the default.

Returns

200 with data: AppToolLevel[]

GET/v1/organizations/{org}/apps/{app}/tool-levels
curl https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/apps/app_034yLNzn9tcN2FM4UEOmrQ/tool-levels \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"
Response200
{
  "data": [
    {
      "app_id": "app_034yLNzn9tcN2FM4UEOmrQ",
      "tool": "list_issues",
      "level": "allow",
      "confirmed": true,
      "destructive": true,
      "updated_at": "2026-10-04T21:04:11.000Z",
      "updated_by": {
        "id": "usr_0344un49YpnirMXyqfkTed",
        "name": "Acme Corp",
        "email": "ada@example.com",
        "avatar_url": "https://example.com/asset"
      }
    }
  ],
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Set levels for a catalog app's tools, by name; owners and admins

PATCH/v1/organizations/{org}/apps/{app}/tool-levels

Console sessionupdateAppToolLevels

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
appAppIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Body

levelsobject[]required

Returns

200 with data: AppToolLevel[]

PATCH/v1/organizations/{org}/apps/{app}/tool-levels
curl -X PATCH https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/apps/app_034yLNzn9tcN2FM4UEOmrQ/tool-levels \
  -H "Authorization: Bearer $CONSOLE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "levels": [
      {
        "tool": "list_issues",
        "level": "allow"
      }
    ]
  }'
Response200
{
  "data": [
    {
      "app_id": "app_034yLNzn9tcN2FM4UEOmrQ",
      "tool": "list_issues",
      "level": "allow",
      "confirmed": true,
      "destructive": true,
      "updated_at": "2026-10-04T21:04:11.000Z",
      "updated_by": {
        "id": "usr_0344un49YpnirMXyqfkTed",
        "name": "Acme Corp",
        "email": "ada@example.com",
        "avatar_url": "https://example.com/asset"
      }
    }
  ],
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Installations

Connected accounts in a workspace

GET/v1/workspaces/{ws}/installations

Console sessionAPI keylistInstallations

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Returns

200 with data: Installation[]

GET/v1/workspaces/{ws}/installations
curl https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/installations \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"
Response200
{
  "data": [
    {
      "id": "inst_0342dcXGvZf3hgl01YboFc",
      "workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
      "app": {
        "id": "app_034yLNzn9tcN2FM4UEOmrQ",
        "name": "Acme Corp",
        "key": null,
        "owner_scope": "organization",
        "icon": null,
        "auth_type": "oauth2"
      },
      "short_id": "k7qmxa",
      "label": "label",
      "status": "connected",
      "configuration_version": 1,
      "connection": {
        "account": null,
        "granted_scopes": [],
        "credential_version": 1,
        "connected_at": null,
        "expires_at": null
      },
      "grant_count": 3,
      "created_at": "2026-10-04T21:04:11.000Z",
      "updated_at": "2026-10-04T21:04:11.000Z"
    }
  ],
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

An installation

GET/v1/workspaces/{ws}/installations/{inst}

Console sessionAPI keygetInstallation

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
instInstallationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Returns

200 with data: Installation

GET/v1/workspaces/{ws}/installations/{inst}
curl https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/installations/inst_0342dcXGvZf3hgl01YboFc \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"
Response200
{
  "data": {
    "id": "inst_0342dcXGvZf3hgl01YboFc",
    "workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
    "app": {
      "id": "app_034yLNzn9tcN2FM4UEOmrQ",
      "name": "Acme Corp",
      "key": "linear",
      "owner_scope": "organization",
      "icon": {
        "glyph": null,
        "color": null
      },
      "auth_type": "oauth2"
    },
    "short_id": "k7qmxa",
    "label": "label",
    "status": "connected",
    "configuration_version": 1,
    "connection": {
      "account": {
        "external_id": null,
        "display_name": null,
        "email": null
      },
      "granted_scopes": [
        "granted scopes"
      ],
      "credential_version": 1,
      "connected_at": "2026-10-04T21:04:11.000Z",
      "expires_at": "2026-10-04T21:04:11.000Z"
    },
    "grant_count": 3,
    "created_at": "2026-10-04T21:04:11.000Z",
    "updated_at": "2026-10-04T21:04:11.000Z"
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Rename an installation

PATCH/v1/workspaces/{ws}/installations/{inst}

Console sessionAPI keyupdateInstallation

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
instInstallationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Body

labelstringrequired

Returns

200 with data: Installation

PATCH/v1/workspaces/{ws}/installations/{inst}
curl -X PATCH https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/installations/inst_0342dcXGvZf3hgl01YboFc \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "label": "label"
  }'
Response200
{
  "data": {
    "id": "inst_0342dcXGvZf3hgl01YboFc",
    "workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
    "app": {
      "id": "app_034yLNzn9tcN2FM4UEOmrQ",
      "name": "Acme Corp",
      "key": "linear",
      "owner_scope": "organization",
      "icon": {
        "glyph": null,
        "color": null
      },
      "auth_type": "oauth2"
    },
    "short_id": "k7qmxa",
    "label": "label",
    "status": "connected",
    "configuration_version": 1,
    "connection": {
      "account": {
        "external_id": null,
        "display_name": null,
        "email": null
      },
      "granted_scopes": [
        "granted scopes"
      ],
      "credential_version": 1,
      "connected_at": "2026-10-04T21:04:11.000Z",
      "expires_at": "2026-10-04T21:04:11.000Z"
    },
    "grant_count": 3,
    "created_at": "2026-10-04T21:04:11.000Z",
    "updated_at": "2026-10-04T21:04:11.000Z"
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Delete an installation, its credential and its grants

DELETE/v1/workspaces/{ws}/installations/{inst}

Console sessionAPI keydeleteInstallation

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
instInstallationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Returns

204 with an empty body

DELETE/v1/workspaces/{ws}/installations/{inst}
curl -X DELETE https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/installations/inst_0342dcXGvZf3hgl01YboFc \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"

Stop using an installation; its grants are kept

POST/v1/workspaces/{ws}/installations/{inst}/disconnect

Console sessionAPI keydisconnectInstallation

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
instInstallationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Returns

200 with data: Installation

POST/v1/workspaces/{ws}/installations/{inst}/disconnect
curl -X POST https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/installations/inst_0342dcXGvZf3hgl01YboFc/disconnect \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
Response200
{
  "data": {
    "id": "inst_0342dcXGvZf3hgl01YboFc",
    "workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
    "app": {
      "id": "app_034yLNzn9tcN2FM4UEOmrQ",
      "name": "Acme Corp",
      "key": "linear",
      "owner_scope": "organization",
      "icon": {
        "glyph": null,
        "color": null
      },
      "auth_type": "oauth2"
    },
    "short_id": "k7qmxa",
    "label": "label",
    "status": "connected",
    "configuration_version": 1,
    "connection": {
      "account": {
        "external_id": null,
        "display_name": null,
        "email": null
      },
      "granted_scopes": [
        "granted scopes"
      ],
      "credential_version": 1,
      "connected_at": "2026-10-04T21:04:11.000Z",
      "expires_at": "2026-10-04T21:04:11.000Z"
    },
    "grant_count": 3,
    "created_at": "2026-10-04T21:04:11.000Z",
    "updated_at": "2026-10-04T21:04:11.000Z"
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Tools an installation's app listed, a page at a time by name

GET/v1/workspaces/{ws}/installations/{inst}/tools

Console sessionAPI keylistInstallationTools

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
instInstallationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Query parameters

cursorstring
limitinteger
Page size, 1 to 100 (default 25); values outside are clamped, and a non-integer means the default.

Returns

200 with data: InstallationTool[]

GET/v1/workspaces/{ws}/installations/{inst}/tools
curl https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/installations/inst_0342dcXGvZf3hgl01YboFc/tools \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"
Response200
{
  "data": [
    {
      "name": "Acme Corp",
      "effect": "read",
      "status": "current",
      "pinned": {
        "title": "Plan my week",
        "description": "Lists the issues assigned to you.",
        "input_schema": {},
        "output_schema": {},
        "annotations": {}
      },
      "pinned_hash": "pinned hash",
      "latest": {
        "title": "Plan my week",
        "description": "Lists the issues assigned to you.",
        "input_schema": {},
        "output_schema": {},
        "annotations": {}
      },
      "latest_hash": "latest hash",
      "first_seen_at": "2026-10-04T21:04:11.000Z",
      "seen_at": "2026-10-04T21:04:11.000Z",
      "changed_at": "2026-10-04T21:04:11.000Z",
      "gone_at": "2026-10-04T21:04:11.000Z"
    }
  ],
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

List a connected installation's tools again

POST/v1/workspaces/{ws}/installations/{inst}/refresh-tools

Console sessionAPI keyrefreshInstallationTools

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
instInstallationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Returns

200 with data: Installation

POST/v1/workspaces/{ws}/installations/{inst}/refresh-tools
curl -X POST https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/installations/inst_0342dcXGvZf3hgl01YboFc/refresh-tools \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
Response200
{
  "data": {
    "id": "inst_0342dcXGvZf3hgl01YboFc",
    "workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
    "app": {
      "id": "app_034yLNzn9tcN2FM4UEOmrQ",
      "name": "Acme Corp",
      "key": "linear",
      "owner_scope": "organization",
      "icon": {
        "glyph": null,
        "color": null
      },
      "auth_type": "oauth2"
    },
    "short_id": "k7qmxa",
    "label": "label",
    "status": "connected",
    "configuration_version": 1,
    "connection": {
      "account": {
        "external_id": null,
        "display_name": null,
        "email": null
      },
      "granted_scopes": [
        "granted scopes"
      ],
      "credential_version": 1,
      "connected_at": "2026-10-04T21:04:11.000Z",
      "expires_at": "2026-10-04T21:04:11.000Z"
    },
    "grant_count": 3,
    "created_at": "2026-10-04T21:04:11.000Z",
    "updated_at": "2026-10-04T21:04:11.000Z"
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Accept a changed tool's latest definition; owners and admins

POST/v1/workspaces/{ws}/installations/{inst}/accept-tool-change

Console sessionAPI keyacceptToolChange

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
instInstallationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Body

namestringrequired
latest_hashstringrequired

Returns

200 with data: InstallationTool

POST/v1/workspaces/{ws}/installations/{inst}/accept-tool-change
curl -X POST https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/installations/inst_0342dcXGvZf3hgl01YboFc/accept-tool-change \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme Corp",
    "latest_hash": "latest hash"
  }'
Response200
{
  "data": {
    "name": "Acme Corp",
    "effect": "read",
    "status": "current",
    "pinned": {
      "title": "Plan my week",
      "description": "Lists the issues assigned to you.",
      "input_schema": {},
      "output_schema": {},
      "annotations": {}
    },
    "pinned_hash": "pinned hash",
    "latest": {
      "title": "Plan my week",
      "description": "Lists the issues assigned to you.",
      "input_schema": {},
      "output_schema": {},
      "annotations": {}
    },
    "latest_hash": "latest hash",
    "first_seen_at": "2026-10-04T21:04:11.000Z",
    "seen_at": "2026-10-04T21:04:11.000Z",
    "changed_at": "2026-10-04T21:04:11.000Z",
    "gone_at": "2026-10-04T21:04:11.000Z"
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Connect

A workspace's Connect sessions

GET/v1/workspaces/{ws}/connect-sessions

Console sessionAPI keylistConnectSessions

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Returns

200 with data: ConnectSession[]

GET/v1/workspaces/{ws}/connect-sessions
curl https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/connect-sessions \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"
Response200
{
  "data": [
    {
      "id": "cs_034U88ZkASIVJkEla9Uh7j",
      "workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
      "environment": "sandbox",
      "app": {
        "id": "app_034yLNzn9tcN2FM4UEOmrQ",
        "name": "Acme Corp",
        "key": null,
        "owner_scope": "organization",
        "icon": null,
        "auth_type": "oauth2"
      },
      "target": {
        "kind": "channel_app_manager",
        "provider": null,
        "manager": "chmgr_034UNYVNxdX7o7BFB4Y0u2"
      },
      "intent": "create",
      "installation_id": "inst_0342dcXGvZf3hgl01YboFc",
      "label": "label",
      "status": "pending",
      "return_url": "https://example.com/settings/integrations",
      "created_at": "2026-10-04T21:04:11.000Z",
      "expires_at": "2026-10-04T21:04:11.000Z",
      "completed_at": "2026-10-04T21:04:11.000Z",
      "failure_code": "failure code",
      "auth": {
        "type": null,
        "authorize_url": null,
        "token_url": null,
        "issuer": null,
        "available_scopes": null,
        "pkce": null,
        "identity_url": null
      },
      "requested_scopes": [
        "requested scopes"
      ],
      "expected_account": {
        "external_id": "cus_1042",
        "display_name": "display name",
        "email": "ada@example.com"
      }
    }
  ],
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Start Connect; the response's url is the hosted page, shown once

POST/v1/workspaces/{ws}/connect-sessions

Console sessionAPI keyShows a secret oncecreateConnectSession

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Returns

201 with data: CreatedConnectSession

POST/v1/workspaces/{ws}/connect-sessions
curl -X POST https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/connect-sessions \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
Response201
{
  "data": {
    "id": "cs_034U88ZkASIVJkEla9Uh7j",
    "workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
    "environment": "sandbox",
    "app": {
      "id": "app_034yLNzn9tcN2FM4UEOmrQ",
      "name": "Acme Corp",
      "key": "linear",
      "owner_scope": "organization",
      "icon": {
        "glyph": null,
        "color": null
      },
      "auth_type": "oauth2"
    },
    "target": {
      "kind": "channel_app_manager",
      "provider": "slack",
      "manager": "chmgr_034UNYVNxdX7o7BFB4Y0u2"
    },
    "intent": "create",
    "installation_id": "inst_0342dcXGvZf3hgl01YboFc",
    "label": "label",
    "status": "pending",
    "return_url": "https://example.com/settings/integrations",
    "created_at": "2026-10-04T21:04:11.000Z",
    "expires_at": "2026-10-04T21:04:11.000Z",
    "completed_at": "2026-10-04T21:04:11.000Z",
    "failure_code": "failure code",
    "auth": {
      "type": "oauth2",
      "authorize_url": "https://example.com/asset",
      "token_url": "https://example.com/asset",
      "issuer": "issuer",
      "available_scopes": [],
      "pkce": true,
      "identity_url": "https://example.com/asset"
    },
    "requested_scopes": [
      "requested scopes"
    ],
    "expected_account": {
      "external_id": "cus_1042",
      "display_name": "display name",
      "email": "ada@example.com"
    },
    "url": "https://example.com/zupflow/webhooks"
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

A Connect session, for polling its outcome

GET/v1/workspaces/{ws}/connect-sessions/{session}

Console sessionAPI keygetConnectSession

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
sessionConnectSessionIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Returns

200 with data: ConnectSession

GET/v1/workspaces/{ws}/connect-sessions/{session}
curl https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/connect-sessions/cs_034U88ZkASIVJkEla9Uh7j \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"
Response200
{
  "data": {
    "id": "cs_034U88ZkASIVJkEla9Uh7j",
    "workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
    "environment": "sandbox",
    "app": {
      "id": "app_034yLNzn9tcN2FM4UEOmrQ",
      "name": "Acme Corp",
      "key": "linear",
      "owner_scope": "organization",
      "icon": {
        "glyph": null,
        "color": null
      },
      "auth_type": "oauth2"
    },
    "target": {
      "kind": "channel_app_manager",
      "provider": "slack",
      "manager": "chmgr_034UNYVNxdX7o7BFB4Y0u2"
    },
    "intent": "create",
    "installation_id": "inst_0342dcXGvZf3hgl01YboFc",
    "label": "label",
    "status": "pending",
    "return_url": "https://example.com/settings/integrations",
    "created_at": "2026-10-04T21:04:11.000Z",
    "expires_at": "2026-10-04T21:04:11.000Z",
    "completed_at": "2026-10-04T21:04:11.000Z",
    "failure_code": "failure code",
    "auth": {
      "type": "oauth2",
      "authorize_url": "https://example.com/asset",
      "token_url": "https://example.com/asset",
      "issuer": "issuer",
      "available_scopes": [],
      "pkce": true,
      "identity_url": "https://example.com/asset"
    },
    "requested_scopes": [
      "requested scopes"
    ],
    "expected_account": {
      "external_id": "cus_1042",
      "display_name": "display name",
      "email": "ada@example.com"
    }
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

The hosted Connect page's session, by reference

GET/v1/connect/sessions/{reference}

Connect referencegetHostedConnect

Path parameters

referencestringrequired
The session's reference: the random token at the end of its url. Possession authorizes the page.

Returns

200 with data: ConnectSession

GET/v1/connect/sessions/{reference}
curl https://zupflow.example.com/v1/connect/sessions/reference
Response200
{
  "data": {
    "id": "cs_034U88ZkASIVJkEla9Uh7j",
    "workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
    "environment": "sandbox",
    "app": {
      "id": "app_034yLNzn9tcN2FM4UEOmrQ",
      "name": "Acme Corp",
      "key": "linear",
      "owner_scope": "organization",
      "icon": {
        "glyph": null,
        "color": null
      },
      "auth_type": "oauth2"
    },
    "target": {
      "kind": "channel_app_manager",
      "provider": "slack",
      "manager": "chmgr_034UNYVNxdX7o7BFB4Y0u2"
    },
    "intent": "create",
    "installation_id": "inst_0342dcXGvZf3hgl01YboFc",
    "label": "label",
    "status": "pending",
    "return_url": "https://example.com/settings/integrations",
    "created_at": "2026-10-04T21:04:11.000Z",
    "expires_at": "2026-10-04T21:04:11.000Z",
    "completed_at": "2026-10-04T21:04:11.000Z",
    "failure_code": "failure code",
    "auth": {
      "type": "oauth2",
      "authorize_url": "https://example.com/asset",
      "token_url": "https://example.com/asset",
      "issuer": "issuer",
      "available_scopes": [],
      "pkce": true,
      "identity_url": "https://example.com/asset"
    },
    "requested_scopes": [
      "requested scopes"
    ],
    "expected_account": {
      "external_id": "cus_1042",
      "display_name": "display name",
      "email": "ada@example.com"
    }
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Submit a token app's credentials

POST/v1/connect/sessions/{reference}/credentials

Connect referencesubmitConnectCredentials

Path parameters

referencestringrequired
The session's reference: the random token at the end of its url. Possession authorizes the page.

Body

valuesobjectrequired

Returns

200 with data: ConnectResult

POST/v1/connect/sessions/{reference}/credentials
curl -X POST https://zupflow.example.com/v1/connect/sessions/reference/credentials \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "values": {}
  }'
Response200
{
  "data": {
    "session": {
      "id": "cs_034U88ZkASIVJkEla9Uh7j",
      "workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
      "environment": null,
      "app": null,
      "target": null,
      "intent": "create",
      "installation_id": "inst_0342dcXGvZf3hgl01YboFc",
      "label": "label",
      "status": "pending",
      "return_url": "https://example.com/settings/integrations",
      "created_at": null,
      "expires_at": null,
      "completed_at": null,
      "failure_code": "failure code",
      "auth": null,
      "requested_scopes": [],
      "expected_account": null
    },
    "installation": {
      "id": "inst_0342dcXGvZf3hgl01YboFc",
      "workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
      "app": null,
      "short_id": null,
      "label": "label",
      "status": "connected",
      "configuration_version": 1,
      "connection": null,
      "grant_count": 3,
      "created_at": null,
      "updated_at": null
    }
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Start an OAuth app's consent

POST/v1/connect/sessions/{reference}/authorize

Connect referenceShows a secret onceauthorizeConnect

Path parameters

referencestringrequired
The session's reference: the random token at the end of its url. Possession authorizes the page.

Returns

200 with data: AuthorizeConnectResult

POST/v1/connect/sessions/{reference}/authorize
curl -X POST https://zupflow.example.com/v1/connect/sessions/reference/authorize \
  -H "Idempotency-Key: $(uuidgen)"
Response200
{
  "data": {
    "authorization_url": "https://example.com/asset"
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Cancel a Connect session

POST/v1/connect/sessions/{reference}/cancel

Connect referencecancelConnect

Path parameters

referencestringrequired
The session's reference: the random token at the end of its url. Possession authorizes the page.

Returns

200 with data: ConnectSession

POST/v1/connect/sessions/{reference}/cancel
curl -X POST https://zupflow.example.com/v1/connect/sessions/reference/cancel \
  -H "Idempotency-Key: $(uuidgen)"
Response200
{
  "data": {
    "id": "cs_034U88ZkASIVJkEla9Uh7j",
    "workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
    "environment": "sandbox",
    "app": {
      "id": "app_034yLNzn9tcN2FM4UEOmrQ",
      "name": "Acme Corp",
      "key": "linear",
      "owner_scope": "organization",
      "icon": {
        "glyph": null,
        "color": null
      },
      "auth_type": "oauth2"
    },
    "target": {
      "kind": "channel_app_manager",
      "provider": "slack",
      "manager": "chmgr_034UNYVNxdX7o7BFB4Y0u2"
    },
    "intent": "create",
    "installation_id": "inst_0342dcXGvZf3hgl01YboFc",
    "label": "label",
    "status": "pending",
    "return_url": "https://example.com/settings/integrations",
    "created_at": "2026-10-04T21:04:11.000Z",
    "expires_at": "2026-10-04T21:04:11.000Z",
    "completed_at": "2026-10-04T21:04:11.000Z",
    "failure_code": "failure code",
    "auth": {
      "type": "oauth2",
      "authorize_url": "https://example.com/asset",
      "token_url": "https://example.com/asset",
      "issuer": "issuer",
      "available_scopes": [],
      "pkce": true,
      "identity_url": "https://example.com/asset"
    },
    "requested_scopes": [
      "requested scopes"
    ],
    "expected_account": {
      "external_id": "cus_1042",
      "display_name": "display name",
      "email": "ada@example.com"
    }
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Connect's return URLs and origins in one environment

GET/v1/organizations/{org}/connect-settings/{env}

Console sessionAPI keygetConnectSettings

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
envEnvironmentrequired

Returns

200 with data: ConnectSettings

GET/v1/organizations/{org}/connect-settings/{env}
curl https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/connect-settings/sandbox \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"
Response200
{
  "data": {
    "environment": "sandbox",
    "return_urls": [
      "return urls"
    ],
    "allowed_origins": [
      "allowed origins"
    ],
    "updated_at": "2026-10-04T21:04:11.000Z"
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Set Connect's return URLs and origins in one environment

PUT/v1/organizations/{org}/connect-settings/{env}

Console sessionAPI keyupdateConnectSettings

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
envEnvironmentrequired

Body

return_urlsstring[]required
allowed_originsstring[]required

Returns

200 with data: ConnectSettings

PUT/v1/organizations/{org}/connect-settings/{env}
curl -X PUT https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/connect-settings/sandbox \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "return_urls": [
      "return urls"
    ],
    "allowed_origins": [
      "allowed origins"
    ]
  }'
Response200
{
  "data": {
    "environment": "sandbox",
    "return_urls": [
      "return urls"
    ],
    "allowed_origins": [
      "allowed origins"
    ],
    "updated_at": "2026-10-04T21:04:11.000Z"
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Agents

A workspace's agents

GET/v1/workspaces/{ws}/agents

Console sessionAPI keylistAgents

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Returns

200 with data: Agent[]

GET/v1/workspaces/{ws}/agents
curl https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/agents \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"
Response200
{
  "data": [
    {
      "id": "agt_034ywLOuKYCjR5w5Q59KRz",
      "workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
      "name": "Acme Corp",
      "description": "Lists the issues assigned to you.",
      "model_id": "mdl_03408SQyGoiPsdqfQHVF9j",
      "instructions": "You help the team plan and track their work.",
      "status": "active",
      "grant_count": 3,
      "runs_last_24h": 1,
      "last_run_at": "2026-10-04T21:04:11.000Z",
      "created_at": "2026-10-04T21:04:11.000Z",
      "updated_at": "2026-10-04T21:04:11.000Z"
    }
  ],
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Create an agent

POST/v1/workspaces/{ws}/agents

Console sessionAPI keycreateAgent

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Body

namestringrequired
descriptionstringrequired
model_idModelId | null
instructionsstringrequired

Returns

201 with data: Agent

POST/v1/workspaces/{ws}/agents
curl -X POST https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/agents \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme Corp",
    "description": "Lists the issues assigned to you.",
    "instructions": "You help the team plan and track their work."
  }'
Response201
{
  "data": {
    "id": "agt_034ywLOuKYCjR5w5Q59KRz",
    "workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
    "name": "Acme Corp",
    "description": "Lists the issues assigned to you.",
    "model_id": "mdl_03408SQyGoiPsdqfQHVF9j",
    "instructions": "You help the team plan and track their work.",
    "status": "active",
    "grant_count": 3,
    "runs_last_24h": 1,
    "last_run_at": "2026-10-04T21:04:11.000Z",
    "created_at": "2026-10-04T21:04:11.000Z",
    "updated_at": "2026-10-04T21:04:11.000Z"
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

An agent

GET/v1/workspaces/{ws}/agents/{agent}

Console sessionAPI keygetAgent

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
agentAgentIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Returns

200 with data: Agent

GET/v1/workspaces/{ws}/agents/{agent}
curl https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/agents/agt_034ywLOuKYCjR5w5Q59KRz \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"
Response200
{
  "data": {
    "id": "agt_034ywLOuKYCjR5w5Q59KRz",
    "workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
    "name": "Acme Corp",
    "description": "Lists the issues assigned to you.",
    "model_id": "mdl_03408SQyGoiPsdqfQHVF9j",
    "instructions": "You help the team plan and track their work.",
    "status": "active",
    "grant_count": 3,
    "runs_last_24h": 1,
    "last_run_at": "2026-10-04T21:04:11.000Z",
    "created_at": "2026-10-04T21:04:11.000Z",
    "updated_at": "2026-10-04T21:04:11.000Z"
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Change an agent, or pause it

PATCH/v1/workspaces/{ws}/agents/{agent}

Console sessionAPI keyupdateAgent

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
agentAgentIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Body

namestring
descriptionstring
model_idModelId | null
instructionsstring
status"active" | "paused"

Returns

200 with data: Agent

PATCH/v1/workspaces/{ws}/agents/{agent}
curl -X PATCH https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/agents/agt_034ywLOuKYCjR5w5Q59KRz \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme Corp",
    "description": "Lists the issues assigned to you."
  }'
Response200
{
  "data": {
    "id": "agt_034ywLOuKYCjR5w5Q59KRz",
    "workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
    "name": "Acme Corp",
    "description": "Lists the issues assigned to you.",
    "model_id": "mdl_03408SQyGoiPsdqfQHVF9j",
    "instructions": "You help the team plan and track their work.",
    "status": "active",
    "grant_count": 3,
    "runs_last_24h": 1,
    "last_run_at": "2026-10-04T21:04:11.000Z",
    "created_at": "2026-10-04T21:04:11.000Z",
    "updated_at": "2026-10-04T21:04:11.000Z"
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Delete an agent and its grants

DELETE/v1/workspaces/{ws}/agents/{agent}

Console sessionAPI keydeleteAgent

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
agentAgentIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Returns

204 with an empty body

DELETE/v1/workspaces/{ws}/agents/{agent}
curl -X DELETE https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/agents/agt_034ywLOuKYCjR5w5Q59KRz \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"

An agent's grants

GET/v1/workspaces/{ws}/agents/{agent}/grants

Console sessionAPI keylistGrants

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
agentAgentIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Returns

200 with data: Grant[]

GET/v1/workspaces/{ws}/agents/{agent}/grants
curl https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/agents/agt_034ywLOuKYCjR5w5Q59KRz/grants \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"
Response200
{
  "data": [
    {
      "id": "grt_034SjUfhLzDVN3eZq1Ctck",
      "workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
      "agent_id": "agt_034ywLOuKYCjR5w5Q59KRz",
      "installation_id": "inst_0342dcXGvZf3hgl01YboFc",
      "tools": [
        "tools"
      ],
      "approval_required": [
        "approval required"
      ],
      "created_at": "2026-10-04T21:04:11.000Z",
      "updated_at": "2026-10-04T21:04:11.000Z"
    }
  ],
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Grant an agent tools of one installation

POST/v1/workspaces/{ws}/agents/{agent}/grants

Console sessionAPI keycreateGrant

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
agentAgentIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Body

installation_idInstallationIdrequired
toolsstring[]required
approval_requiredstring[]required

Returns

201 with data: Grant

POST/v1/workspaces/{ws}/agents/{agent}/grants
curl -X POST https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/agents/agt_034ywLOuKYCjR5w5Q59KRz/grants \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "installation_id": "inst_0342dcXGvZf3hgl01YboFc",
    "tools": [
      "tools"
    ],
    "approval_required": [
      "approval required"
    ]
  }'
Response201
{
  "data": {
    "id": "grt_034SjUfhLzDVN3eZq1Ctck",
    "workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
    "agent_id": "agt_034ywLOuKYCjR5w5Q59KRz",
    "installation_id": "inst_0342dcXGvZf3hgl01YboFc",
    "tools": [
      "tools"
    ],
    "approval_required": [
      "approval required"
    ],
    "created_at": "2026-10-04T21:04:11.000Z",
    "updated_at": "2026-10-04T21:04:11.000Z"
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Change a grant's tools and approvals

PATCH/v1/workspaces/{ws}/agents/{agent}/grants/{grant}

Console sessionAPI keyupdateGrant

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
agentAgentIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
grantGrantIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Body

toolsstring[]required
approval_requiredstring[]required

Returns

200 with data: Grant

PATCH/v1/workspaces/{ws}/agents/{agent}/grants/{grant}
curl -X PATCH https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/agents/agt_034ywLOuKYCjR5w5Q59KRz/grants/grt_034SjUfhLzDVN3eZq1Ctck \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "tools": [
      "tools"
    ],
    "approval_required": [
      "approval required"
    ]
  }'
Response200
{
  "data": {
    "id": "grt_034SjUfhLzDVN3eZq1Ctck",
    "workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
    "agent_id": "agt_034ywLOuKYCjR5w5Q59KRz",
    "installation_id": "inst_0342dcXGvZf3hgl01YboFc",
    "tools": [
      "tools"
    ],
    "approval_required": [
      "approval required"
    ],
    "created_at": "2026-10-04T21:04:11.000Z",
    "updated_at": "2026-10-04T21:04:11.000Z"
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Revoke a grant

DELETE/v1/workspaces/{ws}/agents/{agent}/grants/{grant}

Console sessionAPI keydeleteGrant

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
agentAgentIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
grantGrantIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Returns

204 with an empty body

DELETE/v1/workspaces/{ws}/agents/{agent}/grants/{grant}
curl -X DELETE https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/agents/agt_034ywLOuKYCjR5w5Q59KRz/grants/grt_034SjUfhLzDVN3eZq1Ctck \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"

An agent's channels: one per connection of its own apps

GET/v1/workspaces/{ws}/agents/{agent}/channels

Console sessionAPI keylistAgentChannels

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
agentAgentIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Returns

200 with data: AgentChannel[]

GET/v1/workspaces/{ws}/agents/{agent}/channels
curl https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/agents/agt_034ywLOuKYCjR5w5Q59KRz/channels \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"
Response200
{
  "data": [
    {
      "id": "agch_034ywLOukecaJAd2lugFUK",
      "workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
      "agent_id": "agt_034ywLOuKYCjR5w5Q59KRz",
      "connection_id": "chcon_034UNYVNxd3k7NFOVSWyAe",
      "tools": [
        "tools"
      ],
      "approval_required": [
        "approval required"
      ],
      "audience": "origin",
      "audience_conversations": [
        "conv_034UNYVNxd3k7BFPdmTECW"
      ],
      "persona": {
        "name": "Acme Corp",
        "avatar_url": "https://example.com/asset"
      },
      "answers_dms": true,
      "answers_mentions": true,
      "thread_follow_up": "off",
      "agent_messages": "ignore",
      "max_agent_hops": 1,
      "mid_run": "steer",
      "senders": "anyone",
      "sender_list": [
        "sender list"
      ],
      "allow_automated": true,
      "allow_external": true,
      "reply_with_output": true,
      "created_at": "2026-10-04T21:04:11.000Z",
      "updated_at": "2026-10-04T21:04:11.000Z"
    }
  ],
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Set an agent's channel on one of its own connections, creating it if it isn't there

PUT/v1/workspaces/{ws}/agents/{agent}/channels/{channel_connection}

Console sessionAPI keyputAgentChannel

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
agentAgentIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
channel_connectionChannelConnectionIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Body

toolsstring[]required
approval_requiredstring[]required
audience"origin" | "listed" | "anywhere"required
audience_conversationsChannelConversationId[]required
personaobject | nullrequired
answers_dmsbooleanrequired
answers_mentionsbooleanrequired
thread_follow_up"off" | "when_last_addressed" | "always"required
agent_messages"ignore" | "mentions"required
max_agent_hopsintegerrequired
mid_run"steer" | "collect"required
senders"anyone" | "listed"required
sender_liststring[]required
allow_automatedbooleanrequired
allow_externalbooleanrequired
reply_with_outputbooleanrequired

Returns

200 with data: AgentChannel

PUT/v1/workspaces/{ws}/agents/{agent}/channels/{channel_connection}
curl -X PUT https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/agents/agt_034ywLOuKYCjR5w5Q59KRz/channels/chcon_034UNYVNxd3k7NFOVSWyAe \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "tools": [
      "tools"
    ],
    "approval_required": [
      "approval required"
    ],
    "audience": "origin",
    "audience_conversations": [
      "conv_034UNYVNxd3k7BFPdmTECW"
    ],
    "persona": {
      "name": "Acme Corp",
      "avatar_url": "https://example.com/asset"
    },
    "answers_dms": true,
    "answers_mentions": true,
    "thread_follow_up": "off",
    "agent_messages": "ignore",
    "max_agent_hops": 1,
    "mid_run": "steer",
    "senders": "anyone",
    "sender_list": [
      "sender list"
    ],
    "allow_automated": true,
    "allow_external": true,
    "reply_with_output": true
  }'
Response200
{
  "data": {
    "id": "agch_034ywLOukecaJAd2lugFUK",
    "workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
    "agent_id": "agt_034ywLOuKYCjR5w5Q59KRz",
    "connection_id": "chcon_034UNYVNxd3k7NFOVSWyAe",
    "tools": [
      "tools"
    ],
    "approval_required": [
      "approval required"
    ],
    "audience": "origin",
    "audience_conversations": [
      "conv_034UNYVNxd3k7BFPdmTECW"
    ],
    "persona": {
      "name": "Acme Corp",
      "avatar_url": "https://example.com/asset"
    },
    "answers_dms": true,
    "answers_mentions": true,
    "thread_follow_up": "off",
    "agent_messages": "ignore",
    "max_agent_hops": 1,
    "mid_run": "steer",
    "senders": "anyone",
    "sender_list": [
      "sender list"
    ],
    "allow_automated": true,
    "allow_external": true,
    "reply_with_output": true,
    "created_at": "2026-10-04T21:04:11.000Z",
    "updated_at": "2026-10-04T21:04:11.000Z"
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Stop an agent answering on a connection; the connection stays

DELETE/v1/workspaces/{ws}/agents/{agent}/channels/{channel_connection}

Console sessionAPI keydeleteAgentChannel

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
agentAgentIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
channel_connectionChannelConnectionIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Returns

204 with an empty body

DELETE/v1/workspaces/{ws}/agents/{agent}/channels/{channel_connection}
curl -X DELETE https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/agents/agt_034ywLOuKYCjR5w5Q59KRz/channels/chcon_034UNYVNxd3k7NFOVSWyAe \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"

Model providers

The organization's model provider connections, oldest first

GET/v1/organizations/{org}/model-connections

Console sessionAPI keylistModelConnections

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Query parameters

environmentEnvironment
Only this environment's connections. An API key reads its own environment's; naming another is 422 environment_mismatch.

Returns

200 with data: ModelConnection[]

GET/v1/organizations/{org}/model-connections
curl https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/model-connections \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"
Response200
{
  "data": [
    {
      "id": "mcn_03408SQyg36Q8n8Bfr13fY",
      "organization_id": "org_034WrceamQGAwHgTod2dHN",
      "environment": "sandbox",
      "kind": "openai",
      "label": "label",
      "api_key": {
        "set": true,
        "last4": "last4",
        "updated_at": null
      },
      "key_version": 1,
      "status": "active",
      "model_count": 3,
      "created_at": "2026-10-04T21:04:11.000Z",
      "updated_at": "2026-10-04T21:04:11.000Z"
    }
  ],
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Connect a model provider in one environment with an API key, checked with the provider first (422 invalid_api_key; 501 model_providers_not_configured when the deployment reaches no model providers)

POST/v1/organizations/{org}/model-connections

Console sessionAPI keycreateModelConnection

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Body

environmentEnvironmentrequired
kindModelProviderKindrequired
labelstringrequired
api_keystringrequired

Returns

201 with data: ModelConnection

POST/v1/organizations/{org}/model-connections
curl -X POST https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/model-connections \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "environment": "sandbox",
    "kind": "openai",
    "label": "label",
    "api_key": "api key"
  }'
Response201
{
  "data": {
    "id": "mcn_03408SQyg36Q8n8Bfr13fY",
    "organization_id": "org_034WrceamQGAwHgTod2dHN",
    "environment": "sandbox",
    "kind": "openai",
    "label": "label",
    "api_key": {
      "set": true,
      "last4": "last4",
      "updated_at": "2026-10-04T21:04:11.000Z"
    },
    "key_version": 1,
    "status": "active",
    "model_count": 3,
    "created_at": "2026-10-04T21:04:11.000Z",
    "updated_at": "2026-10-04T21:04:11.000Z"
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

A model provider connection

GET/v1/organizations/{org}/model-connections/{connection}

Console sessionAPI keygetModelConnection

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
connectionModelConnectionIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Returns

200 with data: ModelConnection

GET/v1/organizations/{org}/model-connections/{connection}
curl https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/model-connections/mcn_03408SQyg36Q8n8Bfr13fY \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"
Response200
{
  "data": {
    "id": "mcn_03408SQyg36Q8n8Bfr13fY",
    "organization_id": "org_034WrceamQGAwHgTod2dHN",
    "environment": "sandbox",
    "kind": "openai",
    "label": "label",
    "api_key": {
      "set": true,
      "last4": "last4",
      "updated_at": "2026-10-04T21:04:11.000Z"
    },
    "key_version": 1,
    "status": "active",
    "model_count": 3,
    "created_at": "2026-10-04T21:04:11.000Z",
    "updated_at": "2026-10-04T21:04:11.000Z"
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Rename a model provider connection

PATCH/v1/organizations/{org}/model-connections/{connection}

Console sessionAPI keyupdateModelConnection

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
connectionModelConnectionIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Body

labelstringrequired

Returns

200 with data: ModelConnection

PATCH/v1/organizations/{org}/model-connections/{connection}
curl -X PATCH https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/model-connections/mcn_03408SQyg36Q8n8Bfr13fY \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "label": "label"
  }'
Response200
{
  "data": {
    "id": "mcn_03408SQyg36Q8n8Bfr13fY",
    "organization_id": "org_034WrceamQGAwHgTod2dHN",
    "environment": "sandbox",
    "kind": "openai",
    "label": "label",
    "api_key": {
      "set": true,
      "last4": "last4",
      "updated_at": "2026-10-04T21:04:11.000Z"
    },
    "key_version": 1,
    "status": "active",
    "model_count": 3,
    "created_at": "2026-10-04T21:04:11.000Z",
    "updated_at": "2026-10-04T21:04:11.000Z"
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Delete a connection, its key and its models. Refused while one of its models is the environment's default or an agent's (409 model_in_use, naming them)

DELETE/v1/organizations/{org}/model-connections/{connection}

Console sessionAPI keydeleteModelConnection

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
connectionModelConnectionIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Returns

204 with an empty body

DELETE/v1/organizations/{org}/model-connections/{connection}
curl -X DELETE https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/model-connections/mcn_03408SQyg36Q8n8Bfr13fY \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"

Replace a connection's API key with a new version, checked with the provider first (422 invalid_api_key, keeping the old one; 501 model_providers_not_configured when the deployment reaches no model providers). 409 key_changed when another request replaced the key meanwhile: nothing changes, and the connection shows the newer key

PUT/v1/organizations/{org}/model-connections/{connection}/api-key

Console sessionAPI keyreplaceModelConnectionKey

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
connectionModelConnectionIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Body

api_keystringrequired

Returns

200 with data: ModelConnection

PUT/v1/organizations/{org}/model-connections/{connection}/api-key
curl -X PUT https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/model-connections/mcn_03408SQyg36Q8n8Bfr13fY/api-key \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "api_key": "api key"
  }'
Response200
{
  "data": {
    "id": "mcn_03408SQyg36Q8n8Bfr13fY",
    "organization_id": "org_034WrceamQGAwHgTod2dHN",
    "environment": "sandbox",
    "kind": "openai",
    "label": "label",
    "api_key": {
      "set": true,
      "last4": "last4",
      "updated_at": "2026-10-04T21:04:11.000Z"
    },
    "key_version": 1,
    "status": "active",
    "model_count": 3,
    "created_at": "2026-10-04T21:04:11.000Z",
    "updated_at": "2026-10-04T21:04:11.000Z"
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Search the models the connection's provider lists for its key, a page at a time. 422 invalid_api_key when the provider refuses the key; 501 model_providers_not_configured when the deployment reaches no model providers

GET/v1/organizations/{org}/model-connections/{connection}/provider-models

Console sessionAPI keylistProviderModels

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
connectionModelConnectionIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Query parameters

cursorstring
limitinteger
Page size, 1 to 100 (default 25); values outside are clamped, and a non-integer means the default.
qstring

Returns

200 with data: ProviderModel[]

GET/v1/organizations/{org}/model-connections/{connection}/provider-models
curl https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/model-connections/mcn_03408SQyg36Q8n8Bfr13fY/provider-models \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"
Response200
{
  "data": [
    {
      "provider_model_id": "provider model id",
      "name": "Acme Corp",
      "author": "author",
      "context_window": 1,
      "supports_tools": true,
      "pricing": {
        "input_per_million_usd": 1,
        "output_per_million_usd": 1
      },
      "added_model_id": "mdl_03408SQyGoiPsdqfQHVF9j"
    }
  ],
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Models the organization added, by name, searched and paged on the server

GET/v1/organizations/{org}/models

Console sessionAPI keylistModels

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Query parameters

cursorstring
limitinteger
Page size, 1 to 100 (default 25); values outside are clamped, and a non-integer means the default.
environmentEnvironment
Only this environment's models. An API key reads its own environment's; naming another is 422 environment_mismatch.
connection_idModelConnectionId
Only this connection's models. A malformed or unknown ID matches nothing.
qstring

Returns

200 with data: Model[]

GET/v1/organizations/{org}/models
curl https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/models \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"
Response200
{
  "data": [
    {
      "id": "mdl_03408SQyGoiPsdqfQHVF9j",
      "organization_id": "org_034WrceamQGAwHgTod2dHN",
      "environment": "sandbox",
      "route": {
        "connection_id": "mcn_03408SQyg36Q8n8Bfr13fY",
        "kind": null,
        "label": "label"
      },
      "provider_model_id": "provider model id",
      "name": "Acme Corp",
      "author": "author",
      "context_window": 1,
      "supports_tools": true,
      "status": "available",
      "is_default": true,
      "agent_count": 3,
      "created_at": "2026-10-04T21:04:11.000Z",
      "updated_at": "2026-10-04T21:04:11.000Z"
    }
  ],
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Add a model from a connection, in the connection's environment

POST/v1/organizations/{org}/models

Console sessionAPI keycreateModel

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Body

connection_idModelConnectionIdrequired
provider_model_idstringrequired
namestring

Returns

201 with data: Model

POST/v1/organizations/{org}/models
curl -X POST https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/models \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "connection_id": "mcn_03408SQyg36Q8n8Bfr13fY",
    "provider_model_id": "provider model id"
  }'
Response201
{
  "data": {
    "id": "mdl_03408SQyGoiPsdqfQHVF9j",
    "organization_id": "org_034WrceamQGAwHgTod2dHN",
    "environment": "sandbox",
    "route": {
      "connection_id": "mcn_03408SQyg36Q8n8Bfr13fY",
      "kind": "openai",
      "label": "label"
    },
    "provider_model_id": "provider model id",
    "name": "Acme Corp",
    "author": "author",
    "context_window": 1,
    "supports_tools": true,
    "status": "available",
    "is_default": true,
    "agent_count": 3,
    "created_at": "2026-10-04T21:04:11.000Z",
    "updated_at": "2026-10-04T21:04:11.000Z"
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

A model

GET/v1/organizations/{org}/models/{model}

Console sessionAPI keygetModel

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
modelModelIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Returns

200 with data: Model

GET/v1/organizations/{org}/models/{model}
curl https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/models/mdl_03408SQyGoiPsdqfQHVF9j \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"
Response200
{
  "data": {
    "id": "mdl_03408SQyGoiPsdqfQHVF9j",
    "organization_id": "org_034WrceamQGAwHgTod2dHN",
    "environment": "sandbox",
    "route": {
      "connection_id": "mcn_03408SQyg36Q8n8Bfr13fY",
      "kind": "openai",
      "label": "label"
    },
    "provider_model_id": "provider model id",
    "name": "Acme Corp",
    "author": "author",
    "context_window": 1,
    "supports_tools": true,
    "status": "available",
    "is_default": true,
    "agent_count": 3,
    "created_at": "2026-10-04T21:04:11.000Z",
    "updated_at": "2026-10-04T21:04:11.000Z"
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Rename a model

PATCH/v1/organizations/{org}/models/{model}

Console sessionAPI keyupdateModel

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
modelModelIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Body

namestringrequired

Returns

200 with data: Model

PATCH/v1/organizations/{org}/models/{model}
curl -X PATCH https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/models/mdl_03408SQyGoiPsdqfQHVF9j \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme Corp"
  }'
Response200
{
  "data": {
    "id": "mdl_03408SQyGoiPsdqfQHVF9j",
    "organization_id": "org_034WrceamQGAwHgTod2dHN",
    "environment": "sandbox",
    "route": {
      "connection_id": "mcn_03408SQyg36Q8n8Bfr13fY",
      "kind": "openai",
      "label": "label"
    },
    "provider_model_id": "provider model id",
    "name": "Acme Corp",
    "author": "author",
    "context_window": 1,
    "supports_tools": true,
    "status": "available",
    "is_default": true,
    "agent_count": 3,
    "created_at": "2026-10-04T21:04:11.000Z",
    "updated_at": "2026-10-04T21:04:11.000Z"
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Remove a model. Refused while it is the environment's default or an agent's (409 model_in_use, naming them)

DELETE/v1/organizations/{org}/models/{model}

Console sessionAPI keydeleteModel

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
modelModelIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Returns

204 with an empty body

DELETE/v1/organizations/{org}/models/{model}
curl -X DELETE https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/models/mdl_03408SQyGoiPsdqfQHVF9j \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"

The model agents in one environment run on unless they override it

GET/v1/organizations/{org}/default-models/{env}

Console sessionAPI keygetDefaultModel

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
envEnvironmentrequired

Returns

200 with data: DefaultModel

GET/v1/organizations/{org}/default-models/{env}
curl https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/default-models/sandbox \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"
Response200
{
  "data": {
    "environment": "sandbox",
    "model": {
      "id": "mdl_03408SQyGoiPsdqfQHVF9j",
      "organization_id": "org_034WrceamQGAwHgTod2dHN",
      "environment": "sandbox",
      "route": {
        "connection_id": null,
        "kind": null,
        "label": null
      },
      "provider_model_id": "provider model id",
      "name": "Acme Corp",
      "author": "author",
      "context_window": 1,
      "supports_tools": true,
      "status": "available",
      "is_default": true,
      "agent_count": 3,
      "created_at": "2026-10-04T21:04:11.000Z",
      "updated_at": "2026-10-04T21:04:11.000Z"
    },
    "updated_at": "2026-10-04T21:04:11.000Z",
    "updated_by": {
      "id": "usr_0344un49YpnirMXyqfkTed",
      "name": "Acme Corp",
      "email": "ada@example.com",
      "avatar_url": "https://example.com/asset"
    }
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Choose an environment's default model, or none

PUT/v1/organizations/{org}/default-models/{env}

Console sessionAPI keyupdateDefaultModel

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
envEnvironmentrequired

Body

model_idModelId | nullrequired

Returns

200 with data: DefaultModel

PUT/v1/organizations/{org}/default-models/{env}
curl -X PUT https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/default-models/sandbox \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model_id": "mdl_03408SQyGoiPsdqfQHVF9j"
  }'
Response200
{
  "data": {
    "environment": "sandbox",
    "model": {
      "id": "mdl_03408SQyGoiPsdqfQHVF9j",
      "organization_id": "org_034WrceamQGAwHgTod2dHN",
      "environment": "sandbox",
      "route": {
        "connection_id": null,
        "kind": null,
        "label": null
      },
      "provider_model_id": "provider model id",
      "name": "Acme Corp",
      "author": "author",
      "context_window": 1,
      "supports_tools": true,
      "status": "available",
      "is_default": true,
      "agent_count": 3,
      "created_at": "2026-10-04T21:04:11.000Z",
      "updated_at": "2026-10-04T21:04:11.000Z"
    },
    "updated_at": "2026-10-04T21:04:11.000Z",
    "updated_by": {
      "id": "usr_0344un49YpnirMXyqfkTed",
      "name": "Acme Corp",
      "email": "ada@example.com",
      "avatar_url": "https://example.com/asset"
    }
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

API keys

API keys

GET/v1/organizations/{org}/api-keys

Console sessionlistApiKeys

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Returns

200 with data: ApiKey[]

GET/v1/organizations/{org}/api-keys
curl https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/api-keys \
  -H "Authorization: Bearer $CONSOLE_TOKEN"
Response200
{
  "data": [
    {
      "id": "key_034yLYwVHYXQfyatXcnofQ",
      "organization_id": "org_034WrceamQGAwHgTod2dHN",
      "environment": "sandbox",
      "name": "Acme Corp",
      "prefix": "prefix",
      "last4": "last4",
      "created_by": {
        "id": "usr_0344un49YpnirMXyqfkTed",
        "name": "Acme Corp",
        "email": "ada@example.com",
        "avatar_url": "https://example.com/asset"
      },
      "created_at": "2026-10-04T21:04:11.000Z",
      "last_used_at": "2026-10-04T21:04:11.000Z",
      "revoked_at": "2026-10-04T21:04:11.000Z"
    }
  ],
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Create an API key; the secret is shown once

POST/v1/organizations/{org}/api-keys

Console sessionShows a secret oncecreateApiKey

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Body

namestringrequired
environmentEnvironmentrequired

Returns

201 with data: CreatedApiKey

POST/v1/organizations/{org}/api-keys
curl -X POST https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/api-keys \
  -H "Authorization: Bearer $CONSOLE_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme Corp",
    "environment": "sandbox"
  }'
Response201
{
  "data": {
    "key": {
      "id": "key_034yLYwVHYXQfyatXcnofQ",
      "organization_id": "org_034WrceamQGAwHgTod2dHN",
      "environment": "sandbox",
      "name": "Acme Corp",
      "prefix": "prefix",
      "last4": "last4",
      "created_by": {
        "id": null,
        "name": null,
        "email": null,
        "avatar_url": null
      },
      "created_at": "2026-10-04T21:04:11.000Z",
      "last_used_at": "2026-10-04T21:04:11.000Z",
      "revoked_at": "2026-10-04T21:04:11.000Z"
    },
    "secret": "secret"
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Revoke an API key

POST/v1/organizations/{org}/api-keys/{key}/revoke

Console sessionrevokeApiKey

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
keyApiKeyIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Returns

200 with data: ApiKey

POST/v1/organizations/{org}/api-keys/{key}/revoke
curl -X POST https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/api-keys/key_034yLYwVHYXQfyatXcnofQ/revoke \
  -H "Authorization: Bearer $CONSOLE_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)"
Response200
{
  "data": {
    "id": "key_034yLYwVHYXQfyatXcnofQ",
    "organization_id": "org_034WrceamQGAwHgTod2dHN",
    "environment": "sandbox",
    "name": "Acme Corp",
    "prefix": "prefix",
    "last4": "last4",
    "created_by": {
      "id": "usr_0344un49YpnirMXyqfkTed",
      "name": "Acme Corp",
      "email": "ada@example.com",
      "avatar_url": "https://example.com/asset"
    },
    "created_at": "2026-10-04T21:04:11.000Z",
    "last_used_at": "2026-10-04T21:04:11.000Z",
    "revoked_at": "2026-10-04T21:04:11.000Z"
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Webhooks

Webhook endpoints

GET/v1/organizations/{org}/webhooks

Console sessionAPI keylistWebhooks

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Returns

200 with data: WebhookEndpoint[]

GET/v1/organizations/{org}/webhooks
curl https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/webhooks \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"
Response200
{
  "data": [
    {
      "id": "we_034aaypc8ldh0aAtyCQsOd",
      "organization_id": "org_034WrceamQGAwHgTod2dHN",
      "environment": "sandbox",
      "url": "https://example.com/zupflow/webhooks",
      "description": "Lists the issues assigned to you.",
      "events": [
        "installation.connected"
      ],
      "enabled": true,
      "signing_secret_last4": "signing secret last4",
      "previous_signing_secret_expires_at": "2026-10-04T21:04:11.000Z",
      "created_at": "2026-10-04T21:04:11.000Z",
      "last_delivery": {
        "status_code": 1,
        "delivered_at": null
      }
    }
  ],
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Add a webhook endpoint; the signing secret is shown once

POST/v1/organizations/{org}/webhooks

Console sessionAPI keyShows a secret oncecreateWebhook

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Body

environmentEnvironmentrequired
urlstringrequired
descriptionstringrequired
events"installation.connected" | "installation.reconnect_required" | "installation.disconnected" | "connect_session.completed" | …[]required

Returns

201 with data: CreatedWebhookEndpoint

POST/v1/organizations/{org}/webhooks
curl -X POST https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/webhooks \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "environment": "sandbox",
    "url": "https://example.com/zupflow/webhooks",
    "description": "Lists the issues assigned to you.",
    "events": [
      "installation.connected"
    ]
  }'
Response201
{
  "data": {
    "endpoint": {
      "id": "we_034aaypc8ldh0aAtyCQsOd",
      "organization_id": "org_034WrceamQGAwHgTod2dHN",
      "environment": "sandbox",
      "url": "https://example.com/zupflow/webhooks",
      "description": "Lists the issues assigned to you.",
      "events": [
        "installation.connected"
      ],
      "enabled": true,
      "signing_secret_last4": "signing secret last4",
      "previous_signing_secret_expires_at": "2026-10-04T21:04:11.000Z",
      "created_at": "2026-10-04T21:04:11.000Z",
      "last_delivery": {
        "status_code": null,
        "delivered_at": null
      }
    },
    "signing_secret": "signing secret"
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Change a webhook endpoint

PATCH/v1/organizations/{org}/webhooks/{hook}

Console sessionAPI keyupdateWebhook

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
hookWebhookEndpointIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Body

urlstring
descriptionstring
events"installation.connected" | "installation.reconnect_required" | "installation.disconnected" | "connect_session.completed" | …[]
enabledboolean

Returns

200 with data: WebhookEndpoint

PATCH/v1/organizations/{org}/webhooks/{hook}
curl -X PATCH https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/webhooks/we_034aaypc8ldh0aAtyCQsOd \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/zupflow/webhooks",
    "description": "Lists the issues assigned to you."
  }'
Response200
{
  "data": {
    "id": "we_034aaypc8ldh0aAtyCQsOd",
    "organization_id": "org_034WrceamQGAwHgTod2dHN",
    "environment": "sandbox",
    "url": "https://example.com/zupflow/webhooks",
    "description": "Lists the issues assigned to you.",
    "events": [
      "installation.connected"
    ],
    "enabled": true,
    "signing_secret_last4": "signing secret last4",
    "previous_signing_secret_expires_at": "2026-10-04T21:04:11.000Z",
    "created_at": "2026-10-04T21:04:11.000Z",
    "last_delivery": {
      "status_code": 1,
      "delivered_at": "2026-10-04T21:04:11.000Z"
    }
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Delete a webhook endpoint

DELETE/v1/organizations/{org}/webhooks/{hook}

Console sessionAPI keydeleteWebhook

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
hookWebhookEndpointIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Returns

204 with an empty body

DELETE/v1/organizations/{org}/webhooks/{hook}
curl -X DELETE https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/webhooks/we_034aaypc8ldh0aAtyCQsOd \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"
POST/v1/organizations/{org}/webhooks/{hook}/roll-secret
curl -X POST https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/webhooks/we_034aaypc8ldh0aAtyCQsOd/roll-secret \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
Response200
{
  "data": {
    "endpoint": {
      "id": "we_034aaypc8ldh0aAtyCQsOd",
      "organization_id": "org_034WrceamQGAwHgTod2dHN",
      "environment": "sandbox",
      "url": "https://example.com/zupflow/webhooks",
      "description": "Lists the issues assigned to you.",
      "events": [
        "installation.connected"
      ],
      "enabled": true,
      "signing_secret_last4": "signing secret last4",
      "previous_signing_secret_expires_at": "2026-10-04T21:04:11.000Z",
      "created_at": "2026-10-04T21:04:11.000Z",
      "last_delivery": {
        "status_code": null,
        "delivered_at": null
      }
    },
    "signing_secret": "signing secret"
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

An endpoint's deliveries, newest first by creation time and ID. Every member may read; an API key reads only its environment. Unknown state/event_type or a missing, foreign or other-environment workspace filter matches nothing. A malformed cursor, or one from another endpoint or set of filters, is 400 validation_failed.

GET/v1/organizations/{org}/webhooks/{hook}/deliveries

Console sessionAPI keylistWebhookDeliveries

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
hookWebhookEndpointIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Query parameters

cursorstring
limitinteger
Page size, 1 to 100 (default 25); values outside are clamped, and a non-integer means the default.
workspace_idWorkspaceId
state"pending" | "succeeded" | "failed" | "skipped"
event_type"installation.connected" | "installation.reconnect_required" | "installation.disconnected" | "connect_session.completed" | …

Returns

200 with data: WebhookDeliverySummary[]

GET/v1/organizations/{org}/webhooks/{hook}/deliveries
curl https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/webhooks/we_034aaypc8ldh0aAtyCQsOd/deliveries \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"
Response200
{
  "data": [
    {
      "id": "whd_034aaypc8ls1iTqrkdnjhu",
      "organization_id": "org_034WrceamQGAwHgTod2dHN",
      "endpoint_id": "we_034aaypc8ldh0aAtyCQsOd",
      "event_id": "evt_034aaypc8lddlN2hmXT90h",
      "environment": "sandbox",
      "event_type": "installation.connected",
      "event_created_at": "2026-10-04T21:04:11.000Z",
      "workspace": {
        "id": "ws_034a8swzUzvsQ2inuZzZfA",
        "external_id": "cus_1042"
      },
      "state": "pending",
      "attempts": 1,
      "last_status_code": 100,
      "last_error": "status",
      "last_attempt_at": "2026-10-04T21:04:11.000Z",
      "next_attempt_at": "2026-10-04T21:04:11.000Z",
      "created_at": "2026-10-04T21:04:11.000Z"
    }
  ],
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

A delivery and its lean event. A missing, foreign or wrong-endpoint delivery is 404. Older deliveries may have incomplete attempt history; response bodies, request headers and signatures are never returned.

GET/v1/organizations/{org}/webhooks/{hook}/deliveries/{delivery}

Console sessionAPI keygetWebhookDelivery

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
hookWebhookEndpointIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
deliveryWebhookDeliveryIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Returns

200 with data: WebhookDeliveryDetail

GET/v1/organizations/{org}/webhooks/{hook}/deliveries/{delivery}
curl https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/webhooks/we_034aaypc8ldh0aAtyCQsOd/deliveries/whd_034aaypc8ls1iTqrkdnjhu \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"
Response200
{
  "data": {
    "id": "whd_034aaypc8ls1iTqrkdnjhu",
    "organization_id": "org_034WrceamQGAwHgTod2dHN",
    "endpoint_id": "we_034aaypc8ldh0aAtyCQsOd",
    "event_id": "evt_034aaypc8lddlN2hmXT90h",
    "environment": "sandbox",
    "event_type": "installation.connected",
    "event_created_at": "2026-10-04T21:04:11.000Z",
    "workspace": {
      "id": "ws_034a8swzUzvsQ2inuZzZfA",
      "external_id": "cus_1042"
    },
    "state": "pending",
    "attempts": 1,
    "last_status_code": 100,
    "last_error": "status",
    "last_attempt_at": "2026-10-04T21:04:11.000Z",
    "next_attempt_at": "2026-10-04T21:04:11.000Z",
    "created_at": "2026-10-04T21:04:11.000Z",
    "event": {
      "id": "evt_034aaypc8lddlN2hmXT90h",
      "created_at": null,
      "environment": null,
      "organization_id": "org_034WrceamQGAwHgTod2dHN",
      "type": "installation.connected",
      "workspace": null,
      "data": {
        "object": null,
        "id": null,
        "app_id": null,
        "status": null
      }
    },
    "attempt_history_complete": true
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

A delivery's recorded attempts, oldest first by number. A malformed cursor or one from another delivery is 400 validation_failed. Historical summary-only attempts are not fabricated.

GET/v1/organizations/{org}/webhooks/{hook}/deliveries/{delivery}/attempts

Console sessionAPI keylistWebhookDeliveryAttempts

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
hookWebhookEndpointIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
deliveryWebhookDeliveryIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Query parameters

cursorstring
limitinteger
Page size, 1 to 100 (default 25); values outside are clamped, and a non-integer means the default.

Returns

200 with data: WebhookDeliveryAttempt[]

GET/v1/organizations/{org}/webhooks/{hook}/deliveries/{delivery}/attempts
curl https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/webhooks/we_034aaypc8ldh0aAtyCQsOd/deliveries/whd_034aaypc8ls1iTqrkdnjhu/attempts \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"
Response200
{
  "data": [
    {
      "number": 1,
      "status_code": 100,
      "error_class": "status",
      "attempted_at": "2026-10-04T21:04:11.000Z",
      "duration_ms": 1
    }
  ],
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Queue a new pending delivery of the original event, preserving its ID and body and leaving the source history unchanged. Owners, admins and an API key for the endpoint's environment may resend, including in Production. The new delivery starts with zero attempts and the normal retry budget. A pending source (including an in-flight send) is 409 delivery_pending, a disabled endpoint 409 webhook_disabled, and one no longer subscribed 409 webhook_not_subscribed; webhook.test is exempt from subscriptions. A missing, foreign or wrong-endpoint delivery is 404. Normal POST idempotency applies. Records webhook.delivery_resent against the new webhook_delivery, attributed to the event's workspace and environment.

POST/v1/organizations/{org}/webhooks/{hook}/deliveries/{delivery}/resend

Console sessionAPI keyresendWebhookDelivery

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
hookWebhookEndpointIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
deliveryWebhookDeliveryIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Returns

201 with data: WebhookDeliverySummary

POST/v1/organizations/{org}/webhooks/{hook}/deliveries/{delivery}/resend
curl -X POST https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/webhooks/we_034aaypc8ldh0aAtyCQsOd/deliveries/whd_034aaypc8ls1iTqrkdnjhu/resend \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
Response201
{
  "data": {
    "id": "whd_034aaypc8ls1iTqrkdnjhu",
    "organization_id": "org_034WrceamQGAwHgTod2dHN",
    "endpoint_id": "we_034aaypc8ldh0aAtyCQsOd",
    "event_id": "evt_034aaypc8lddlN2hmXT90h",
    "environment": "sandbox",
    "event_type": "installation.connected",
    "event_created_at": "2026-10-04T21:04:11.000Z",
    "workspace": {
      "id": "ws_034a8swzUzvsQ2inuZzZfA",
      "external_id": "cus_1042"
    },
    "state": "pending",
    "attempts": 1,
    "last_status_code": 100,
    "last_error": "status",
    "last_attempt_at": "2026-10-04T21:04:11.000Z",
    "next_attempt_at": "2026-10-04T21:04:11.000Z",
    "created_at": "2026-10-04T21:04:11.000Z"
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Send a test delivery

POST/v1/organizations/{org}/webhooks/{hook}/test

Console sessionAPI keytestWebhook

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
hookWebhookEndpointIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Returns

200 with data: WebhookDelivery

POST/v1/organizations/{org}/webhooks/{hook}/test
curl -X POST https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/webhooks/we_034aaypc8ldh0aAtyCQsOd/test \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
Response200
{
  "data": {
    "status_code": 1,
    "delivered_at": "2026-10-04T21:04:11.000Z"
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

channel-app-managers

The workspace's linked teams, newest first

GET/v1/workspaces/{ws}/channel-app-managers

Console sessionAPI keylistChannelAppManagers

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Query parameters

cursorstring
limitinteger
Page size, 1 to 100 (default 25); values outside are clamped, and a non-integer means the default.

Returns

200 with data: ChannelAppManager[]

GET/v1/workspaces/{ws}/channel-app-managers
curl https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/channel-app-managers \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"
Response200
{
  "data": [
    {
      "id": "chmgr_034UNYVNxdX7o7BFB4Y0u2",
      "workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
      "provider": "slack",
      "method": "configuration_token",
      "team": {
        "id": "id",
        "name": "Acme Corp"
      },
      "status": "active",
      "configuration_token": {
        "set": true,
        "last4": "last4",
        "updated_at": null
      },
      "token_expires_at": "2026-10-04T21:04:11.000Z",
      "app_count": 3,
      "created_by": {
        "id": "usr_0344un49YpnirMXyqfkTed",
        "name": "Acme Corp",
        "email": "ada@example.com",
        "avatar_url": "https://example.com/asset"
      },
      "created_at": "2026-10-04T21:04:11.000Z",
      "updated_at": "2026-10-04T21:04:11.000Z"
    }
  ],
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Link a team with a configuration token, so Zupflow can create apps for the workspace's agents there. Developers and API keys; the Console can't in Production (403 console_read_only_in_production). A token the provider refuses is 422 invalid_configuration_token

POST/v1/workspaces/{ws}/channel-app-managers

Console sessionAPI keycreateChannelAppManager

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Body

providerChannelProviderrequired
method"configuration_token"required
configuration_tokenstringrequired
refresh_tokenstringrequired

Returns

201 with data: ChannelAppManager

POST/v1/workspaces/{ws}/channel-app-managers
curl -X POST https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/channel-app-managers \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "slack",
    "method": "configuration_token",
    "configuration_token": "configuration token",
    "refresh_token": "refresh token"
  }'
Response201
{
  "data": {
    "id": "chmgr_034UNYVNxdX7o7BFB4Y0u2",
    "workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
    "provider": "slack",
    "method": "configuration_token",
    "team": {
      "id": "id",
      "name": "Acme Corp"
    },
    "status": "active",
    "configuration_token": {
      "set": true,
      "last4": "last4",
      "updated_at": "2026-10-04T21:04:11.000Z"
    },
    "token_expires_at": "2026-10-04T21:04:11.000Z",
    "app_count": 3,
    "created_by": {
      "id": "usr_0344un49YpnirMXyqfkTed",
      "name": "Acme Corp",
      "email": "ada@example.com",
      "avatar_url": "https://example.com/asset"
    },
    "created_at": "2026-10-04T21:04:11.000Z",
    "updated_at": "2026-10-04T21:04:11.000Z"
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

A linked team

GET/v1/workspaces/{ws}/channel-app-managers/{manager}

Console sessionAPI keygetChannelAppManager

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
managerChannelAppManagerIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Returns

200 with data: ChannelAppManager

GET/v1/workspaces/{ws}/channel-app-managers/{manager}
curl https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/channel-app-managers/chmgr_034UNYVNxdX7o7BFB4Y0u2 \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"
Response200
{
  "data": {
    "id": "chmgr_034UNYVNxdX7o7BFB4Y0u2",
    "workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
    "provider": "slack",
    "method": "configuration_token",
    "team": {
      "id": "id",
      "name": "Acme Corp"
    },
    "status": "active",
    "configuration_token": {
      "set": true,
      "last4": "last4",
      "updated_at": "2026-10-04T21:04:11.000Z"
    },
    "token_expires_at": "2026-10-04T21:04:11.000Z",
    "app_count": 3,
    "created_by": {
      "id": "usr_0344un49YpnirMXyqfkTed",
      "name": "Acme Corp",
      "email": "ada@example.com",
      "avatar_url": "https://example.com/asset"
    },
    "created_at": "2026-10-04T21:04:11.000Z",
    "updated_at": "2026-10-04T21:04:11.000Z"
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Replace a linked team's tokens; it's active again. Developers and API keys; the Console can't in Production

PATCH/v1/workspaces/{ws}/channel-app-managers/{manager}

Console sessionAPI keyupdateChannelAppManager

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
managerChannelAppManagerIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Body

configuration_tokenstringrequired
refresh_tokenstringrequired

Returns

200 with data: ChannelAppManager

PATCH/v1/workspaces/{ws}/channel-app-managers/{manager}
curl -X PATCH https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/channel-app-managers/chmgr_034UNYVNxdX7o7BFB4Y0u2 \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "configuration_token": "configuration token",
    "refresh_token": "refresh token"
  }'
Response200
{
  "data": {
    "id": "chmgr_034UNYVNxdX7o7BFB4Y0u2",
    "workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
    "provider": "slack",
    "method": "configuration_token",
    "team": {
      "id": "id",
      "name": "Acme Corp"
    },
    "status": "active",
    "configuration_token": {
      "set": true,
      "last4": "last4",
      "updated_at": "2026-10-04T21:04:11.000Z"
    },
    "token_expires_at": "2026-10-04T21:04:11.000Z",
    "app_count": 3,
    "created_by": {
      "id": "usr_0344un49YpnirMXyqfkTed",
      "name": "Acme Corp",
      "email": "ada@example.com",
      "avatar_url": "https://example.com/asset"
    },
    "created_at": "2026-10-04T21:04:11.000Z",
    "updated_at": "2026-10-04T21:04:11.000Z"
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Unlink a team and forget its tokens. Refused while it has apps that aren't deleted, or deleted apps not yet removed at the provider (its tokens remove them; pasting new ones retries): 409 in_use

DELETE/v1/workspaces/{ws}/channel-app-managers/{manager}

Console sessionAPI keydeleteChannelAppManager

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
managerChannelAppManagerIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Returns

204 with an empty body

DELETE/v1/workspaces/{ws}/channel-app-managers/{manager}
curl -X DELETE https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/channel-app-managers/chmgr_034UNYVNxdX7o7BFB4Y0u2 \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"

channel-apps

The workspace's generated apps, newest first; deleted ones aren't listed

GET/v1/workspaces/{ws}/channel-apps

Console sessionAPI keylistChannelApps

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Query parameters

cursorstring
limitinteger
Page size, 1 to 100 (default 25); values outside are clamped, and a non-integer means the default.
agent_idAgentId
Only this agent's apps. A malformed or unknown ID matches nothing.
manager_idChannelAppManagerId
Only this manager's apps. A malformed or unknown ID matches nothing.

Returns

200 with data: ChannelApp[]

GET/v1/workspaces/{ws}/channel-apps
curl https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/channel-apps \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"
Response200
{
  "data": [
    {
      "id": "chapp_034UNYVNxdX7o9Sp4Z0kCa",
      "workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
      "manager_id": "chmgr_034UNYVNxdX7o7BFB4Y0u2",
      "agent_id": "agt_034ywLOuKYCjR5w5Q59KRz",
      "provider": "slack",
      "external_app_id": "external app id",
      "status": "creating",
      "last_error": "last error",
      "connection_id": "chcon_034UNYVNxd3k7NFOVSWyAe",
      "created_at": "2026-10-04T21:04:11.000Z",
      "updated_at": "2026-10-04T21:04:11.000Z"
    }
  ],
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Make an agent's own app in a linked team. Answers 202 with the app creating; a job makes it with the provider. Developers and API keys; the Console can't in Production

POST/v1/workspaces/{ws}/channel-apps

Console sessionAPI keycreateChannelApp

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Body

agent_idAgentIdrequired
manager_idChannelAppManagerIdrequired

Returns

202 with data: ChannelApp

POST/v1/workspaces/{ws}/channel-apps
curl -X POST https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/channel-apps \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id": "agt_034ywLOuKYCjR5w5Q59KRz",
    "manager_id": "chmgr_034UNYVNxdX7o7BFB4Y0u2"
  }'
Response202
{
  "data": {
    "id": "chapp_034UNYVNxdX7o9Sp4Z0kCa",
    "workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
    "manager_id": "chmgr_034UNYVNxdX7o7BFB4Y0u2",
    "agent_id": "agt_034ywLOuKYCjR5w5Q59KRz",
    "provider": "slack",
    "external_app_id": "external app id",
    "status": "creating",
    "last_error": "last error",
    "connection_id": "chcon_034UNYVNxd3k7NFOVSWyAe",
    "created_at": "2026-10-04T21:04:11.000Z",
    "updated_at": "2026-10-04T21:04:11.000Z"
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

A generated app; a deleted one is 404

GET/v1/workspaces/{ws}/channel-apps/{app}

Console sessionAPI keygetChannelApp

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
appChannelAppIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Returns

200 with data: ChannelApp

GET/v1/workspaces/{ws}/channel-apps/{app}
curl https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/channel-apps/chapp_034UNYVNxdX7o9Sp4Z0kCa \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"
Response200
{
  "data": {
    "id": "chapp_034UNYVNxdX7o9Sp4Z0kCa",
    "workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
    "manager_id": "chmgr_034UNYVNxdX7o7BFB4Y0u2",
    "agent_id": "agt_034ywLOuKYCjR5w5Q59KRz",
    "provider": "slack",
    "external_app_id": "external app id",
    "status": "creating",
    "last_error": "last error",
    "connection_id": "chcon_034UNYVNxd3k7NFOVSWyAe",
    "created_at": "2026-10-04T21:04:11.000Z",
    "updated_at": "2026-10-04T21:04:11.000Z"
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Remove an agent's app: its token is revoked and the provider's app deleted, its connection disconnected and the agent's channel on it removed

DELETE/v1/workspaces/{ws}/channel-apps/{app}

Console sessionAPI keydeleteChannelApp

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
appChannelAppIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Returns

204 with an empty body

DELETE/v1/workspaces/{ws}/channel-apps/{app}
curl -X DELETE https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/channel-apps/chapp_034UNYVNxdX7o9Sp4Z0kCa \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"

channel-connections

The workspace's channel connections, newest first

GET/v1/workspaces/{ws}/channel-connections

Console sessionAPI keylistChannelConnections

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Query parameters

cursorstring
limitinteger
Page size, 1 to 100 (default 25); values outside are clamped, and a non-integer means the default.
agent_idAgentId
Only this agent's connections. A malformed or unknown ID matches nothing.

Returns

200 with data: ChannelConnection[]

GET/v1/workspaces/{ws}/channel-connections
curl https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/channel-connections \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"
Response200
{
  "data": [
    {
      "id": "chcon_034UNYVNxd3k7NFOVSWyAe",
      "workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
      "provider": "slack",
      "app_id": "chapp_034UNYVNxdX7o9Sp4Z0kCa",
      "agent_id": "agt_034ywLOuKYCjR5w5Q59KRz",
      "short_id": "k7qmxa",
      "label": "label",
      "handler": "mention",
      "status": "connected",
      "team": {
        "id": "id",
        "name": "Acme Corp",
        "enterprise_id": "enterprise id"
      },
      "identity": {
        "external_id": "cus_1042",
        "handle": "handle"
      },
      "granted_scopes": [
        "granted scopes"
      ],
      "connected_at": "2026-10-04T21:04:11.000Z",
      "last_event_at": "2026-10-04T21:04:11.000Z",
      "created_at": "2026-10-04T21:04:11.000Z",
      "updated_at": "2026-10-04T21:04:11.000Z"
    }
  ],
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

A channel connection

GET/v1/workspaces/{ws}/channel-connections/{channel_connection}

Console sessionAPI keygetChannelConnection

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
channel_connectionChannelConnectionIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Returns

200 with data: ChannelConnection

GET/v1/workspaces/{ws}/channel-connections/{channel_connection}
curl https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/channel-connections/chcon_034UNYVNxd3k7NFOVSWyAe \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"
Response200
{
  "data": {
    "id": "chcon_034UNYVNxd3k7NFOVSWyAe",
    "workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
    "provider": "slack",
    "app_id": "chapp_034UNYVNxdX7o9Sp4Z0kCa",
    "agent_id": "agt_034ywLOuKYCjR5w5Q59KRz",
    "short_id": "k7qmxa",
    "label": "label",
    "handler": "mention",
    "status": "connected",
    "team": {
      "id": "id",
      "name": "Acme Corp",
      "enterprise_id": "enterprise id"
    },
    "identity": {
      "external_id": "cus_1042",
      "handle": "handle"
    },
    "granted_scopes": [
      "granted scopes"
    ],
    "connected_at": "2026-10-04T21:04:11.000Z",
    "last_event_at": "2026-10-04T21:04:11.000Z",
    "created_at": "2026-10-04T21:04:11.000Z",
    "updated_at": "2026-10-04T21:04:11.000Z"
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Rename a channel connection, or set its handler

PATCH/v1/workspaces/{ws}/channel-connections/{channel_connection}

Console sessionAPI keyupdateChannelConnection

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
channel_connectionChannelConnectionIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Body

labelstring
handler"mention"

Returns

200 with data: ChannelConnection

PATCH/v1/workspaces/{ws}/channel-connections/{channel_connection}
curl -X PATCH https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/channel-connections/chcon_034UNYVNxd3k7NFOVSWyAe \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "label": "label",
    "handler": "mention"
  }'
Response200
{
  "data": {
    "id": "chcon_034UNYVNxd3k7NFOVSWyAe",
    "workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
    "provider": "slack",
    "app_id": "chapp_034UNYVNxdX7o9Sp4Z0kCa",
    "agent_id": "agt_034ywLOuKYCjR5w5Q59KRz",
    "short_id": "k7qmxa",
    "label": "label",
    "handler": "mention",
    "status": "connected",
    "team": {
      "id": "id",
      "name": "Acme Corp",
      "enterprise_id": "enterprise id"
    },
    "identity": {
      "external_id": "cus_1042",
      "handle": "handle"
    },
    "granted_scopes": [
      "granted scopes"
    ],
    "connected_at": "2026-10-04T21:04:11.000Z",
    "last_event_at": "2026-10-04T21:04:11.000Z",
    "created_at": "2026-10-04T21:04:11.000Z",
    "updated_at": "2026-10-04T21:04:11.000Z"
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Disconnect: the token is revoked, and the connection, its conversations, messages and agent channel removed. Its app waits for a new install

DELETE/v1/workspaces/{ws}/channel-connections/{channel_connection}

Console sessionAPI keydeleteChannelConnection

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
channel_connectionChannelConnectionIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Returns

204 with an empty body

DELETE/v1/workspaces/{ws}/channel-connections/{channel_connection}
curl -X DELETE https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/channel-connections/chcon_034UNYVNxd3k7NFOVSWyAe \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"

The conversations a connection has seen messages in, most recent first; q searches names

GET/v1/workspaces/{ws}/channel-connections/{channel_connection}/conversations

Console sessionAPI keylistChannelConversations

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
channel_connectionChannelConnectionIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Query parameters

cursorstring
limitinteger
Page size, 1 to 100 (default 25); values outside are clamped, and a non-integer means the default.
qstring
kind"channel" | "private_channel" | "dm" | "group_dm"

Returns

200 with data: ChannelConversation[]

GET/v1/workspaces/{ws}/channel-connections/{channel_connection}/conversations
curl https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/channel-connections/chcon_034UNYVNxd3k7NFOVSWyAe/conversations \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"
Response200
{
  "data": [
    {
      "id": "conv_034UNYVNxd3k7BFPdmTECW",
      "workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
      "connection_id": "chcon_034UNYVNxd3k7NFOVSWyAe",
      "external_id": "cus_1042",
      "kind": "channel",
      "name": "Acme Corp",
      "is_external": true,
      "identity_is_member": true,
      "last_message_at": "2026-10-04T21:04:11.000Z",
      "paused_until": "2026-10-04T21:04:11.000Z",
      "created_at": "2026-10-04T21:04:11.000Z"
    }
  ],
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

A conversation's messages, newest first; thread keeps one thread's

GET/v1/workspaces/{ws}/channel-connections/{channel_connection}/conversations/{conversation}/messages

Console sessionAPI keylistChannelMessages

Path parameters

wsWorkspaceIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
channel_connectionChannelConnectionIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.
conversationChannelConversationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Query parameters

cursorstring
limitinteger
Page size, 1 to 100 (default 25); values outside are clamped, and a non-integer means the default.
threadstring

Returns

200 with data: ChannelMessage[]

GET/v1/workspaces/{ws}/channel-connections/{channel_connection}/conversations/{conversation}/messages
curl https://zupflow.example.com/v1/workspaces/ws_034a8swzUzvsQ2inuZzZfA/channel-connections/chcon_034UNYVNxd3k7NFOVSWyAe/conversations/conv_034UNYVNxd3k7BFPdmTECW/messages \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"
Response200
{
  "data": [
    {
      "id": "chmsg_034UNYVNxdRCAxtYiHCvOx",
      "workspace_id": "ws_034a8swzUzvsQ2inuZzZfA",
      "connection_id": "chcon_034UNYVNxd3k7NFOVSWyAe",
      "conversation_id": "conv_034UNYVNxd3k7BFPdmTECW",
      "external_id": "cus_1042",
      "thread_key": "thread key",
      "direction": "inbound",
      "author": {
        "id": "person_034UNYVNxdef4lbZTpLVrR",
        "handle": "handle",
        "display_name": "display name",
        "is_automated": true
      },
      "text": "text",
      "mentions": [
        "mentions"
      ],
      "run_id": "run_034NRN3tk3efa42EcmTqpS",
      "tool_call_id": "call_034ptAVGI4F0rFleDY0wrs",
      "agent_hop": 1,
      "sent_at": "2026-10-04T21:04:11.000Z",
      "edited_at": "2026-10-04T21:04:11.000Z",
      "deleted_at": "2026-10-04T21:04:11.000Z",
      "created_at": "2026-10-04T21:04:11.000Z"
    }
  ],
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

channel-tool-levels

The organization's level for every channel tool, by provider

GET/v1/organizations/{org}/channel-tool-levels

Console sessionAPI keylistChannelToolLevels

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Returns

200 with data: ChannelToolLevel[]

GET/v1/organizations/{org}/channel-tool-levels
curl https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/channel-tool-levels \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"
Response200
{
  "data": [
    {
      "provider": "slack",
      "tool": "list_issues",
      "level": "allow",
      "confirmed": true,
      "effect": "read",
      "updated_at": "2026-10-04T21:04:11.000Z",
      "updated_by": {
        "id": "usr_0344un49YpnirMXyqfkTed",
        "name": "Acme Corp",
        "email": "ada@example.com",
        "avatar_url": "https://example.com/asset"
      }
    }
  ],
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Set channel tool levels: owners and admins, from the Console

PUT/v1/organizations/{org}/channel-tool-levels

Console sessionupdateChannelToolLevels

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Body

providerChannelProviderrequired
levelsobject[]required

Returns

200 with data: ChannelToolLevel[]

PUT/v1/organizations/{org}/channel-tool-levels
curl -X PUT https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/channel-tool-levels \
  -H "Authorization: Bearer $CONSOLE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "slack",
    "levels": [
      {
        "tool": "list_issues",
        "level": "allow"
      }
    ]
  }'
Response200
{
  "data": [
    {
      "provider": "slack",
      "tool": "list_issues",
      "level": "allow",
      "confirmed": true,
      "effect": "read",
      "updated_at": "2026-10-04T21:04:11.000Z",
      "updated_by": {
        "id": "usr_0344un49YpnirMXyqfkTed",
        "name": "Acme Corp",
        "email": "ada@example.com",
        "avatar_url": "https://example.com/asset"
      }
    }
  ],
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

channel-settings

The organization's conversation breaker and message retention

GET/v1/organizations/{org}/channel-settings

Console sessionAPI keygetChannelSettings

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Returns

200 with data: ChannelSettings

GET/v1/organizations/{org}/channel-settings
curl https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/channel-settings \
  -H "Authorization: Bearer $ZUPFLOW_API_KEY"
Response200
{
  "data": {
    "organization_id": "org_034WrceamQGAwHgTod2dHN",
    "breaker_runs": 1,
    "breaker_window_minutes": 1,
    "breaker_pause_minutes": 1,
    "message_retention_days": 1,
    "updated_at": "2026-10-04T21:04:11.000Z",
    "updated_by": {
      "id": "usr_0344un49YpnirMXyqfkTed",
      "name": "Acme Corp",
      "email": "ada@example.com",
      "avatar_url": "https://example.com/asset"
    }
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

Set the conversation breaker and message retention: owners and admins, from the Console

PUT/v1/organizations/{org}/channel-settings

Console sessionupdateChannelSettings

Path parameters

orgOrganizationIdrequired
A malformed ID, or an ID of another type, answers 404 like a missing one.

Body

breaker_runsintegerrequired
breaker_window_minutesintegerrequired
breaker_pause_minutesintegerrequired
message_retention_daysintegerrequired

Returns

200 with data: ChannelSettings

PUT/v1/organizations/{org}/channel-settings
curl -X PUT https://zupflow.example.com/v1/organizations/org_034WrceamQGAwHgTod2dHN/channel-settings \
  -H "Authorization: Bearer $CONSOLE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "breaker_runs": 1,
    "breaker_window_minutes": 1,
    "breaker_pause_minutes": 1,
    "message_retention_days": 1
  }'
Response200
{
  "data": {
    "organization_id": "org_034WrceamQGAwHgTod2dHN",
    "breaker_runs": 1,
    "breaker_window_minutes": 1,
    "breaker_pause_minutes": 1,
    "message_retention_days": 1,
    "updated_at": "2026-10-04T21:04:11.000Z",
    "updated_by": {
      "id": "usr_0344un49YpnirMXyqfkTed",
      "name": "Acme Corp",
      "email": "ada@example.com",
      "avatar_url": "https://example.com/asset"
    }
  },
  "meta": {
    "pagination": {
      "next_cursor": null,
      "total": 3
    }
  },
  "error": null
}

channels

POST/channels/inbound/{inbound_ref}
curl -X POST https://zupflow.example.com/channels/inbound/inbound ref \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "type"
  }'
Response200
{
  "challenge": "challenge"
}