curl -X POST https://api.gosentrix.io/api/v1/auth/signup \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"password": "SecurePassword123!",
"tenant_name": "My Company"
}'
{
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
"refresh_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
"expires_in": 900,
"user": {
"id": "user-123",
"email": "user@example.com",
"email_verified": false
},
"tenant": {
"id": "tenant-456",
"name": "My Company",
"slug": "my-company",
"status": "pending_setup"
}
}
Authentication API
Sign Up
Create a new user account and tenant
POST
/
api
/
v1
/
auth
/
signup
curl -X POST https://api.gosentrix.io/api/v1/auth/signup \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"password": "SecurePassword123!",
"tenant_name": "My Company"
}'
{
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
"refresh_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
"expires_in": 900,
"user": {
"id": "user-123",
"email": "user@example.com",
"email_verified": false
},
"tenant": {
"id": "tenant-456",
"name": "My Company",
"slug": "my-company",
"status": "pending_setup"
}
}
Create a new user account and automatically provision a tenant.
curl -X POST https://api.gosentrix.io/api/v1/auth/signup \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"password": "SecurePassword123!",
"tenant_name": "My Company"
}'
{
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
"refresh_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
"expires_in": 900,
"user": {
"id": "user-123",
"email": "user@example.com",
"email_verified": false
},
"tenant": {
"id": "tenant-456",
"name": "My Company",
"slug": "my-company",
"status": "pending_setup"
}
}
Request Body
string
required
User email address (must be unique)
string
required
Password (min 12 characters, must include uppercase, lowercase, number, and special character)
string
required
Name for the new tenant organization
Response
string
JWT access token (valid for 15 minutes)
string
JWT refresh token (valid for 7 days)
integer
Access token expiration time in seconds
object
User object with id, email, and verification status
object
Tenant object with id, name, slug, and status
Errors
object
Invalid request (duplicate email, weak password, etc.)
object
Rate limit exceeded
Notes
- Email verification is required before full access
- Tenant status will be
pending_setupuntil onboarding is completed - See Verify Email for next steps