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

# Quickstart

> Check your API key, read your credit usage, and create a persona.

This walks through the API with `curl`. Set your key first:

```bash theme={null}
export AVINA_API_KEY="<your workspace API key>"
```

**1. Create an API key**

In the Avina dashboard, go to **Settings → API Keys** and click **Create API Key** (workspace admins only). Copy the key; it is shown once.

Check it works:

```bash theme={null}
curl https://api.avina.io/v1/me -H "Authorization: Bearer $AVINA_API_KEY"
```

The response names the workspace the key belongs to.

**2. Check your credits**

```bash theme={null}
curl https://api.avina.io/v1/usage -H "Authorization: Bearer $AVINA_API_KEY"
```

The response has the current billing period and its `credits_used`, `credits_limit` and `credits_remaining`, the same numbers the dashboard shows.

**3. Create a persona**

A persona tells Avina which contacts to look for at each company: the job titles, how many contacts per company (1–100), where the contacts are located (`contact_countries`, omitted for worldwide), and whether to enrich emails and phones.

```bash theme={null}
curl -X POST https://api.avina.io/v1/personas \
  -H "Authorization: Bearer $AVINA_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: sales-leaders-1" \
  -d '{
    "name": "Sales leaders",
    "job_titles": ["VP Sales", "CRO", "Head of Sales"],
    "contacts_per_company": 2
  }'
```

The persona appears in the dashboard too. Creating or changing a persona does not search for contacts or use credits.

**4. Change it**

Send only the fields to change; `job_titles` replaces the whole list:

```bash theme={null}
curl -X PATCH https://api.avina.io/v1/personas/$PERSONA_ID \
  -H "Authorization: Bearer $AVINA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "job_titles": ["VP Sales", "CRO"] }'
```


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