Skip to main content
POST
Restore tool
Requires tools:update. Puts an archived workflow tool back: it is offered again wherever a tool is picked, and every agent whose workflow still has a step bound to it can be published and duplicated again. Nothing else changes. Its revisions, bindings and history were kept while it was archived, so the tool comes back exactly as it was, switched on.
The answer is the tool, as GET /tools/{id} returns it, with one more field:
restored is false when the tool was not archived: the request is harmless to repeat, and a lost response is safe to send again. The request takes no body. Send none, or {}; any field is refused by name, so a setting you meant to make is never dropped in silence.

Finding an archived tool

An archived tool is left out of both tool lists, and reads in a short form. status=archived lists them — on the canonical list, paged by cursor, or on the default list:
GET /tools/{id} answers an archived tool the same way. Its revisions are not read while it is archived; restoring it answers the whole tool again.

When to use it

Archiving a tool that agents still bind answers with a tool_in_use warning naming them (see Archive Tool). From then on those agents refuse to publish or duplicate with WORKFLOW_REFERENCE_INVALID — “Restore the tool, or remove the step”. This is the restore that sentence means.

Errors

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

The tool, as GET /tools/{id} answers with it, and whether it had been archived.

Temporary legacy webhook/function migration boundary. New tools use the workflow variant.

id
string<uuid>
required
type
enum<string>
required
Available options:
webhook,
function
name
string

Normalized to camelCase (e.g. 'capture_lead' → 'captureLead')

description
string | null
config
object

Webhook configuration. Request header values are never returned: a read omits config.headers entirely and reports the names in config.configured_header_names. Writes are per header, the same rule a workflow tool follows — omitting headers keeps every stored header, an explicit empty object clears them all, a string sets one, null keeps the value already stored under that exact name, and a stored name you leave out of a headers you did send is removed. On POST /tools nothing is stored yet, so null is refused with 400. A legacy transfer tool (made in the dashboard) carries destination, announce_transfer and announce_message, and may carry transfer_method, pbx_feature_code and pbx_feature_code_hangup_after_secs: the same keys, values and rules as on a flow's TransferNode, with destination in place of transfer_to.

is_active
boolean
created_at
string<date-time>
updated_at
string<date-time>
restored
boolean

True when the tool was archived and is now back; false when it was not archived.