agent

Close or reopen a thread

Changed on

Changes the thread's state as the person the grant names, but only if the state is still what the request expects: if it changed since the draft, the call is a 409. Only the organization that owns the thread (or Cardog staff) may close or reopen it; anyone else gets a 404.

The agent calls this only after the person approved the change. Costs 0 credits.

patch/v2/agent/org/issues/{issueId}/state

Request

  • Base URL
    https://api.cardog.app
  • Auth
    • API key in header x-api-key
    • or HTTP bearer

Path parameters

issueId, string uuid required

Thread ID from your organization's thread list, e.g. "3f2b9c1e-7a4d-4e8b-9c0f-1a2b3c4d5e6f"

Headers

X-Cardog-Agent-Grant, string required

An organization session token from POST /v2/agent/session, opened from an organization workspace and created for you. Required.

Request body

AgentOrgIssueStateRequest required
state, 'open' | 'closed' required

The state to set: open or closed

expectedState, 'open' | 'closed'

The state you expect the thread to be in now. If it has changed, the call fails with a conflict. Default: the opposite of state.

Response

The thread's new state

AgentOrgIssueState required
issue, object required

The thread and its new state

links, object required

Where to go next

Changes