Download OpenAPI specification:Download
The Account API allows you to manage your Protekt organization programmatically. You can create and configure projects, issue and rotate API keys, invite team members, and monitor usage. Note that all requests require a Management Token.
Returns a paginated list of all projects belonging to the authenticated organization.
| limit | integer <= 100 Default: 20 Max number of results per page |
| cursor | string Pagination cursor from the previous response |
{- "data": [
- {
- "id": "proj_01jk8abc",
- "login_id": "lp_7xqm9xyz",
- "name": "My App – Production",
- "description": "string",
- "token_expiry": 3600,
- "refresh_token_expiry": 2592000,
- "mfa_required": false,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "next_cursor": "cur_abc123",
- "has_more": true
}Create a new Protekt project. A unique login_id is automatically generated and returned.
| name required | string |
| allowed_origins required | Array of strings |
| redirect_url required | string <uri> |
| description | string |
| token_expiry | integer Default: 3600 |
| refresh_token_expiry | integer Default: 2592000 |
| mfa_required | boolean Default: false |
{- "name": "My App – Production",
- "description": "string",
- "token_expiry": 3600,
- "refresh_token_expiry": 2592000,
- "mfa_required": false
}{- "id": "proj_01jk8abc",
- "login_id": "lp_7xqm9xyz",
- "name": "My App – Production",
- "description": "string",
- "token_expiry": 3600,
- "refresh_token_expiry": 2592000,
- "mfa_required": false,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}Retrieve a single project by its ID, including current configuration and generated login_id.
| id required | string The unique project ID (for example, proj_01jk8abc) |
{- "id": "proj_01jk8abc",
- "login_id": "lp_7xqm9xyz",
- "name": "My App – Production",
- "description": "string",
- "token_expiry": 3600,
- "refresh_token_expiry": 2592000,
- "mfa_required": false,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}Update one or more configuration fields on an existing project. Only the fields you provide will be changed.
| id required | string The unique project ID (for example, proj_01jk8abc) |
| name | string |
| allowed_origins | Array of strings |
| redirect_url | string <uri> |
| token_expiry | integer |
| mfa_required | boolean |
{- "name": "string",
- "allowed_origins": [
- "string"
], - "token_expiry": 0,
- "mfa_required": true
}{- "id": "proj_01jk8abc",
- "login_id": "lp_7xqm9xyz",
- "name": "My App – Production",
- "description": "string",
- "token_expiry": 3600,
- "refresh_token_expiry": 2592000,
- "mfa_required": false,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}Permanently deletes a project and all associated configuration, users, and sessions. This action is irreversible. All active JWTs issued by this project will be immediately invalidated.
| id required | string The unique project ID (for example, proj_01jk8abc) |
{- "deleted": true,
- "id": "proj_01jk8abc"
}Authenticate with your Protekt account credentials to obtain a Management Token. This token is required for all Account API requests.
| email required | string <email> |
| password required | string <password> |
{- "email": "user@example.com",
- "password": "pa$$word"
}{- "management_token": "mgmt_eyJhbGciOiJIUz...",
- "expires_at": "2019-08-24T14:15:22Z"
}List all API keys for the organization. Key values are never returned — only metadata.
| project_id | string Filter keys by a specific project |
| limit | integer <= 100 Default: 20 Max number of results per page |
{- "data": [
- {
- "id": "string",
- "label": "string",
- "project_id": "string",
- "scopes": [
- "string"
], - "expires_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z"
}
]
}Generate a new API key scoped to a specific project. The raw key value is only returned once at creation time — store it securely.
| project_id required | string |
| label required | string |
| scopes | Array of strings Default: ["auth:read","auth:write","users:read","users:write"] Items Enum: "auth:read" "auth:write" "users:read" "users:write" |
| expires_at | string or null <date-time> |
{- "project_id": "string",
- "label": "string",
- "scopes": [
- "auth:read",
- "auth:write",
- "users:read",
- "users:write"
], - "expires_at": "2019-08-24T14:15:22Z"
}{- "id": "key_xk901abc",
- "key": "pk_live_AbCdEfGh...",
- "label": "Backend server – production",
- "project_id": "proj_01jk8abc",
- "scopes": [
- "auth:read"
], - "expires_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z"
}Permanently revoke an API key. Any service using this key will immediately lose access to the Authentication API.
| id required | string The unique API key ID (for example, key_xk901abc) |
{- "revoked": true,
- "id": "key_xk901abc"
}Send an invitation email to add a new member to the organization.
| email required | string <email> |
| role required | string Enum: "admin" "developer" |
{- "email": "user@example.com",
- "role": "admin"
}{- "message": "Invitation sent to dev@acme.com"
}Retrieve usage stats for the organization or a specific project, including Monthly Active Users (MAU) and login event counts.
| project_id | string Scope metrics to a specific project |
| from | string <date> ISO 8601 start date for the reporting window |
| to | string <date> ISO 8601 end date. Defaults to today. |
{- "period": {
- "from": "2019-08-24",
- "to": "2019-08-24"
}, - "mau": 1842,
- "total_logins": 9231,
- "tokens_issued": 11004,
- "passwordless_logins": 3120,
- "sso_logins": 894
}