Skip to main content
DELETE
Archive tool
Requires tools:update. Workflow-owned tools are archived and removed from new authoring selections and test admission. Their immutable revisions, accepted runs, receipts and history are retained. Archiving does not undo an action that already started or rewrite a previously accepted run.
A tool whose creation failed — workflow.status: "failed" and workflow.current: null — is removed the same way: it leaves GET /tools?workflow=true&status=failed and GET /tools/{id} (which then answers 404), and the record of what was asked for is kept. There is nothing left to remove after that, so a second DELETE answers 404. One still being built answers 409 WORKFLOW_TOOL_CONFLICT; wait for it to settle. To build it instead, send it again.

Agents that still use it

A tool that agents still bind is archived all the same, and the answer says who they are. Each one keeps its step. A version of it that is already live keeps running the tool on calls until that agent is published again — nothing at call time reads whether a tool is archived — and the agent refuses to publish or duplicate (WORKFLOW_REFERENCE_INVALID, tool_archived at the step’s binding) until you restore the tool or remove the step:
To check before archiving, GET /tools/{id}/bindings lists the same agents.

A tool an integration runs

A tool whose GET /tools/{id} carries integration belongs to an integration. While any agent still uses it, DELETE answers 409 INTEGRATION_ACTION_MANAGED and nothing is archived: remove the integration, or that action, from those agents first with DELETE /agents/{id}/integrations/{integration_id} or PATCH. Once no agent uses it, it is archived like any other tool.

Repeating it

Archiving is idempotent. A tool that is already archived answers 200 again, with the same archived_at — the moment it was first archived — and the same tool_in_use warning while agents still use it, and nothing is written, so its updated_at stays where the first archive left it. A lost response is safe to repeat, and you never need to check the tool’s state first. 404 WORKFLOW_NOT_FOUND means the tool is not in this workspace at all. A 503 WORKFLOW_STORAGE_UNAVAILABLE is temporary and safe to retry. Existing legacy tools retain their temporary deactivation semantics. The endpoint never deletes provider accounts; connected-account disconnect is a separate scoped operation.

Authorizations

Authorization
string
header
required

Your Yappr API key (e.g. ypr_live_...). Generate one in the dashboard under Settings → API Keys. No key is 401 MISSING_KEY; a key that is not one of ours, or is revoked, is 401 INVALID_KEY; an expired one is 401 EXPIRED_KEY. A valid key without the scope an operation needs is 403 INSUFFICIENT_SCOPE on every operation, and the message names the scope. Every response, a 401 included, carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset: the budget is 60 requests a minute per API key. Every 429, whatever its code, carries Retry-After (whole seconds, never zero): the per-key budget's RATE_LIMIT asks for what is left of the minute, a route's daily cap (RATE_LIMITED) for the time until that cap resets. All four headers are listed in Access-Control-Expose-Headers, so a browser can read them. A path the API does not serve (an unknown sub-path, an id left empty) is 404 ROUTE_NOT_FOUND, and a method a served path does not take is 405 METHOD_NOT_ALLOWED with an Allow header; both are answered before any scope check, and nothing is read or changed. A trailing slash is ignored where it cannot be an id left empty (POST /calls/ is POST /calls) and refused where it can (GET /calls/). A doubled slash inside a path is merged into one before the request reaches the API (GET //calls is GET /calls).

Path Parameters

id
string<uuid>
required

Response

Tool archived. Archiving is idempotent: a tool that is already archived answers 200 with the same body and keeps the moment it was first archived, so a lost response is safe to repeat.

archived
boolean

True for an archived workflow tool.

archived_at
string<date-time>

When a workflow tool was first archived. Repeating the archive answers the same moment.

warnings
object[]

Present when agents still bind the tool. A version they already have live keeps running it on calls until they are published again, and they refuse to publish or duplicate (WORKFLOW_REFERENCE_INVALID) until the tool is restored with POST /tools/{id}/restore or the steps are removed.

success
boolean
id
string<uuid>
is_active
boolean
Example:

false