> ## 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 an account's choices for an input

> Requires tool-connections:read. The values an action input can be fixed to on this connected account, so an author picks one instead of typing its id. Today the one resource is calendars: the calendars of a Google Calendar account the account can write to, the main one first with the value primary (what every Google Calendar action already uses for it). Read live through the account's own "List calendars" action, a read with no effect (it is made ready on the first call; an API key doing that also needs tools:create and tools:update). Waits up to about ten seconds; when the account is still answering then, the answer is 202 with status "loading" and Retry-After, and the same listing goes on: ask again after Retry-After and it answers. One caller's listings of one account within two minutes share one read, and a listed account is reused for a few minutes. 409 RESOURCE_OPTIONS_RECONNECT_REQUIRED means Google refused the account's read: reconnect it. Use a value as a Fixed source ({"kind": "literal", "value": ["<value>"]} for items) or as a choice of a list. Takes no query parameters.


Requires `tool-connections:read`. The values an action input can be fixed to on a connected account, so you pick one instead of typing its id. Today the one resource is `calendars`: the calendars of a Google Calendar account that the account can write to, the main one first with the value `primary`.

```bash theme={null}
curl https://api.goyappr.com/tool-connections/CONNECTION_ID/options/calendars \
  -H "Authorization: Bearer YOUR_API_KEY"
```

```json theme={null}
{
  "resource": "calendars",
  "data": [
    { "value": "primary", "label": "Front desk", "primary": true, "detail": "owner" },
    { "value": "c_1a2b3c@group.calendar.google.com", "label": "Clinic", "primary": false, "detail": "writer" }
  ]
}
```

Fix an input to one of them - `{"kind": "literal", "value": ["c_1a2b3c@group.calendar.google.com"]}` for find free time's `items`, the id as text for `calendar_id` - or offer several as a list the agent chooses from by name. See [setting inputs](https://docs.goyappr.com/api-reference/agents/integrations-add.md#set-how-each-input-is-filled).

The list is read live from the account through its own "List calendars" action, a read with no effect, made ready on the first call (an API key doing that also needs `tools:create`, and `tools:update` to run it).

A listing waits up to about ten seconds. When the account is still answering then, the answer is `202` with `Retry-After` and the listing goes on; ask again after that many seconds and the same listing answers:

```json theme={null}
{ "resource": "calendars", "data": [], "status": "loading", "retry_after": 4, "message": "The calendars are still loading from the account. Ask again in a few seconds; the same listing answers." }
```

Your listings of one account within two minutes share one read, so asking again (or asking from several places at once) does not start another. Each read leaves one ordinary test of the account's "List calendars" tool behind (a test, not a delivery: the deliveries log does not list it). Cache the answer for a few minutes; the dashboard keeps it for five.

Refusals: `404 TOOL_CONNECTION_NOT_FOUND`, `409 TOOL_CONNECTION_NOT_READY` or `409 RESOURCE_OPTIONS_RECONNECT_REQUIRED` (Google refused the account's read, so its sign-in expired or lost access: reconnect it with `POST /tool-connections/{id}/reconnect`), `422 RESOURCE_UNSUPPORTED` (another resource, or an account that is not Google Calendar), `429 RESOURCE_OPTIONS_BUSY` (too many tests running in the workspace; `Retry-After`), `400 TOOL_CONNECTIONS_QUERY_INVALID` (a query parameter). `503 RESOURCE_OPTIONS_PROVIDER_UNAVAILABLE` means Google Calendar did not answer usefully three times (`Retry-After: 30`); `503 RESOURCE_OPTIONS_UNAVAILABLE` means the listing failed on our side. In every case you can type the calendar ID instead.


## OpenAPI

````yaml GET /tool-connections/{id}/options/{resource}
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:
  /tool-connections/{id}/options/{resource}:
    get:
      tags:
        - Connected accounts
      summary: List the choices an account offers for an action input
      description: >
        Requires tool-connections:read. The values an action input can be fixed
        to on this connected account, so an author picks one instead of typing
        its id. Today the one resource is calendars: the calendars of a Google
        Calendar account the account can write to, the main one first with the
        value primary (what every Google Calendar action already uses for it).
        Read live through the account's own "List calendars" action, a read with
        no effect (it is made ready on the first call; an API key doing that
        also needs tools:create and tools:update). Waits up to about ten
        seconds; when the account is still answering then, the answer is 202
        with status "loading" and Retry-After, and the same listing goes on: ask
        again after Retry-After and it answers. One caller's listings of one
        account within two minutes share one read, and a listed account is
        reused for a few minutes. 409 RESOURCE_OPTIONS_RECONNECT_REQUIRED means
        Google refused the account's read: reconnect it. Use a value as a Fixed
        source ({"kind": "literal", "value": ["<value>"]} for items) or as a
        choice of a list. Takes no query parameters.
      operationId: listToolConnectionOptions
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
            format: uuid
        - name: resource
          in: path
          required: true
          schema:
            type: string
            enum:
              - calendars
      responses:
        '200':
          description: The account's choices.
          content:
            application/json:
              schema:
                type: object
                required:
                  - resource
                  - data
                properties:
                  resource:
                    type: string
                    enum:
                      - calendars
                  data:
                    type: array
                    items:
                      type: object
                      required:
                        - value
                        - label
                      properties:
                        value:
                          type: string
                          description: >-
                            The value to fix the input to; the main calendar is
                            "primary".
                        label:
                          type: string
                          description: The calendar's name as the account shows it.
                        primary:
                          type: boolean
                        detail:
                          type:
                            - string
                            - 'null'
                          description: 'The account''s access to it: owner or writer.'
              example:
                resource: calendars
                data:
                  - value: primary
                    label: Front desk
                    primary: true
                    detail: owner
                  - value: c_1a2b3c@group.calendar.google.com
                    label: Clinic
                    primary: false
                    detail: writer
        '202':
          description: >-
            The account is still answering. The listing goes on; ask again after
            Retry-After (seconds) and the same listing answers.
          headers:
            Retry-After:
              schema:
                type: integer
              description: Seconds to wait before asking again.
          content:
            application/json:
              schema:
                type: object
                required:
                  - resource
                  - data
                  - status
                  - retry_after
                  - message
                properties:
                  resource:
                    type: string
                    enum:
                      - calendars
                  data:
                    type: array
                    maxItems: 0
                    items:
                      type: object
                  status:
                    type: string
                    enum:
                      - loading
                  retry_after:
                    type: integer
                    description: Seconds to wait before asking again.
                  message:
                    type: string
              example:
                resource: calendars
                data: []
                status: loading
                retry_after: 4
                message: >-
                  The calendars are still loading from the account. Ask again in
                  a few seconds; the same listing answers.
        '400':
          description: >-
            TOOL_CONNECTIONS_QUERY_INVALID: a query parameter was sent; this
            read takes none, and the message names it.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            INSUFFICIENT_SCOPE, WORKFLOW_ACTOR_DENIED (the key needs
            tools:create to make the listing action ready and tools:update to
            run it), or WORKFLOW_ENVIRONMENT_MISMATCH.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: TOOL_CONNECTION_NOT_FOUND.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: >-
            TOOL_CONNECTION_NOT_READY (the account is not signed in), or
            RESOURCE_OPTIONS_RECONNECT_REQUIRED (Google refused the account's
            read: its sign-in expired or lost access). Either way, reconnect the
            account (POST /tool-connections/{id}/reconnect); meanwhile type the
            calendar ID.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: >-
            RESOURCE_UNSUPPORTED: not a resource this account lists (calendars
            needs a Google Calendar account).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: >-
            RESOURCE_OPTIONS_BUSY: too many tests are running in this workspace
            (Retry-After).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: >-
            RESOURCE_OPTIONS_PROVIDER_UNAVAILABLE (Google Calendar did not
            answer usefully three times; Retry-After 30), or
            RESOURCE_OPTIONS_UNAVAILABLE (the listing failed on our side;
            Retry-After). Type the calendar ID instead, or try again.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
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
  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.