Delete an action

DELETE/v2/agents/{agentId}/actions/{actionId}

Remove an action from an agent so it can no longer use it. Disable the action 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 an action from an agent. Call it when an integration is retired or an action was created by mistake. The agent stops using the action right away.

Deleting cannot be undone. If you only want to pause an action, set enabled to false with Update an action instead.

Request

DELETE /v2/agents/{agentId}/actions/{actionId}

Path parameters:

Name Type Required Description
agentId string Yes The ID of the agent, starting with agt_.
actionId string Yes The ID of the action to delete, starting with act_.

The call has no query parameters and no body. Procedures that mention the action keep their text. Check them under Build > Procedures, because a step that relies on a deleted action cannot run.

Example request

curl -X DELETE https://api.askocto.co/v2/agents/agt_8f3k2m/actions/act_9m2x6e \
  -H "Authorization: Bearer $OCTO_API_KEY"
const response = await fetch(
  "https://api.askocto.co/v2/agents/agt_8f3k2m/actions/act_9m2x6e",
  {
    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": "act_9m2x6e",
  "deleted": true
}

Response fields

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

The response does not repeat the action, so keep a copy of its configuration if you may want to recreate it later. Read it with Get an action before you delete it. See List actions to confirm which actions remain.

Errors

Status Code When
401 unauthorized The API key is missing, malformed or deleted.
404 not_found The agent or the action does not exist, or the action 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.