Get a procedure

GET/v2/agents/{agentId}/procedures/{procedureId}

Fetch one procedure of an agent by its ID to read its name, description, steps and whether the agent currently follows it.

Working draft. These docs are illustrative: names, endpoints and examples describe the intended behaviour and can change before launch.

Returns a single procedure with all of its steps. Call it before you edit a procedure, to compare what is live with a copy in your repository, or to show the steps in your own tool.

Request

GET /v2/agents/{agentId}/procedures/{procedureId}

Path parameters:

Name Type Required Description
agentId string Yes The ID of the agent, starting with agt_.
procedureId string Yes The ID of the procedure, starting with prc_.

The call has no query parameters and no body. Find procedure IDs with List procedures. A disabled procedure can be read like any other.

Example request

curl https://api.askocto.co/v2/agents/agt_8f3k2m/procedures/prc_3v8k5d \
  -H "Authorization: Bearer $OCTO_API_KEY"
const response = await fetch(
  "https://api.askocto.co/v2/agents/agt_8f3k2m/procedures/prc_3v8k5d",
  { headers: { Authorization: `Bearer ${process.env.OCTO_API_KEY}` } },
)

const procedure = await response.json()
procedure.steps.forEach((step, index) => console.log(`${index + 1}. ${step}`))

Example response

A successful call returns 200 OK.

{
  "id": "prc_3v8k5d",
  "agentId": "agt_8f3k2m",
  "name": "Refund request",
  "description": "Use when a customer asks for their money back.",
  "steps": [
    "Look up the order.",
    "If the order is under 30 days old, offer a refund.",
    "Otherwise offer store credit and escalate if the customer objects."
  ],
  "enabled": true,
  "createdAt": "2026-02-12T10:00:00Z",
  "updatedAt": "2026-03-05T11:30:00Z"
}

Response fields

Name Type Description
id string The procedure ID, starting with prc_.
agentId string The agent the procedure belongs to.
name string The name of the procedure.
description string Tells the agent when the procedure applies.
steps array of strings The steps in order. The array position is the step number minus one.
enabled boolean Whether the agent follows the procedure.
createdAt, updatedAt string ISO 8601 UTC times.

To change a procedure, use Update a procedure.

Errors

Status Code When
401 unauthorized The API key is missing, malformed or deleted.
404 not_found The agent or the procedure does not exist in your workspace.
429 rate_limited Too many requests. Wait for the number of seconds in the Retry-After header.

Something unclear or missing? Tell us and we will fix the page.