Complete REST API Endpoints (v1)
Base URL: https://api.authsetu.com
All authenticated API requests require either a Secret Key (Authorization: Bearer sk_...) or a Publishable Key (x-publishable-key: pk_...).
---
1. Authentication Endpoints
Register Customer
POST /api/v1/auth/register
bashPOST
curl -X POST "https://api.authsetu.com/api/v1/auth/register" \
-H "x-publishable-key: pk_test_your_key" \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"password": "SecurePassword123!",
"firstName": "John",
"lastName": "Doe"
}'bashPOST
curl -X POST "https://api.authsetu.com/api/v1/auth/login" \
-H "x-publishable-key: pk_test_your_key" \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"password": "SecurePassword123!"
}'bashPOST
curl -X POST "https://api.authsetu.com/api/v1/auth/refresh" \
-H "Content-Type: application/json" \
-d '{
"refreshToken": "your_refresh_token_here"
}'bashGET
curl -X GET "https://api.authsetu.com/api/v1/me" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"bashGET
curl -X GET "https://api.authsetu.com/api/v1/organizations" \
-H "Authorization: Bearer YOUR_SECRET_KEY"bashPOST
curl -X POST "https://api.authsetu.com/api/v1/organizations" \
-H "Authorization: Bearer YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Acme Corporation",
"slug": "acme-corp"
}'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/billing"
}'