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

# Call email_text.start_flow

> Start a new email and text flow from what the member has told you: a one-off email, a sequence of emails and texts on a timer, or a flow that starts when something happens to a contact — 'invite my regulars to the tasting on Thursday', 'set up a welcome series for new sign-ups', 'when someone books, text them a reminder the day before'. Call it first, in the turn the member asks for a new flow and says what it is for ('a sequence for people who finished my free course' is enough), before searching their material or asking anything about it: pass who it reaches and when it starts when they said them and leave them out otherwise; what you cannot infer (who it reaches, the offer, the words) is asked after it, in that turn's one `ask_user`. Every call names the flow it makes: a call with a new name makes a new flow, even in a conversation about another flow, which it never changes; a repeat with the same name in the same conversation answers the flow that name started and changes nothing on it. It creates the flow as a draft on the member's project with no steps yet, fills in the audience and start, and opens the flow beside the conversation; its first email or text appears when you write it with `email_message.write`; nothing is sent and nothing runs until it is turned on, which is `automations.activate`'s approval card. For a sequence of several messages, say in written_by who writes them, and do what the answer's next_step says; when the member has not said, its next_ask is the question to put with `ask_user`, next_choices its options: whether they have it written or want you to write it. A welcome, thank-you or newsletter flow sells nothing: it takes no pipeline and no path is proposed for it, whatever the brand sells. A flow selling something (a booked call, a purchase, a demo, an enquiry), or a step on a path to a sale (its people booked, applied, started a trial or bought a first thing: a free course before a paid one, a book bought before a course), puts each person in a sales pipeline at the stage they are at, chosen from the answer's `pipelines` before its messages are written. A pipeline fits when this flow's people are on its path: one of its stages names what they did or bought, or what they did leads on to its stages (a booked call on a path to coaching); a product its stages never name, on a path it does not lead to, is not on it (a kit's buyers, on a book-and-course path). When one pipeline fits, take it and its stage and say so in one line ('Putting these people at Course on your Course and coaching path'). When two or more fit, ask which in that `ask_user`, beside the which-way ask, naming each by its stages ('your Book path, Book download → Bought the book → Course, or your Course and coaching path, Free course → Course → Coaching?'), and leave the pick to them. The pick is set with `automations.bind_step` by the pipeline's id from `pipelines` and the stage's name: an `opportunity.open` step at that stage and, when that stage comes after the pipeline's first, its own `opportunity.move_stage` step to the same stage, since the open keeps a deal a person already holds where it is and only the move takes it on. When `pipelines` is empty or none fits, propose the brand's whole customer path as one pipeline in that same question, as one line of stages joined by → ending in Use this? ('Here's the path I see for Good to Growing: Free guide → Bought the book (start here) → Course → Coaching → Lost. Use this?'). Build it from what the brand sells (the answer's `brand.sells`) and from this flow: four to seven stages in the order a customer moves through them, each named in the brand's plain words after what it sells, the stage this flow's people start at marked (start here), a handoff stage when the brand passes its customers on to another brand, and Lost last. A brand that sells one thing gets three stages: that thing, Bought, Lost. A path longer than seven keeps seven and says 'I kept it to seven; tell me if you sell more'. When `brand.sells` names nothing, propose the path from this flow alone (the stage its people are at, then Lost), ending in Use this?, with one line saying the brand facts list nothing it sells yet, so the rest of the path follows once they say; every stage names something the brand sells or the member said. Their reply may rename, reorder, add or drop stages. When they turn the path down, build the flow with no pipeline step and say so. A path keeps one pipeline: a flow for a later step of it (a free course after a book download, an intro call after a demo) takes the existing pipeline at that later stage, never a new one. When that later step is not yet a stage on the pipeline (people who booked a call, on a path with no call stage), offer to add it in that `ask_user`, naming where it goes ('Add Call booked after Course?').

Every result names the workspace it ran in. Say which workspace the answer is about. When the account has more than one workspace and none is selected, this tool refuses with `workspace_ambiguous` and lists the choices — offer them, never pick one.



## OpenAPI

````yaml /openapi.json post /api/v1/tools/email_text.start_flow
openapi: 3.1.0
info:
  title: Goosy Bear API
  version: 1.0.0-beta
  summary: Manage workspace content, projects, Data tables, Pages, library and credits.
  description: >-
    BETA. This API is in beta: paths, request shapes and response envelopes may
    change, and every response carries an `x-goosy-api: beta` header for as long
    as that is true. A change is additive, or it is deprecated first: a response
    to a call that uses a deprecated feature carries `Deprecation` and `Sunset`
    headers, and nothing is removed until at least 90 days after its
    deprecation. Pin the OpenAPI document you generated against and re-generate
    when it changes.
servers:
  - url: https://app.goosybear.ai
    description: Production
security:
  - tenantApiKey: []
paths:
  /api/v1/tools/email_text.start_flow:
    post:
      tags:
        - email_text
      summary: Call email_text.start_flow
      description: >-
        Start a new email and text flow from what the member has told you: a
        one-off email, a sequence of emails and texts on a timer, or a flow that
        starts when something happens to a contact — 'invite my regulars to the
        tasting on Thursday', 'set up a welcome series for new sign-ups', 'when
        someone books, text them a reminder the day before'. Call it first, in
        the turn the member asks for a new flow and says what it is for ('a
        sequence for people who finished my free course' is enough), before
        searching their material or asking anything about it: pass who it
        reaches and when it starts when they said them and leave them out
        otherwise; what you cannot infer (who it reaches, the offer, the words)
        is asked after it, in that turn's one `ask_user`. Every call names the
        flow it makes: a call with a new name makes a new flow, even in a
        conversation about another flow, which it never changes; a repeat with
        the same name in the same conversation answers the flow that name
        started and changes nothing on it. It creates the flow as a draft on the
        member's project with no steps yet, fills in the audience and start, and
        opens the flow beside the conversation; its first email or text appears
        when you write it with `email_message.write`; nothing is sent and
        nothing runs until it is turned on, which is `automations.activate`'s
        approval card. For a sequence of several messages, say in written_by who
        writes them, and do what the answer's next_step says; when the member
        has not said, its next_ask is the question to put with `ask_user`,
        next_choices its options: whether they have it written or want you to
        write it. A welcome, thank-you or newsletter flow sells nothing: it
        takes no pipeline and no path is proposed for it, whatever the brand
        sells. A flow selling something (a booked call, a purchase, a demo, an
        enquiry), or a step on a path to a sale (its people booked, applied,
        started a trial or bought a first thing: a free course before a paid
        one, a book bought before a course), puts each person in a sales
        pipeline at the stage they are at, chosen from the answer's `pipelines`
        before its messages are written. A pipeline fits when this flow's people
        are on its path: one of its stages names what they did or bought, or
        what they did leads on to its stages (a booked call on a path to
        coaching); a product its stages never name, on a path it does not lead
        to, is not on it (a kit's buyers, on a book-and-course path). When one
        pipeline fits, take it and its stage and say so in one line ('Putting
        these people at Course on your Course and coaching path'). When two or
        more fit, ask which in that `ask_user`, beside the which-way ask, naming
        each by its stages ('your Book path, Book download → Bought the book →
        Course, or your Course and coaching path, Free course → Course →
        Coaching?'), and leave the pick to them. The pick is set with
        `automations.bind_step` by the pipeline's id from `pipelines` and the
        stage's name: an `opportunity.open` step at that stage and, when that
        stage comes after the pipeline's first, its own `opportunity.move_stage`
        step to the same stage, since the open keeps a deal a person already
        holds where it is and only the move takes it on. When `pipelines` is
        empty or none fits, propose the brand's whole customer path as one
        pipeline in that same question, as one line of stages joined by → ending
        in Use this? ('Here's the path I see for Good to Growing: Free guide →
        Bought the book (start here) → Course → Coaching → Lost. Use this?').
        Build it from what the brand sells (the answer's `brand.sells`) and from
        this flow: four to seven stages in the order a customer moves through
        them, each named in the brand's plain words after what it sells, the
        stage this flow's people start at marked (start here), a handoff stage
        when the brand passes its customers on to another brand, and Lost last.
        A brand that sells one thing gets three stages: that thing, Bought,
        Lost. A path longer than seven keeps seven and says 'I kept it to seven;
        tell me if you sell more'. When `brand.sells` names nothing, propose the
        path from this flow alone (the stage its people are at, then Lost),
        ending in Use this?, with one line saying the brand facts list nothing
        it sells yet, so the rest of the path follows once they say; every stage
        names something the brand sells or the member said. Their reply may
        rename, reorder, add or drop stages. When they turn the path down, build
        the flow with no pipeline step and say so. A path keeps one pipeline: a
        flow for a later step of it (a free course after a book download, an
        intro call after a demo) takes the existing pipeline at that later
        stage, never a new one. When that later step is not yet a stage on the
        pipeline (people who booked a call, on a path with no call stage), offer
        to add it in that `ask_user`, naming where it goes ('Add Call booked
        after Course?').


        Every result names the workspace it ran in. Say which workspace the
        answer is about. When the account has more than one workspace and none
        is selected, this tool refuses with `workspace_ambiguous` and lists the
        choices — offer them, never pick one.
      operationId: call_email_text_start_flow
      parameters:
        - name: x-request-id
          in: header
          required: false
          description: >-
            Your own id for this request, echoed back and recorded on the audit
            trail. 1–128 characters from `A–Z a–z 0–9 . _ : -`, starting with a
            letter or digit; anything else is replaced by a generated id.
          schema:
            type: string
            maxLength: 128
        - name: Idempotency-Key
          in: header
          required: true
          description: >-
            Your key for this write: send the same key when you retry and the
            first result comes back instead of a second action. Keys are
            honoured for at least 24 hours. 1–200 visible ASCII characters.
            Replaces the `idempotency_key` body field, which still works until
            2026-12-31; this action needs a key on one of the two, and the
            header is the one to send.
          schema:
            type: string
            maxLength: 200
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 120
                  description: >-
                    What the flow is called, in the member's words, e.g.
                    `Tasting night invite` or `Welcome series`.
                first_message:
                  description: >-
                    The channel of the flow's first message: `email` (the
                    default) or `text`; `none` for a flow that sends nobody
                    anything and only does something for each person, such as a
                    task for the team or a tag when someone replies or reaches a
                    lead score.
                  type: string
                  enum:
                    - email
                    - text
                    - none
                written_by:
                  description: >-
                    Only for a sequence of two or more messages, who writes
                    them: `member` when they paste or upload what they have
                    (finished emails, notes for emails, or a mix), `goosy` when
                    they ask you to write the messages ('write it for me', 'you
                    write the emails'), `not_said` when they have not said
                    which: asking you to build, make or set up a sequence does
                    not say who writes it. Leave it out for a single email or
                    text.
                  type: string
                  enum:
                    - member
                    - goosy
                    - not_said
                audience:
                  description: >-
                    Who it reaches: name at least one group. It replaces the
                    whole audience the flow had.
                  type: object
                  properties:
                    tags:
                      description: Tag names; a person with any one of them is in.
                      minItems: 1
                      type: array
                      items:
                        type: string
                        minLength: 1
                    exclude_tags:
                      description: >-
                        Tag names to leave out of a one-off or a sequence's
                        audience: a person with any one of them is not reached,
                        even when another group names them ('everyone tagged
                        Bought the book, except people tagged Downloaded
                        toolkit'). Read at each send. It only narrows: name
                        another group too. Not for a flow that starts when
                        something happens (a tag, a form, a booking), which has
                        no audience: skip people with a tag there with a branch
                        step whose arm tests the tag (`automations.bind_step`).
                      minItems: 1
                      type: array
                      items:
                        type: string
                        minLength: 1
                    pipeline_ids:
                      description: >-
                        Pipelines: a person who already has an open deal in any
                        of them is in.
                      minItems: 1
                      type: array
                      items:
                        type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
                    stage_ids:
                      description: >-
                        Pipeline stages: a person who already has an open deal
                        in any of them is in.
                      minItems: 1
                      type: array
                      items:
                        type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
                    view_ids:
                      description: >-
                        Saved contact views from the Sales page, by id: a person
                        in any of them is in.
                      minItems: 1
                      type: array
                      items:
                        type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
                    contact_ids:
                      description: >-
                        Named contacts, by their contact ids: each one is in.
                        For a send to people the member names.
                      minItems: 1
                      type: array
                      items:
                        type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
                    people:
                      description: >-
                        Named people, by name or email address as the member
                        says them: each is looked up in the workspace's contacts
                        and is in. Never make a tag or view for them.
                      minItems: 1
                      type: array
                      items:
                        type: string
                        minLength: 1
                        maxLength: 200
                  additionalProperties: false
                start:
                  description: >-
                    When it starts: `now` sends to everyone in the audience when
                    it is turned on; `at` sends once, at that date and time, to
                    whoever matches then; `schedule` sends on each tick to
                    whoever matches then; `event` starts it for each person when
                    the event happens to them in this brand, and turning it on
                    also sends to everyone already in the audience. Another
                    brand's event never starts it: put that brand in `brand` and
                    the start is refused, nothing saved.
                  oneOf:
                    - type: object
                      properties:
                        when:
                          type: string
                          const: now
                      required:
                        - when
                      additionalProperties: false
                    - type: object
                      properties:
                        when:
                          type: string
                          const: at
                        local_date_time:
                          type: string
                          pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$
                          description: >-
                            When it sends, once, as `YYYY-MM-DDTHH:mm` on the
                            workspace's clock, e.g. `2026-11-06T10:00`.
                        timezone:
                          description: >-
                            Only when the workspace has no time zone set: an
                            IANA timezone, e.g. `America/Chicago`. Ask rather
                            than assume one.
                          type: string
                          minLength: 1
                          maxLength: 64
                      required:
                        - when
                        - local_date_time
                      additionalProperties: false
                    - type: object
                      properties:
                        when:
                          type: string
                          const: schedule
                        cron:
                          type: string
                          minLength: 1
                          maxLength: 120
                          description: >-
                            Five cron fields, e.g. `0 9 * * 1` for Mondays at
                            9:00; each send reaches whoever matches then.
                        timezone:
                          type: string
                          minLength: 1
                          maxLength: 64
                          description: >-
                            An IANA timezone, e.g. `America/Chicago`. Ask rather
                            than assume one.
                      required:
                        - when
                        - cron
                        - timezone
                      additionalProperties: false
                    - type: object
                      properties:
                        when:
                          type: string
                          const: event
                        event_key:
                          type: string
                          minLength: 1
                          description: >-
                            What happens to a person that starts the flow for
                            them, as the trigger catalogue names it, e.g.
                            `crm.tag_applied`.
                        tag:
                          description: 'For `crm.tag_applied`: the one tag that starts it.'
                          type: string
                          minLength: 1
                        form:
                          description: >-
                            With `event` on `pages.lead.captured`: the one form
                            that starts it, by the name the member calls it
                            (Contact, Newsletter). It is matched to the
                            workspace's forms, and a name that matches none or
                            several is refused with the forms there are. Leave
                            it out only when the member wants any form.
                          type: string
                          minLength: 1
                          maxLength: 120
                        product:
                          description: >-
                            With `event` on `product.purchased`: the one store
                            product whose purchase starts it, by its title as
                            the member says it (Free Starter Course). It is
                            matched to the store's products, and a title that
                            matches none or several is refused with the products
                            it could be. Leave it out only when the member wants
                            any product.
                          type: string
                          minLength: 1
                          maxLength: 255
                        brand:
                          description: >-
                            With `event`: the brand the event happens in, by the
                            name the member calls it, when they name one. A flow
                            starts only on this brand's events; a start naming
                            another brand is refused and nothing is saved, since
                            brands only stop each other's sequences.
                          type: string
                          minLength: 1
                          maxLength: 120
                      required:
                        - when
                        - event_key
                      additionalProperties: false
                idempotency_key:
                  type: string
                  minLength: 1
                  maxLength: 200
                  description: >-
                    Deprecated on REST: send the `Idempotency-Key` header
                    instead. Still accepted until 2026-12-31; if both are sent
                    they must match.
                workspace:
                  description: >-
                    Which workspace to run in — its slug. Omit to use your
                    default. With more than one reachable workspace and no
                    default, the call is refused and the choices are listed.
                  type: string
                  minLength: 1
              required:
                - name
              additionalProperties: false
      responses:
        '200':
          description: >-
            The call was admitted and dispatched. `ok` says whether the tool
            succeeded — a refusal the tool itself produced is still a 200,
            exactly as it is a successful JSON-RPC result over MCP.
          headers:
            x-goosy-api:
              description: Present while this API is in beta; the value is `beta`.
              schema:
                type: string
                const: beta
            x-request-id:
              description: >-
                This request's id: the `x-request-id` you sent when it was well
                formed, otherwise one generated for you. Quote it to support; it
                is recorded on every audit row the call wrote.
              schema:
                type: string
            RateLimit-Limit:
              description: Requests this key may make in a rolling minute.
              schema:
                type: integer
                minimum: 1
            RateLimit-Remaining:
              description: Requests left in the current rolling minute.
              schema:
                type: integer
                minimum: 0
            RateLimit-Reset:
              description: Whole seconds until the window frees more requests.
              schema:
                type: integer
                minimum: 1
            x-goosy-tool-error:
              description: >-
                `true` when a boundary step refused the call — workspace
                resolution failed or could not be read. A tool that ran and
                returned its own typed `ok: false` reports `false` here.
                **Branch on `ok` in the body for the outcome; this header is the
                transport-level hint.**
              schema:
                type: string
                enum:
                  - 'true'
                  - 'false'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    description: The tool ran and answered.
                    properties:
                      ok:
                        type: boolean
                        const: true
                      flow_id:
                        type: string
                      name:
                        type: string
                      status:
                        type: string
                        const: draft
                      audience_count:
                        type: integer
                        minimum: 0
                      start:
                        type: string
                        enum:
                          - now
                          - at
                          - schedule
                          - event
                          - unchanged
                      starts_at:
                        type: string
                      form:
                        type: string
                      product:
                        type: string
                      audience_not_set:
                        type: string
                      already_started:
                        type: boolean
                        const: true
                      board_id:
                        type: string
                      version:
                        type: integer
                        exclusiveMinimum: 0
                      revision:
                        type: integer
                        minimum: 0
                      pipelines:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            stages:
                              type: array
                              items:
                                type: object
                                properties:
                                  id:
                                    type: string
                                  name:
                                    type: string
                                required:
                                  - id
                                  - name
                                additionalProperties: false
                          required:
                            - id
                            - name
                            - stages
                          additionalProperties: false
                      brand:
                        type: object
                        properties:
                          name:
                            type: string
                          sells:
                            type: array
                            items:
                              type: object
                              properties:
                                name:
                                  type: string
                                about:
                                  type: string
                              required:
                                - name
                              additionalProperties: false
                        required:
                          - name
                          - sells
                        additionalProperties: false
                      next_ask:
                        type: string
                      next_choices:
                        type: array
                        items:
                          type: string
                      next_step:
                        type: string
                      replayed:
                        type: boolean
                        description: >-
                          True when this is the first result of an earlier call
                          with the same idempotency_key, returned without making
                          anything again.
                      workspace:
                        type: string
                        description: The slug of the workspace this call ran in.
                      working_in:
                        type: object
                        properties:
                          label:
                            type: string
                            description: 'The chip words — e.g. "working in: Acme Main".'
                          note:
                            type: string
                            description: >-
                              Why this workspace — e.g. "your default", "this
                              call only".
                          workspace:
                            type: string
                            description: The resolved workspace's slug.
                          source:
                            type: string
                            enum:
                              - call-override
                              - key-pin
                              - stored-default
                              - sole-reachable
                            description: >-
                              Why this workspace was chosen: the call named it
                              (`call-override`), the key is pinned to it
                              (`key-pin`), it is your default
                              (`stored-default`), or it is the only one the key
                              reaches (`sole-reachable`).
                        required:
                          - label
                          - note
                          - workspace
                          - source
                        description: >-
                          Which workspace this call ran in, and how that was
                          decided. Present on every workspace-scoped result.
                        additionalProperties: false
                    required:
                      - ok
                      - board_id
                      - flow_id
                      - name
                      - replayed
                      - start
                      - status
                      - working_in
                      - workspace
                  - $ref: '#/components/schemas/ToolRefusal'
        '400':
          description: >-
            The request could not be used: the body is present but not a JSON
            object (`tenant_api.malformed_body`); it is a top-level array
            carrying more messages than this endpoint accepts
            (`tenant_mcp.batch_too_large`); or the `Idempotency-Key` header is
            malformed (`tenant_api.idempotency_key_invalid`), disagrees with the
            body's `idempotency_key` (`tenant_api.idempotency_key_conflict`), or
            was sent to an action that cannot replay a retry
            (`tenant_api.idempotency_unsupported`). Nothing ran.
          headers:
            x-goosy-api:
              description: Present while this API is in beta; the value is `beta`.
              schema:
                type: string
                const: beta
            x-request-id:
              description: >-
                This request's id: the `x-request-id` you sent when it was well
                formed, otherwise one generated for you. Quote it to support; it
                is recorded on every audit row the call wrote.
              schema:
                type: string
            Deprecation:
              description: >-
                RFC 9745: this refusal's nested `error` object is deprecated,
                since this instant (`@<unix seconds>`).
              schema:
                type: string
            Sunset:
              description: >-
                RFC 8594: the nested `error` object may be removed after this
                date (2026-12-31).
              schema:
                type: string
            Link:
              description: The page that says what to read instead (`rel="deprecation"`).
              schema:
                type: string
            RateLimit-Limit:
              description: Requests this key may make in a rolling minute.
              schema:
                type: integer
                minimum: 1
            RateLimit-Remaining:
              description: Requests left in the current rolling minute.
              schema:
                type: integer
                minimum: 0
            RateLimit-Reset:
              description: Whole seconds until the window frees more requests.
              schema:
                type: integer
                minimum: 1
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: >-
            No bearer credential, or one that did not resolve. Deliberately ONE
            undifferentiated answer for absent / unknown / revoked / expired, so
            the endpoint is never an oracle over the key space.
          headers:
            x-goosy-api:
              description: Present while this API is in beta; the value is `beta`.
              schema:
                type: string
                const: beta
            x-request-id:
              description: >-
                This request's id: the `x-request-id` you sent when it was well
                formed, otherwise one generated for you. Quote it to support; it
                is recorded on every audit row the call wrote.
              schema:
                type: string
            Deprecation:
              description: >-
                RFC 9745: this refusal's nested `error` object is deprecated,
                since this instant (`@<unix seconds>`).
              schema:
                type: string
            Sunset:
              description: >-
                RFC 8594: the nested `error` object may be removed after this
                date (2026-12-31).
              schema:
                type: string
            Link:
              description: The page that says what to read instead (`rel="deprecation"`).
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            The credential is good but the surface is not open to it — the
            platform or account API switch is off, or the holder lacks the
            `api.access` capability. The `code` says which.
          headers:
            x-goosy-api:
              description: Present while this API is in beta; the value is `beta`.
              schema:
                type: string
                const: beta
            x-request-id:
              description: >-
                This request's id: the `x-request-id` you sent when it was well
                formed, otherwise one generated for you. Quote it to support; it
                is recorded on every audit row the call wrote.
              schema:
                type: string
            Deprecation:
              description: >-
                RFC 9745: this refusal's nested `error` object is deprecated,
                since this instant (`@<unix seconds>`).
              schema:
                type: string
            Sunset:
              description: >-
                RFC 8594: the nested `error` object may be removed after this
                date (2026-12-31).
              schema:
                type: string
            Link:
              description: The page that says what to read instead (`rel="deprecation"`).
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: >-
            No such tool. The body names no tool and is identical for every
            unrecognised name.
          headers:
            x-goosy-api:
              description: Present while this API is in beta; the value is `beta`.
              schema:
                type: string
                const: beta
            x-request-id:
              description: >-
                This request's id: the `x-request-id` you sent when it was well
                formed, otherwise one generated for you. Quote it to support; it
                is recorded on every audit row the call wrote.
              schema:
                type: string
            Deprecation:
              description: >-
                RFC 9745: this refusal's nested `error` object is deprecated,
                since this instant (`@<unix seconds>`).
              schema:
                type: string
            Sunset:
              description: >-
                RFC 8594: the nested `error` object may be removed after this
                date (2026-12-31).
              schema:
                type: string
            Link:
              description: The page that says what to read instead (`rel="deprecation"`).
              schema:
                type: string
            RateLimit-Limit:
              description: Requests this key may make in a rolling minute.
              schema:
                type: integer
                minimum: 1
            RateLimit-Remaining:
              description: Requests left in the current rolling minute.
              schema:
                type: integer
                minimum: 0
            RateLimit-Reset:
              description: Whole seconds until the window frees more requests.
              schema:
                type: integer
                minimum: 1
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: >-
            Over this key's per-minute cap. Carries `Retry-After` and
            `error.retry_after_seconds`.
          headers:
            x-goosy-api:
              description: Present while this API is in beta; the value is `beta`.
              schema:
                type: string
                const: beta
            x-request-id:
              description: >-
                This request's id: the `x-request-id` you sent when it was well
                formed, otherwise one generated for you. Quote it to support; it
                is recorded on every audit row the call wrote.
              schema:
                type: string
            Deprecation:
              description: >-
                RFC 9745: this refusal's nested `error` object is deprecated,
                since this instant (`@<unix seconds>`).
              schema:
                type: string
            Sunset:
              description: >-
                RFC 8594: the nested `error` object may be removed after this
                date (2026-12-31).
              schema:
                type: string
            Link:
              description: The page that says what to read instead (`rel="deprecation"`).
              schema:
                type: string
            RateLimit-Limit:
              description: Requests this key may make in a rolling minute.
              schema:
                type: integer
                minimum: 1
            RateLimit-Remaining:
              description: Requests left in the current rolling minute.
              schema:
                type: integer
                minimum: 0
            RateLimit-Reset:
              description: Whole seconds until the window frees more requests.
              schema:
                type: integer
                minimum: 1
            Retry-After:
              description: Whole seconds to wait before retrying.
              schema:
                type: integer
                minimum: 1
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ToolRefusal:
      type: object
      properties:
        ok:
          type: boolean
          const: false
        code:
          type: string
          description: >-
            The typed reason — e.g. `workspace_ambiguous`, `invalid_arguments`,
            or the tool's own failure code.
        message:
          type: string
          description: A sentence a person can act on.
        workspaces:
          description: 'On a workspace refusal: the slugs this key may pass as `workspace`.'
          type: array
          items:
            type: string
        issues:
          description: 'On `invalid_arguments`: which fields failed, and why.'
          type: array
          items:
            type: object
            properties:
              path:
                type: string
              message:
                type: string
            required:
              - path
              - message
            additionalProperties: false
        path:
          description: >-
            On an authoring refusal: where in your call's input it points, e.g.
            `steps.<key>.params.<field>`.
          type: string
        fix:
          description: 'On an authoring refusal: the change to your call that would pass.'
          type: string
        instruction:
          description: 'On an authoring refusal: what to do next with it.'
          type: string
      required:
        - ok
        - code
        - message
      description: A call that was admitted and dispatched, and did not succeed.
      additionalProperties: false
    Error:
      type: object
      properties:
        ok:
          type: boolean
          const: false
        code:
          type: string
          description: >-
            The typed refusal code — e.g. `tenant_mcp.rate_limited`,
            `tenant_api.unknown_tool`.
        message:
          type: string
          description: A sentence a person can act on.
        retry_after_seconds:
          description: 'On a 429: whole seconds to wait. Mirrors `Retry-After`.'
          type: number
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            retry_after_seconds:
              type: number
          required:
            - code
            - message
          description: >-
            Deprecated: the same values as the top-level fields, kept until
            2026-12-31. Read `code` and `message` at the top level.
          additionalProperties: false
      required:
        - ok
        - code
        - message
        - error
      description: >-
        A request the boundary refused before dispatching anything. The same
        shape the MCP endpoint answers its own refusals with, and the same
        top-level fields a dispatched call's refusal carries, so one client
        branch covers both.
      additionalProperties: false
  securitySchemes:
    tenantApiKey:
      type: http
      scheme: bearer
      description: >-
        An API key minted at Settings › API & MCP. Send it as `Authorization:
        Bearer <key>`. A key carries its holder's own permissions, resolved on
        every call — revoking a membership closes the key's reach immediately.
        Keep it in an environment variable (`GOOSY_API_KEY`), never in a
        committed file.

````

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