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

# Create a quote form with the API

> Create a Darwin outcome form such as a quote request with the API, test it and switch it live, without opening Conversion Studio.

Create an [outcome form](https://www.meetdarwin.ai/help/outcomes/what-are-outcomes) such as a quote request, and switch it on, without opening Conversion Studio. Useful when you set up many workspaces the same way, or keep forms in version control.

**You need:** a key with `agent:write`.

```bash theme={null}
curl https://api.meetdarwin.ai/v1/outcomes \
  -H "Authorization: Bearer $DARWIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Request a quote",
    "offer_when": "asks what a project would cost or wants an estimate",
    "questions": [
      { "question": "What do you need?", "type": "short_text" },
      { "question": "How many pages does your site have?", "type": "number", "unit": "pages", "min": 5 },
      { "question": "When do you want it done?", "type": "choice", "choices": ["This month", "This quarter", "Just planning"] }
    ],
    "phone": "optional",
    "done_message": "Thanks. We will send your quote within one business day.",
    "notify": ["sales@example.com"],
    "status": "draft"
  }'
```

The answer is the form, with an id (`out_…`) and each question's `id` and answer `key`. Try it in the Agent Studio preview, then switch it on with `PATCH /v1/outcomes/out_… {"status": "live"}`. A request a visitor sends through a live form uses a credit like a booked meeting, or nothing when it doesn't pass the fit rules; see [How requests use credits](https://www.meetdarwin.ai/help/outcomes/how-requests-use-credits). On Free, a form can have one qualifying question, a question with a fit rule; a write with more returns `403` [`plan_required`](https://docs.meetdarwin.ai/api-reference/errors#plan_required).

* `"template": "quote"` or `"callback"` starts from Darwin's templates; anything else you send replaces the template's.
* `PATCH /v1/outcomes/meeting` sets the questions asked before the calendar on **Book a meeting**, with the same fit rules (`not_a_fit`, `min`, `max`).
* When you change questions, send each one you keep with its `id`, so its earlier answers stay matched. A question's `key` comes from its words, so rewording it changes the key Zapier and webhooks use.

**It worked if** `GET /v1/outcomes` lists the form as `live`, and asking the Agent Studio preview for a quote opens it in the chat.


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