Optional filter by integration API key type (database-stored tokens that can be revoked)
PERS-api Documentation (2.2.2)
PERS API Documentation
This RESTful API enables seamless integration of Web3 loyalty, token management, and engagement features into your applications.
Usage Guidelines:
- RESTful Design: Resources are accessed via standard HTTP methods (GET, POST, PUT, DELETE) with predictable, resource-oriented URLs.
- Authentication: Secure access is enforced via Bearer Tokens (JWT) and Project Keys (defining the Tenant context).
- Data Format: All requests and responses utilize standard JSON formatting.
Explore the modules below for detailed endpoint specifications, schemas, and testing capabilities.
Request
Retrieve all valid API keys for the current tenant. Admin-only operation that returns keys based on tenant context from authentication. Supports optional filtering by API key type. Use pagination parameters (page & limit) for optimal performance. Legacy support: returns array without params (deprecated - will be removed in future).
- Mock serverhttps://docs.pers.ninja/_mock/swagger/api-keys
- https://api.pers.ninja/v2/api-keys
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://docs.pers.ninja/_mock/swagger/api-keys?type=TENANT_SYSTEM_JWT&includeRevoked=true&page=0&limit=0' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'Successfully retrieved tenant API keys
Type of API key
Token preview for dashboard identification (first 8 + last 4 characters)
Last time the API key was used for authentication
[ { "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479", "type": "TENANT_SYSTEM_JWT", "name": "JWT Token (Mainnet) - 2025-11-22", "createdAt": "2025-11-22T10:30:00.000Z", "shortenedPrivateKey": "eyJhbGci...xMjM", "expiresAt": "2026-11-22T10:30:00.000Z", "isRevoked": false, "lastUsedAt": "2025-11-24T14:30:00.000Z" } ]
Request
Create a new JWT token for the tenant. Store this token securely - it cannot be retrieved again. JWT tokens are a specialized type of API key for authentication purposes.
- Mock serverhttps://docs.pers.ninja/_mock/swagger/api-keys
- https://api.pers.ninja/v2/api-keys
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://docs.pers.ninja/_mock/swagger/api-keys \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"name": "string"
}'JWT token created successfully
Type of API key
Token preview for dashboard identification (first 8 + last 4 characters)
Last time the API key was used for authentication
{ "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479", "type": "TENANT_SYSTEM_JWT", "name": "JWT Token (Mainnet) - 2025-11-22", "createdAt": "2025-11-22T10:30:00.000Z", "shortenedPrivateKey": "eyJhbGci...xMjM", "expiresAt": "2026-11-22T10:30:00.000Z", "isRevoked": false, "lastUsedAt": "2025-11-24T14:30:00.000Z", "privateKey": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" }
- Mock serverhttps://docs.pers.ninja/_mock/swagger/api-keys/{id}
- https://api.pers.ninja/v2/api-keys/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
https://docs.pers.ninja/_mock/swagger/api-keys/f47ac10b-58cc-4372-a567-0e02b2c3d479 \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'{ "valid": true, "payload": {}, "apiKey": { "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479", "type": "TENANT_SYSTEM_JWT", "name": "JWT Token (Mainnet) - 2025-11-22", "createdAt": "2025-11-22T10:30:00.000Z", "shortenedPrivateKey": "eyJhbGci...xMjM", "expiresAt": "2026-11-22T10:30:00.000Z", "isRevoked": false, "lastUsedAt": "2025-11-24T14:30:00.000Z" }, "tenantId": "tenant_12345" }