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/v1

Replace 'your-tenant' with your actual tenant subdomain

Authentication

All API requests must include a valid access token in the Authorization header:

Authorization Header
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...

API Endpoints

Users

GET
/users Auth Required

Retrieve a paginated list of users in your tenant

Parameters

pagenumber

Page number for pagination

limitnumber

Number of results per page (max 100)

searchstring

Search query for filtering users

Request Example

cURL
curl -X GET "https://your-tenant.ithbat.io/api/v1/users?page=1&limit=20" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response Example

JSON
{
  "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
  }
}
GET
/users/{id} Auth Required

Retrieve detailed information about a specific user

Parameters

idstringrequired

The unique identifier of the user

Request Example

cURL
curl -X GET "https://your-tenant.ithbat.io/api/v1/users/usr_1234567890" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response Example

JSON
{
  "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"
}
POST
/users Auth Required

Create a new user in your tenant

Parameters

emailstringrequired

User's email address

namestringrequired

User's full name

passwordstringrequired

Initial password (must meet complexity requirements)

Request Example

cURL
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

JSON
{
  "id": "usr_0987654321",
  "email": "[email protected]",
  "name": "Jane Smith",
  "status": "active",
  "emailVerified": false,
  "createdAt": "2024-01-15T11:00:00Z"
}
PATCH
/users/{id} Auth Required

Update an existing user's information

Request Example

cURL
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

JSON
{
  "id": "usr_1234567890",
  "email": "[email protected]",
  "name": "John Updated Doe",
  "phoneNumber": "+0987654321",
  "updatedAt": "2024-01-15T12:00:00Z"
}
DELETE
/users/{id} Auth Required

Permanently delete a user from your tenant

Request Example

cURL
curl -X DELETE "https://your-tenant.ithbat.io/api/v1/users/usr_1234567890" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response Example

JSON
{
  "message": "User deleted successfully",
  "deletedAt": "2024-01-15T13:00:00Z"
}

Error Responses

400

Bad Request

The request was invalid or cannot be served. Check the request parameters.

401

Unauthorized

Authentication failed or access token is missing/invalid.

403

Forbidden

The request is valid but you don't have permission to perform this action.

404

Not Found

The requested resource does not exist.

429

Too Many Requests

Rate limit exceeded. Please slow down your requests.

500

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:

Free100 requests/min
Pro1,000 requests/min
EnterpriseCustom