Authentication API
API reference for authentication, API keys, and user management on the Plexe Platform.
This document provides detailed information about the authentication endpoints of the Plexe Platform API.
API Keys
Create API Key
Creates a new API key for your account.
Headers
Header | Value | Description |
---|---|---|
Authorization | Bearer TOKEN | Required. Your API access token |
Request Body
Parameter | Type | Required | Description |
---|---|---|---|
name | string | Yes | Descriptive name for the API key |
permission_level | string | Yes | Permission level: read_only or read_write |
Response
The full API key value (key
field) is displayed only once when the key is created. Store it securely as you won’t be able to retrieve it again.
List API Keys
Returns a list of all API keys for your account.
Headers
Header | Value | Description |
---|---|---|
Authorization | Bearer TOKEN | Required. Your API access token |
Query Parameters
Parameter | Type | Required | Description |
---|---|---|---|
status | string | No | Filter by status: active or revoked |
limit | integer | No | Maximum number of keys to return (default: 20, max: 100) |
offset | integer | No | Number of keys to skip for pagination (default: 0) |
Response
Get API Key
Retrieves details for a specific API key.
Headers
Header | Value | Description |
---|---|---|
Authorization | Bearer TOKEN | Required. Your API access token |
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
keyId | string | Yes | ID of the API key to retrieve |
Response
Update API Key
Updates the name or expiration of an API key.
Headers
Header | Value | Description |
---|---|---|
Authorization | Bearer TOKEN | Required. Your API access token |
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
keyId | string | Yes | ID of the API key to update |
Request Body
Parameter | Type | Required | Description |
---|---|---|---|
name | string | No | New name for the API key |
expiration_days | integer | No | New expiration period (in days) from current date |
Response
You cannot change the permission level of an existing key. Create a new key with the desired permissions instead.
Revoke API Key
Revokes (invalidates) an API key, preventing its further use.
Headers
Header | Value | Description |
---|---|---|
Authorization | Bearer TOKEN | Required. Your API access token |
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
keyId | string | Yes | ID of the API key to revoke |
Response
Revoking an API key is permanent and cannot be undone. Applications using the revoked key will immediately lose access.
User Management
The following endpoint is available to retrieve user information for the currently authenticated user.
Get Current User
Returns information about the currently authenticated user.
Headers
Header | Value | Description |
---|---|---|
Authorization | Bearer TOKEN | Required. Your API access token |
Response
Multi-Factor Authentication will be available in a future release.
Error Codes
HTTP Status | Error Code | Description |
---|---|---|
400 | invalid_request | The request was invalid |
401 | unauthorized | Authentication failed |
403 | forbidden | Insufficient permissions |
404 | not_found | Resource not found |
409 | resource_exists | Resource already exists |
422 | validation_failed | Validation failed |
429 | rate_limited | Too many requests |
500 | server_error | Internal server error |
Rate Limits
Authentication endpoints have rate limits to prevent abuse:
- Key creation: 10 requests per hour
- Authentication attempts: 10 failed attempts per 15 minutes
Exceeding these limits will result in a 429 Too Many Requests
response.