API Reference (v1.0)
Welcome to the AuthSetu API reference. All API requests should be made to https://api.authsetu.com.
Application Management
Manage your authentication environments.
List Projects
GET /api/v1/projects
Returns a list of projects in your organization.
cURL Example:
bashGET
curl -X GET "https://api.authsetu.com/api/v1/projects" \
-H "Authorization: Bearer YOUR_SECRET_KEY"bashGET
curl -X GET "https://api.authsetu.com/api/v1/projects/550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer YOUR_SECRET_KEY"---
API Keys
Create API Key
POST /api/v1/projects/[projectId]/api-keys
Body Parameters:
name: String (required)
type:secret|publishable
scopes: Array of strings
cURL Example:
bashPOST
curl -X POST "https://api.authsetu.com/api/v1/projects/[projectId]/api-keys" \
-H "Authorization: Bearer YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Production Backend Key",
"type": "secret",
"scopes": ["customer:write", "customer:read"]
}'bashPOST
curl -X POST "https://api.authsetu.com/api/v1/customers" \
-H "Authorization: Bearer YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"projectId": "YOUR_PROJECT_ID",
"metadata": {
"plan": "premium"
}
}'bashPOST
curl -X POST "https://api.authsetu.com/api/v1/auth/verify-email" \
-H "Content-Type: application/json" \
-d '{
"token": "verification_token_from_link"
}'bashPOST
curl -X POST "https://api.authsetu.com/api/v1/billing/portal" \
-H "Authorization: Bearer YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"returnUrl": "https://dashboard.authsetu.com/settings"
}'