# API Settings

https://docs.wisecp.com/fr/api-settings

Issue API keys for external integrations, scope each one to only the endpoints it needs, and review every request the API has received.

## Opening the Screen

Open **Settings › General**, then choose the **API** tab: `{admin}/settings?general=api`

## What Is on the Screen

The tab holds up to three sub-tabs.

### Admin API

Keys issued from this screen. A full administrator sees every staff member's keys and who owns each one; anyone else sees only their own. Each row lists its permissions summary, allowed IPs and last access, with Details and Delete actions. A bulk **Apply to Selected** list and a **Create API Credential** button sit above the table.

### Client API

Read-only, and shown only to a full administrator; the list is empty until a client issues a key from their own account. Listed here for visibility; the client manages it from the client area, not from this screen.

### Logs

Every request the API has received, with the caller, the method and endpoint, the date and the IP address. Clicking a row opens its full request header, request body and response. A **Delete All** button clears the whole log.

### API Activation

The gear button beside **Create API Credential** opens the window that decides whether each API is on. Admin API covers staff keys, Client API covers the keys customers issue for themselves. The Client API is off until you turn it on; once on, you grant access to every customer or to the ones you pick.

The same window carries **Reachable Endpoints**, which decides what customers may put on their keys. Every endpoint is open by default; switch to **Selected Endpoints** and customers see, and can pick, only the ones you tick.

## Fields

### Credential Fields

- **Name**: Required.
- **Allowed IP addresses**: Optional, one address per line. Leave it empty to allow any address.
- **Rate Limit (per minute)**: Optional. Leave it empty, or enter 0, to use the system default.

### Activation Fields

- **Admin API**: On by default. Switched off, staff keys answer no request.
- **Client API**: Off by default. While off, customers do not see the API page in their panel.
- **Access**: All Customers or Selected Customers. Shown only while the Client API is on.
- **Customers with Access**: Required when Selected Customers is chosen; at least one customer must be picked.
- **Reachable Endpoints**: All Endpoints or Selected Endpoints. Shown only while the Client API is on.
- **Endpoint list**: Required when Selected Endpoints is chosen; at least one endpoint must be ticked.

### Permissions

A category list on the left, its endpoints on the right, each with its own checkbox. **Grant full access** ticks every endpoint the key is allowed to reach. A search box and a per-category "select all" link narrow the list. At least one permission is required.

## Tasks

### Create an API key for an external tool

1. Click **Create API Credential** and name it.
2. Optionally restrict **Allowed IP addresses** and set a **Rate Limit**.
3. Tick only the permissions the tool needs, or **Grant full access**, then save.
4. Copy the key shown once. It cannot be shown again after you close the window.

### Open the Client API to chosen customers

1. Click the gear button and switch **Client API** on.
2. Pick **Selected Customers**.
3. Search for each customer in **Customers with Access**, then save.
4. Those customers see the API page in their own panel and can issue a key.

### Limit the endpoints customers can reach

1. Click the gear button; the **Client API** must be on.
2. Under **Reachable Endpoints**, pick **Selected Endpoints**.
3. Choose a category in the list that opens and tick the endpoints. A search box and a per-category "select all" narrow the list.
4. Save. Customers see only these endpoints in their own key window, and existing keys lose the rest on their next request.

### Limit or revoke a key

1. Open the key's **Details** action to change its permissions, IPs or rate limit, then save.
2. To remove access entirely, delete it — on its own, or with several others through **Apply to Selected**.
3. The key stops working right away.

## Things to Watch

> **Entry plans cannot change this screen**
> 
> If your licence plan excludes the API, the tab stays visible but its controls are disabled and a notice appears above them. The API Credentials page and its menu link are hidden in the client area too. Access returns with a plan upgrade.

> **The key is shown once**
> 
> Only a masked prefix is kept after you close the create window. If the key is lost, issue a new one.

> **A key can never exceed your own privileges**
> 
> Grant full access is capped to what your account is allowed. Saving fails if none of the ticked permissions fall within your own privileges.

> **Other staff members' keys stay private**
> 
> The Owner column and the Client API tab appear only for a full administrator.

> **Withdrawing access does not delete keys**
> 
> Switching the Client API off, or removing a customer from the list, stops those keys on the next request. The keys are kept and work again once access is restored.

## Required Privileges

Opening **Settings › General** needs `SETTINGS_INFORMATIONS_CONFIGURE`. Viewing and managing the API tab additionally needs `SETTINGS_API_CREDENTIALS`.

## Related Articles

- [General Settings Overview](https://docs.wisecp.com/en/general-settings-overview)
- [Administrators](https://docs.wisecp.com/en/administrators)
- [Privilege Groups](https://docs.wisecp.com/en/privilege-groups)
