Skip to content

API Keys ​

Generate and manage API keys for programmatic access to the MyEmailVault API. API keys are scoped to the user that created them and carry the same permissions as that user. The raw key value is only shown once at creation time.

Generate an API Key ​

Generate an API key​

POST
/v1/api-keys

Generates a new API key for the authenticated user. The raw key value is only returned once at creation time. The key name must be between 1–255 characters. Expiry is required and must be within 730 days (2 years). Disabled in demo mode.

Authorizations​

bearerAuth

JWT obtained from POST /v1/auth/login. Pass as Authorization: Bearer <token>.

Type
HTTP (bearer)
or
apiKeyAuth

API key generated via POST /v1/api-keys. Pass as X-API-KEY: <key>.

Type
API Key (header: X-API-KEY)

Request Body​

application/json
JSON
{
  
"name": "CI/CD Pipeline Key",
  
"expiresInDays": 90
}

Responses​

API key created. The raw key value is only shown once.

application/json
JSON
{
  
"key": "oa_live_abc123..."
}

Playground​

Authorization
Body

Samples​

Powered by VitePress OpenAPI

List API Keys ​

List API keys​

GET
/v1/api-keys

Returns all API keys belonging to the currently authenticated user. The raw key value is not included.

Authorizations​

bearerAuth

JWT obtained from POST /v1/auth/login. Pass as Authorization: Bearer <token>.

Type
HTTP (bearer)
or
apiKeyAuth

API key generated via POST /v1/api-keys. Pass as X-API-KEY: <key>.

Type
API Key (header: X-API-KEY)

Responses​

List of API keys (without raw key values).

application/json
JSON
[
  
{
  
  
"id": "clx1y2z3a0000b4d2",
  
  
"name": "CI/CD Pipeline Key",
  
  
"key": "oa_live_abc1...",
  
  
"expiresAt": "string",
  
  
"createdAt": "string"
  
}
]

Playground​

Authorization

Samples​

Powered by VitePress OpenAPI

Delete an API Key ​

Delete an API key​

DELETE
/v1/api-keys/{id}

Permanently revokes and deletes an API key by ID. Only the owning user can delete their own keys. Disabled in demo mode.

Authorizations​

bearerAuth

JWT obtained from POST /v1/auth/login. Pass as Authorization: Bearer <token>.

Type
HTTP (bearer)
or
apiKeyAuth

API key generated via POST /v1/api-keys. Pass as X-API-KEY: <key>.

Type
API Key (header: X-API-KEY)

Parameters​

Path Parameters

id*

The ID of the API key to delete.

Type
string
Required
Example"clx1y2z3a0000b4d2"

Responses​

API key deleted. No content returned.

Playground​

Authorization
Variables
Key
Value

Samples​

Powered by VitePress OpenAPI