# AskVault API: get started

> Create an API key and send your first question to your AskVault agent over HTTPS, then stream answers, hand chats to your team and receive webhooks.

The AskVault API lets your own code ask your agent a question and get an answer grounded in your content, with the sources it came from. Create an API key, send a POST request, and you have your first cited answer in a few minutes.

## Before you start

- **A workspace with content.** Add your website or files first. Pages become available to the API as they are indexed. See [Add your website](/knowledge/add-your-website/).
- **A paid plan.** The API starts on Starter. The Free plan does not include API access. Webhooks need Growth.
- **An API key.** Create one in [API keys](/developers/api-keys/). The key identifies the workspace, so requests never carry a workspace id.
- **Any HTTP client.** There are no official SDKs. curl, `fetch`, Python `requests` or whatever you already use all work. Keep the key on your server, never in browser or mobile code.

## Your first request

1. Create an API key and copy it. It starts with `ak_` and is shown once.
2. Send a question:

   ```bash
   curl -X POST https://api.askvault.co/v1/query \
     -H "Authorization: Bearer ak_xxx" \
     -H "Content-Type: application/json" \
     -d '{"query": "What is your refund policy?"}'
   ```

3. Read `answer` and `sources` in the JSON that comes back. Each source names the document and, when it has one, the page URL, so you can show your user where the answer came from.

If the content does not cover the question, the agent says it does not know instead of guessing, and `sources` comes back empty. Treat an empty `sources` as the signal to route the question to a person.

## What you can build

Everything below uses the same agent, knowledge and rules as your widget and channels, and uses the same message credits.

  
  
  
  
  
  

Common patterns:

- **A chat window in your own product.** Call `/v1/query/stream` from your server and relay the words to your front end.
- **A helper inside your support tool.** Call `/v1/query` to draft a suggested reply, and send the sources along with it.
- **Your own mobile app.** Your app calls your server, and your server calls AskVault with the key.

Keep a stable `session_id` per end user so each person has their own conversation under one key. See [Ask a question with the API](/developers/query/).

## Limits at a glance

Each key defaults to 60 requests a minute and 1,000 a day, and can be raised to 1,000 a minute and 100,000 a day in the new dashboard. Errors come back as JSON with a `detail` message and an `X-Request-ID` header. See [API errors and rate limits](/developers/errors-and-limits/).

## Related

- [API keys](/developers/api-keys/)
- [Identify signed-in visitors](/developers/identity-verification/)
- [Trust and security](/trust/)

Source: https://docs.askvault.co/developers/
