Delete a procedure

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

Remove a procedure from an agent so it no longer follows those steps. Disable the procedure instead if you may want it back.

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

Deletes a procedure from an agent. Call it when a policy is retired or a procedure was created by mistake. The agent stops following it from its next message.

Deleting cannot be undone. To pause a procedure, set enabled to false with Update a procedure instead.

Request

DELETE /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 to delete, starting with prc_.

The call has no query parameters and no body. Other procedures that mention this one by name keep their text, so check them after you delete it. Without the procedure, the agent falls back to its sources and its general instructions for that kind of request.

Example request

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

const result = await response.json()
console.log(result.deleted)

Example response

A successful call returns 200 OK.

{
  "id": "prc_6h2q9m",
  "deleted": true
}

Response fields

Name Type Description
id string The ID of the procedure that was deleted.
deleted boolean Always true on success.

The response does not repeat the procedure. Read it with Get a procedure first if you want to keep a copy of its steps. See List procedures to confirm which procedures remain.

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, or the procedure was already deleted.
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.