# API Keys

> **Portal:** Admin Portal · **Section:** Setup & Configuration · **Updated:** 2026-11-22
> **Menu:** Setup > API Keys
> **Canonical URL:** https://docs.field-ascend.com/admin-portal/setup/api-keys

## What This Area Is For

API Keys is where authorised administrators create and manage keys used for **external integrations**—for example connecting an AI assistant or another approved tool to read organisation data you explicitly allow. The same page also explains two ways to **connect an AI assistant (such as Claude)**: signing in with your normal Field Ascend admin credentials (recommended), or using a key-based connector for a quicker setup when your workflow allows it.

If you do not see **API Keys** under **Setup**, your account does not have access; ask a master administrator or your internal Field Ascend owner to adjust who may manage API keys.

## What You'll See On This Page

The page is organised into two main parts: **Connect to Claude** at the top, and **API Keys** management below.

### Connect to Claude (top card)

A **Live** panel with two columns:

1. **Recommended — Sign in with your account**  
   - Explains that the AI service handles sign-in with your Field Ascend **email and password**, with **no API key** required for that path.  
   - A **read-only box** shows a connector web address; **Copy** copies it to your clipboard.  
   - Numbered steps tell you to open **Claude Desktop** or **claude.ai**, go to **Settings → Connectors → Add custom connector**, paste the address, name the connector (for example “Field Ascend”), sign in, then you can ask questions about jobs, equipment, and more.

2. **Alternative — API Key URL**  
   - The connector address is `https://mcp.field-ascend.com/mcp` with no key in it. Claude asks the person to sign in. A key belongs in a server-side `Authorization: Bearer` header, never in the web address.
   - A **Generate API Key** button opens the same creation flow as the main section.

### API Keys (main card)

- **Title** “API Keys” with a short description: keys are for external integrations, AI assistants, and third-party tools.  
- **Generate API Key** (primary action at the top right).  
- A **list of keys** (or an empty state with **Generate First Key** if none exist).  
- At the bottom: an **API Documentation** link (opens in a new tab) and a **base web address** line for the versioned public API—use these when your IT or integration partner needs official reference material.

While the list is loading, you may see a loading message.

### Generate New API Key (modal)

When you choose **Generate API Key** or **Generate First Key**:

- **Key Name** — text field (a default suggestion may appear; replace it with something you will recognise later, e.g. which tool or person it is for).  
- **Rate Limit (requests/min)** — a number between the minimum and maximum allowed on the form; this caps how many requests per minute that key can drive.  
- **Permissions** — checkboxes for broad **read** areas of your organisation data, grouped in plain language: **Operations** (jobs, equipment, customers, sites, engineers, certificates, PPM — ticked by default), **Sales & finance** (quotes, invoices, purchase orders, tickets — ticked by default; **Money totals** for job revenue and labour charge amounts — off by default), **People & fleet** (HR, vehicles, F-gas — off by default) and **Stock catalogue** (includes cost prices — off by default). Each has a one-line hint under it. The same permissions govern both the public API and what the Claude connector can fetch with that key. At least one must stay selected to create a key. One tick is different: **Legacy import agent (write)** is only used when Field Ascend is running a managed migration from your previous system for you — leave it unticked unless the Field Ascend team has asked you to create that key. A second write permission, **Create Jobs (write)**, appears only after Field Ascend support has switched job creation on for your account: it lets another system (Zapier, Make, a script, or an old job system you are moving from) add new jobs automatically — unscheduled, at your starting job status, adding a customer and site when they do not match one you already have, never a second job for the same outside reference, and up to a daily limit. If you want jobs created automatically, ask Field Ascend support to switch it on — this kind of automation is allowed.  
- **Cancel** closes without saving. **Generate Key** creates the key (you may briefly see a generating state).

### API Key Created (modal, one-time)

After a successful creation:

- A clear **success** state and a **warning** that you must **copy the key now**—it **will not be shown again**.  
- A read-only field for the secret value and a **Copy** button.  
- A **Connect to Claude** block with the connector address (`https://mcp.field-ascend.com/mcp`, no key in it) and **Copy URL**. Claude then asks for a sign-in. The secret itself is for server-side tools that send `Authorization: Bearer`.
- **Done** closes the modal.

### Each key in the list

For every key you will typically see:

- The **name** you gave it and a status badge: **Active** or **Revoked**.  
- A **masked preview** (only a short prefix is visible; the rest is hidden).  
- Small labels summarising which **data areas** the key may read.  
- **Edit permissions** (only while Active) — opens the same grouped checkboxes pre-ticked with the key's current access; untick or tick areas and **Save permissions**. The change applies to the key's next request — the secret stays the same, nothing to re-copy. Any write permission the key holds is shown locked (managed by Field Ascend support).  
- **Revoke** (only while Active) — stops the key working immediately.  
- **Delete** — always available; permanently removes the key and related usage history after you confirm.  
- A compact row of **usage information**: rate limit, total requests, requests in the last 24 hours, and **last used** (or “Never”).  
- Optionally, **who created** the key and the **creation date**.

## What You Can Do Here

- Choose **recommended sign-in** vs **key-based connector** for AI assistants, depending on your security preference and tooling.  
- **Create** named keys with a chosen rate limit and a minimal set of read permissions for each integration.  
- **Copy** the full secret and the assistant connector URL **once**, at creation time, into a secure place or straight into the other product.  
- **Review** which keys exist, whether they are active, and how heavily they are used.  
- **Revoke** a key that may be compromised or no longer needed, without deleting the record immediately if you still want to see history.  
- **Delete** a key and its logged activity when you are sure you want it gone.  
- Open **API Documentation** from the footer when building or auditing custom integrations.

## Common Tasks

### Connect Claude using sign-in (recommended)

1. Open **Setup → API Keys**.  
2. In **Connect to Claude**, use **Copy** next to the read-only connector address in the **recommended** column.  
3. In Claude: **Settings → Connectors → Add custom connector**, paste the address, name it (e.g. “Field Ascend”).  
4. Complete sign-in with your **Field Ascend admin email and password** when prompted.  
5. Start a new chat, enable the connector if the product asks you to, then ask questions about your data.

### Connect Claude using an API key (alternative)

1. Open **Setup → API Keys**.  
2. Click **Generate API Key** (from the top card or the main section).  
3. Enter a **Key Name**, set **Rate Limit**, and tick only the **permissions** that tool needs.  
4. Click **Generate Key**.  
5. On the **API Key Created** screen: **copy the secret** into the server that will call the API. For Claude, copy the connector address and sign in when Claude asks — do not put the secret in that address.  
6. Click **Done** when finished. You cannot retrieve the full secret again from this page.

### Create a key for another tool (not Claude)

1. **Generate API Key**.  
2. Name it after the system (e.g. reporting tool, internal dashboard).  
3. Set an appropriate **rate limit** and **permissions**.  
4. After creation, copy the **secret** into that tool’s configuration following **their** documentation (and your IT security process).  
5. Use the **API Documentation** link at the bottom of the page for standard HTTP usage patterns if the tool needs them.

### Let a booking tool, website or phone agent book visits (Online booking)

Shown only once Field Ascend support has switched **booking through the API** on for your company.

1. **Generate API Key** (or **Edit permissions** on an existing one) and name it after the tool.
2. Under **Online booking** tick **See free times** (what customers can book and its free times — never who is going) and **Make bookings** (hold a time, book it, look it up, and — when you allow it — move or cancel it).
3. Tick **Test key** while the tool is being built: every booking call works and checks everything, but nothing goes in your diary. Untick it (or make a new key) to go live.
4. Optional: **Send booking updates to** — the tool's https address. When your office confirms, moves or cancels one of the tool's bookings, it is told there (signed with the key's **signing secret** — **Show** in the key's row; retried for about a day if the tool does not answer).
5. Say what customers can book on **Setup → Online Booking** (the visit types — each one of your job categories, with the name customers see and its length).
6. The rules — waiting for you to confirm or booked straight away, least notice, how far ahead, most a day, whether the tool may move or cancel — are on the same page (and on **AI Planner Settings → Booking rules**). What the customer is promised (an exact time or a part of the day) is the **Promise: Booking tools (API)** row there.

Bookings made this way appear on the Planner (dashed with **Confirm this booking** when they wait for you), with a note on the job saying which key booked it and the tool's reference. Give the tool's developer the Field Ascend booking API guide (ask support).

### Stop a key from working

- Click **Revoke** on an active key and confirm. The key stops working **immediately**.  
- You can still see it in the list as revoked until you delete it.

### Remove a key completely

- Click **Delete**, read the confirmation (it mentions permanent removal and related logs), and confirm only if you are sure.

## Important Options

- **Rate limit** — balances protection against bursts of traffic with what your integration needs.  
- **Permissions** — grant only what each integration requires; fewer areas ticked means less data exposure if a key leaks.  
- **Revoke vs Delete** — revoke for instant cut-off while keeping a visible record; delete when you want the key and its stored usage trail removed.

## Common Mistakes

- **Closing the “API Key Created” window without copying** — the full secret is not shown again; you must generate a new key and retire the old one in the other system.  
- **Sharing keys in email, chat, or screenshots** — treat keys like passwords; paste only into trusted configuration screens.  
- **Leaving unused keys Active** — revoke or delete keys for tools you no longer use.  
- **Ticking every permission “just in case”** — increases impact of misuse; align checkboxes with the integration’s real needs.  
- **Assuming Revoke is reversible** — you typically need a new key if you revoked by mistake.  
- **Expecting to edit a key’s secret** — the product issues new secrets on creation; the secret itself never changes. Access is changed with **Edit permissions** on an existing key, or by creating, revoking, or deleting keys.

## Asking the assistant

The assistant on your **Help & requests** page (**Support**, under your initials) — and on this page — can tell you which keys you have, whether each is on, live or a test key, what it is allowed to do in plain words and when it was last used. It never shows or asks for a key's value, and it does not create, change, switch off or delete keys — that stays on this page.

## Related Areas

- **Setup → Admin Users** — controls which staff can see **API Keys** and other sensitive setup items.  
- **Setup → Accounts Settings** and other setup pages — business configuration; API keys do not replace normal in-portal security and roles.  
- **External API documentation** (linked from this page) — authoritative detail for developers building against the public API.

## Safe Handling (product guidance)

- Store secrets only in **secure** places your organisation approves (password managers, secure vaults, or the target app’s encrypted settings)—not in shared documents or tickets.  
- **Rotate** by creating a new key, updating the integration, then revoking or deleting the old one.  
- If you suspect a key is exposed: **Revoke immediately**, then issue a new key if still needed.  
- Limit who can open this page: keys are powerful; access should follow your **least privilege** policy.
