# Create an API key

> Make a key in CallView under Settings > API, choose its campaigns and what it can do, and copy the secret.

Keys are made in the CallView app by an admin of your organization. Each key has its own campaigns and permissions, so give each system its own key.

## Make the key

1. **Open Settings > API.** Sign in to [CallView](https://agent.callview.ai) as an admin and open **Settings**, then **API**. If the page has no keys section, the API isn't switched on for your organization yet: open a ticket from **Help** and ask for it.

2. **Click + Create API key.**

3. **Name it** after the system that will use it, like `Website form - Roofing leads`. Only your team sees the name.

4. **Pick Test or Live.** A live key works with real leads and real calls. A test key gets sample data only: it doesn't call anyone or touch your real leads, so start with one. See [Test mode](https://developers.callview.ai/guides/test-mode/).

5. **Pick its campaigns.** Either **All campaigns, including ones you add later**, or **Only the ones I pick**. A key limited to some campaigns can't see or add leads anywhere else.

6. **Choose what it can do.** Start from a ready-made set, then tick or untick boxes:
   - **CRM speed to lead**: add leads, start their calls, and read outcomes and events. Most CRM hook-ups want this one.
   - **Reporting only**: read everything except recordings and transcripts.
   - **Full access**: every permission in every campaign. Only the organization's owner can make one.

   Two boxes need a closer look. **Start calls** lets the key put leads in a dial queue, which means the AI phones those people. **Recordings & transcripts** lets it download what the lead said. Leave both off a key that doesn't need them. [The permissions](https://developers.callview.ai/guides/authentication/#the-permissions) lists every box.

7. **Lead source** (optional). It's written on every lead the key adds, so your reports show where leads came from.

8. **Advanced** (optional). Here you can list **allowed IP addresses** (requests from anywhere else are refused) and set a date the key **stops working on**. The request limits are here too ([Rate limits](https://developers.callview.ai/guides/rate-limits/)), with **calls per day** and a **daily spend cap** for this key alone ([Money guards](https://developers.callview.ai/guides/money-guards/#limits-for-one-key)).

9. **Click Create key**, then copy the **key ID** (`ck_test_...` or `ck_live_...`) and the **secret** (`cs_test_...` or `cs_live_...`). The secret is shown this once. Store it somewhere safe, like your server's secret store, then click **I've stored it**.

## Try it

Click **Test** on the key's row. CallView runs a few requests as that key (list campaigns, look up a lead, check a number against Do Not Call and so on) and shows the request and the reply. It runs from CallView's own server, so you don't need to paste the secret. Writes are a dry run.

Then make your first real request: the [Quickstart](https://developers.callview.ai/quickstart/) takes about 10 minutes.

## After that

- **Edit access** changes what the key can do, without a new secret.
- **Roll secret** gives the key a new secret. The old one keeps working for a grace period you choose, so you can switch over without dropping a request.
- **Revoke** stops the key. It stops working on the next request.
- The **Usage** column shows each key's requests, leads, calls and cost, today and for the last 30 days. It updates every 5 minutes.

Keep the secret on your server, not in a web page or a mobile app. [Keys and authentication](https://developers.callview.ai/guides/authentication/) covers sending the key and what to do if one leaks.
