> ## Documentation Index
> Fetch the complete documentation index at: https://docs.goyappr.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Tool Bindings

> Requires tools:read. Answers "who is using this tool" — and, after a credential
rotation, "who still holds the old one". One row per agent binding, from the agent's
saved draft and from the revision it publishes calls from. Header values are never
part of this answer.


Requires `tools:read`. Answers the one question a credential rotation depends on: **which agents reference this tool, and does the new revision reach them.**

Each row is one binding — the agent, the binding id inside its workflow document, the revision the binding names, and the revision calls actually use. `published: true` means the binding is in the revision that agent is taking calls from right now; `draft: true` means it is in the draft an author is editing. A binding can be both.

## Reading it after a rotation

`rotation_reaches` is the column to sort by.

| Row | What it means |
| - | - |
| `tool_revision_policy: "follow_current"`, `rotation_reaches: true` | The binding moves with the tool. `effective_revision_id` is the head, so this agent is on the new header value once the tool's promotion completes. Nothing to do. |
| `tool_revision_policy: "pinned"`, `rotation_reaches: false` | The binding is held on the revision it names, and that revision still carries the **old** header value. Rotating the credential does not reach this agent. |

A pinned binding is deliberate — it is only ever created by a whole-document [save](https://docs.goyappr.com/api-reference/workflows/save.md) that sets `tool_revision_policy: "pinned"` — so the fix is deliberate too: save that binding back to `follow_current`, or [rebind](https://docs.goyappr.com/api-reference/workflows/rebind.md) it, then publish the agent.

## An archived tool

An archived tool keeps its bindings, so this answers for it as for any other: after a [`DELETE /tools/{id}`](https://docs.goyappr.com/api-reference/tools/delete) it lists the agents whose steps still name the tool. A version of the agent that is already live (`published: true`) keeps running the tool on calls until the agent is published again, and the agent cannot be published or duplicated until you [restore the tool](https://docs.goyappr.com/api-reference/tools/restore.md) or remove the step.

`total` counts every binding that references the tool, including any beyond the page; `has_more` says whether the page was cut. `head_revision_id` is `null` only while a brand-new tool is still being built.

## Example

```bash theme={null}
curl -s https://api.goyappr.com/functions/v1/api-v1/tools/7cb551bf-1964-4c62-9a16-8bb8b775e0c9/bindings \
  -H "Authorization: Bearer $YAPPR_API_KEY" \
  -H "x-company-id: $YAPPR_COMPANY_ID"
```

```json theme={null}
{
  "tool_id": "7cb551bf-1964-4c62-9a16-8bb8b775e0c9",
  "head_revision_id": "11c1028c-f6a3-49ad-b934-b183ff238ef5",
  "total": 2,
  "has_more": false,
  "data": [
    {
      "agent_id": "de851737-78cf-45db-9442-8a83c513484f",
      "agent_name": "Store one",
      "environment": "testing",
      "binding_id": "lookup-order",
      "tool_revision_policy": "follow_current",
      "tool_revision_id": "24f626ff-09ec-4b99-9254-1383db2700d5",
      "effective_revision_id": "11c1028c-f6a3-49ad-b934-b183ff238ef5",
      "rotation_reaches": true,
      "published": true,
      "draft": true
    }
  ]
}
```

Header values are never in this response, on any row — the same rule as [Get tool](https://docs.goyappr.com/api-reference/tools/get.md), which returns `configured_header_names` and nothing else about a stored credential.


## OpenAPI

````yaml GET /tools/{id}/bindings
openapi: 3.1.0
info:
  title: Yappr API
  description: >
    Create and manage AI voice agents, purchase phone numbers, configure tools,
    and initiate calls — all via REST.
  version: 1.0.0
  contact:
    url: https://goyappr.com
servers:
  - url: https://api.goyappr.com
    description: Production
security:
  - apiKey: []
paths:
  /tools/{id}/bindings:
    get:
      tags:
        - Tools
      summary: List the agents bound to a tool
      description: >
        Requires tools:read. Answers "who is using this tool" — and, after a
        credential

        rotation, "who still holds the old one". One row per agent binding, from
        the agent's

        saved draft and from the revision it publishes calls from. Header values
        are never

        part of this answer.
      operationId: listWorkflowToolBindings
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: The bindings that reference this tool.
          content:
            application/json:
              schema:
                type: object
                properties:
                  tool_id:
                    type: string
                    format: uuid
                  head_revision_id:
                    type: string
                    format: uuid
                    nullable: true
                    description: >-
                      The tool's current revision — what a follow-current
                      binding resolves to.
                  total:
                    type: integer
                    description: >-
                      Every binding that references this tool, including any
                      past the page.
                  has_more:
                    type: boolean
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        agent_id:
                          type: string
                          format: uuid
                        agent_name:
                          type: string
                        environment:
                          type: string
                          enum:
                            - local
                            - testing
                        binding_id:
                          type: string
                        tool_revision_policy:
                          type: string
                          enum:
                            - follow_current
                            - pinned
                          description: >-
                            follow_current moves with the tool; pinned stays on
                            the revision it names.
                        tool_revision_id:
                          type: string
                          format: uuid
                          description: The revision the binding names in the document.
                        effective_revision_id:
                          type: string
                          format: uuid
                          nullable: true
                          description: >-
                            The revision calls actually use — the head for
                            follow_current, the named one for pinned.
                        rotation_reaches:
                          type: boolean
                          description: >-
                            false means this binding still carries the header
                            values stored on an older revision.
                        published:
                          type: boolean
                          description: >-
                            This binding is in the revision the agent publishes
                            calls from.
                        draft:
                          type: boolean
                          description: This binding is in the agent's saved draft.
        '400':
          description: >-
            TOOLS_QUERY_INVALID: a query parameter this route does not read. It
            reads none, and anything sent is refused by name rather than
            ignored.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: >-
            WORKFLOW_NOT_FOUND — the tool is not in this workspace. An archived
            tool is answered like any other: it keeps its bindings, so this
            lists the agents whose steps still name it.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: >-
            WORKFLOW_TOOL_STORAGE_UNAVAILABLE — temporary; retry the same
            request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowError'
components:
  schemas:
    Error:
      type: object
      required:
        - error
        - code
      description: >
        Every error response - the secret-key API and the browser data plane
        alike - carries a

        human-readable `error` and a stable machine `code`, and a refusal that
        names what is

        wrong with the request carries `issues[]` too. Branch on `code`, never
        on the `error`

        text. A refusal that names nothing more specific carries the code its
        status means:

        `BAD_REQUEST` (400), `UNAUTHORIZED` (401, the browser data plane; the
        secret-key API

        answers `MISSING_KEY`, `INVALID_KEY` or `EXPIRED_KEY`), `BILLING_ERROR`
        (402),

        `FORBIDDEN` (403), `NOT_FOUND` (404), `METHOD_NOT_ALLOWED` (405),
        `CONFLICT` (409),

        `GONE` (410), `PAYLOAD_TOO_LARGE` (413), `UNSUPPORTED_MEDIA_TYPE` (415),

        `UNPROCESSABLE_REQUEST` (422), `RATE_LIMIT` (429), `INTERNAL_ERROR`
        (500),

        `UPSTREAM_ERROR` (502), `SERVICE_UNAVAILABLE` (503), `UPSTREAM_TIMEOUT`
        (504). Some

        refusals add members of their own beside these (a call request's
        `status`, a workflow's

        `current_version`); the operation says which.
      properties:
        error:
          type: string
          description: The refusal, in one sentence for a person. Its wording may change.
        code:
          type: string
          description: The stable code to branch on.
        issues:
          type: array
          description: >
            Each thing at fault, on a 400 or 422 that names them: every query
            parameter or body field, not just the first. `path` is the
            parameter's name or the field's location.
          items:
            type: object
            required:
              - code
              - message
            properties:
              code:
                type: string
                description: >-
                  query_param_unknown, query_param_repeated, query_param_blank,
                  query_param_invalid, field_unknown, field_required,
                  field_invalid, or the route's own word.
              path:
                type: string
              message:
                type: string
    WorkflowError:
      allOf:
        - $ref: '#/components/schemas/Error'
        - type: object
          required:
            - code
          properties:
            error:
              type: string
            code:
              type: string
            warnings:
              type: array
              description: >
                On WORKFLOW_VALIDATION_FAILED from Check or publish, the
                advisories beside the issues, in the shape of
                WorkflowValidation's warnings - strict_off_guidance when
                strict_mode is off, and every advisory about a binding or an
                input. The compiler's own graph advisories
                (during_output_advisory, sequence_branch_advisory,
                before_reference_missing_fallback, override_needs_strict,
                after_ending_coverage, after_any_end_waits,
                before_budget_inbound) arrive once the document compiles.
              items:
                type: object
                required:
                  - code
                  - message
                properties:
                  code:
                    type: string
                  message:
                    type: string
                  path:
                    type: string
                    maxLength: 1000
                  node_id:
                    type: string
                    maxLength: 64
                  label:
                    type: string
                    maxLength: 200
                    description: The step's label. Present only with node_id.
                  tool_name:
                    type: string
                    maxLength: 200
                  field:
                    type: string
                    maxLength: 200
            issues:
              type: array
              maxItems: 100
              items:
                type: object
                required:
                  - code
                  - path
                  - message
                properties:
                  code:
                    type: string
                    maxLength: 100
                  path:
                    type: string
                    maxLength: 1000
                  message:
                    type: string
                    maxLength: 2000
                  node_id:
                    type: string
                    maxLength: 64
                    description: >-
                      The step the issue belongs to - a conversation step, a
                      before-call step, a follow-up or a step inside a sequence,
                      by its `id`. An issue about a binding names the first step
                      that runs or offers it; absent only when no single step is
                      concerned (a binding no step uses, a schema).
                  label:
                    type: string
                    maxLength: 200
                    description: >-
                      That step's label, as the workflow document spells it - on
                      every code. Present only with `node_id`.
                  tool_name:
                    type: string
                    maxLength: 200
                    description: >-
                      On an issue about a binding, the name of the tool it runs.
                      `label` is never the tool's name.
                  field:
                    type: string
                    maxLength: 200
                    description: >-
                      On an issue about one input of a binding
                      (`/bindings/{n}/inputs/{field}`), that input's name.
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        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`).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.