# Authentication

The Solidgate API v2 uses a simplified **Bearer token** authentication model for outbound API calls. You no longer need to manage request signatures or multiple key sets when calling the API. Incoming webhook deliveries still require [HMAC signature verification](https://api-docs.solidgate.com/api/v2/webhook-signatures).

**API key**

- **Format:** Key IDs use the prefix `akey_xxx`, secrets use the prefix `asec_xxx`.
- **Method:** Include the secret in the `Authorization` header of every request.


Example header

```text
Authorization: Bearer asec_your_secret_here
```

**Key flexibility**

API keys are decoupled from channels.

- **Account level:** By default, keys exist at the account level with access to all channels.
- **Channel-bound:** A key that can be restricted to one or many specific channels.


## Scopes and permissions

Fine-grained access control follows the principle of least privilege. Keys can be restricted by **channel** and **permission**.

## API key management

Manage keys via **Solidgate Hub** or **API v2**. Hub access is available to Merchant Admin and Developer roles. Navigate to the **Developers** section and then select **API v2**.

**Key rotation with zero downtime**

To maintain security without service interruption, use **Rotation**.

Initiate
API:
Call 
/rotate
and set the rotation period in seconds
Hub:
Click 
Rotate
for the API key
Overlap
During this period, both old and new secrets remain valid
      
Expiry
After the period ends, the old secret is automatically deactivated
      
**API key operations**

All operations require an account-level API key marked in Hub as **Applies to all channels**.

Endpoint
Operation
POST /v2/api-keys/create
Create API key
POST /v2/api-keys/list
List API keys
POST /v2/api-keys/get
Get API key details
POST /v2/api-keys/rotate
Rotate API key
For help, contact us.