Developer Documentation
Everything you need to integrate Ithbat IAM into your applications
API Reference
Complete API documentation for Ithbat IAM
Base URL
https://your-tenant.ithbat.io/api/v1Replace 'your-tenant' with your actual tenant subdomain
Authentication
All API requests must include a valid access token in the Authorization header:
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...API Endpoints
Users
/users Auth Required Retrieve a paginated list of users in your tenant
Parameters
pagenumberPage number for pagination
limitnumberNumber of results per page (max 100)
searchstringSearch query for filtering users
Request Example
curl -X GET "https://your-tenant.ithbat.io/api/v1/users?page=1&limit=20" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"Response Example
{
"data": [
{
"id": "usr_1234567890",
"email": "[email protected]",
"name": "John Doe",
"status": "active",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 150,
"totalPages": 8
}
}/users/{id} Auth Required Retrieve detailed information about a specific user
Parameters
idstringrequiredThe unique identifier of the user
Request Example
curl -X GET "https://your-tenant.ithbat.io/api/v1/users/usr_1234567890" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"Response Example
{
"id": "usr_1234567890",
"email": "[email protected]",
"name": "John Doe",
"phoneNumber": "+1234567890",
"status": "active",
"emailVerified": true,
"mfaEnabled": true,
"roles": ["user", "admin"],
"metadata": {
"department": "Engineering",
"location": "San Francisco"
},
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
}/users Auth Required Create a new user in your tenant
Parameters
emailstringrequiredUser's email address
namestringrequiredUser's full name
passwordstringrequiredInitial password (must meet complexity requirements)
Request Example
curl -X POST "https://your-tenant.ithbat.io/api/v1/users" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"name": "Jane Smith",
"password": "SecureP@ssw0rd123",
"phoneNumber": "+1234567890"
}'Response Example
{
"id": "usr_0987654321",
"email": "[email protected]",
"name": "Jane Smith",
"status": "active",
"emailVerified": false,
"createdAt": "2024-01-15T11:00:00Z"
}/users/{id} Auth Required Update an existing user's information
Request Example
curl -X PATCH "https://your-tenant.ithbat.io/api/v1/users/usr_1234567890" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "John Updated Doe",
"phoneNumber": "+0987654321"
}'Response Example
{
"id": "usr_1234567890",
"email": "[email protected]",
"name": "John Updated Doe",
"phoneNumber": "+0987654321",
"updatedAt": "2024-01-15T12:00:00Z"
}/users/{id} Auth Required Permanently delete a user from your tenant
Request Example
curl -X DELETE "https://your-tenant.ithbat.io/api/v1/users/usr_1234567890" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"Response Example
{
"message": "User deleted successfully",
"deletedAt": "2024-01-15T13:00:00Z"
}Error Responses
Bad Request
The request was invalid or cannot be served. Check the request parameters.
Unauthorized
Authentication failed or access token is missing/invalid.
Forbidden
The request is valid but you don't have permission to perform this action.
Not Found
The requested resource does not exist.
Too Many Requests
Rate limit exceeded. Please slow down your requests.
Internal Server Error
Something went wrong on our end. Try again later or contact support.
Rate Limiting
API requests are rate limited based on your subscription plan: