> ## Content Index
> Fetch the complete content index at: https://blog.fabrixly.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# How to Use Client Management APIs
- URL: https://blog.fabrixly.com/how-to-use-client-management-apis/
- Published: 2026-07-07T14:10:46.000Z
- Updated: 2026-07-07T14:10:46.000Z
- Author: Fabrixly
- Tags: Documentation

This guide describes how to manage OIDC clients programmatically using the Fabrixly-IDS Client Management APIs.

---

## 🔐 Authentication & Prerequisites

All client management endpoints require administrative authentication. To call them:

1. **Include the Token in the Authorization Header**: Add `-H "Authorization: Bearer <your-admin-jwt-token>"` to your API calls.

**Obtain an Admin JWT Token**:

```bash
curl -X POST https://ids.fabrixly.com/api/auth/login \
  -H "Content-Type: application/json" \
  -d '{
    "email": "admin@example.com",
    "password": "your-admin-password"
  }'

```

*Note: This returns a JSON response containing a `token`.*

---

## 1\. Create a Client

Creates a new OIDC client application registration in the database.

- **HTTP Method**: `POST`
- **Path**: `/api/clients`
- **Headers**:
  - `Content-Type: application/json`
  - `Authorization: Bearer <your-admin-jwt-token>`

### Request Body Parameters

| Parameter                     | Type    | Required | Description                                                                               |
| ----------------------------- | ------- | -------- | ----------------------------------------------------------------------------------------- |
| client\_name                  | string  | Yes      | The user-friendly name of the client app.                                                 |
| redirect\_uris                | array   | Yes      | Redirect URIs allowed during auth flows.                                                  |
| response\_types               | array   | No       | Allowed OIDC response types (e.g., \["code"\], \["token id\_token"\]).                    |
| grant\_types                  | array   | No       | Allowed OAuth grant types (e.g., \["authorization\_code"\], \["client\_credentials"\]).   |
| token\_endpoint\_auth\_method | string  | No       | Auth method (e.g., client\_secret\_basic, client\_secret\_post, none).                    |
| auth\_mode                    | string  | No       | The default authentication mode: password, otp, password\_and\_otp, flexible, magic-link. |
| enable\_magic\_link           | boolean | No       | Enable Magic Link authentication (true/false).                                            |
| enable\_mobile\_login         | boolean | No       | Enable mobile login option (true/false).                                                  |
| otp\_delivery\_method         | string  | No       | email or sms.                                                                             |

### Example Request (curl)

```bash
curl -X POST https://ids.fabrixly.com/api/clients \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <your-admin-jwt-token>" \
  -d '{
    "client_name": "My Client App",
    "redirect_uris": ["http://localhost:3001/callback"],
    "response_types": ["code"],
    "grant_types": ["authorization_code", "refresh_token"],
    "token_endpoint_auth_method": "client_secret_basic",
    "auth_mode": "flexible",
    "enable_magic_link": true,
    "enable_mobile_login": false,
    "otp_delivery_method": "email"
  }'

```

### Response (`201 Created`)

```json
{
  "id": "cli_abc123xyz789",
  "client_id": "my-client-app-id",
  "client_name": "My Client App",
  "client_secret": "fabrixly_sec_999888777...",
  "redirect_uris": ["http://localhost:3001/callback"],
  "response_types": ["code"],
  "grant_types": ["authorization_code", "refresh_token"],
  "token_endpoint_auth_method": "client_secret_basic",
  "auth_mode": "flexible",
  "enable_magic_link": true,
  "enable_mobile_login": false,
  "otp_delivery_method": "email"
}

```

---

## 2\. List Clients

Retrieve all registered clients inside the organization context of the admin.

- **HTTP Method**: `GET`
- **Path**: `/api/clients`
- **Headers**:
  - `Authorization: Bearer <your-admin-jwt-token>`

### Example Request (curl)

```bash
curl -X GET https://ids.fabrixly.com/api/clients \
  -H "Authorization: Bearer <your-admin-jwt-token>"

```

### Response (`200 OK`)

```json
[
  {
    "id": "cli_abc123xyz789",
    "client_id": "my-client-app-id",
    "client_name": "My Client App",
    "redirect_uris": ["http://localhost:3001/callback"]
  }
]

```

---

## 3\. Get Client Details

Retrieves details of a specific client by ID.

- **HTTP Method**: `GET`
- **Path**: `/api/clients/:id`
- **Headers**:
  - `Authorization: Bearer <your-admin-jwt-token>`

### Example Request (curl)

```bash
curl -X GET https://ids.fabrixly.com/api/clients/cli_abc123xyz789 \
  -H "Authorization: Bearer <your-admin-jwt-token>"

```

### Response (`200 OK`)

```json
{
  "id": "cli_abc123xyz789",
  "client_id": "my-client-app-id",
  "client_name": "My Client App",
  "redirect_uris": ["http://localhost:3001/callback"],
  "response_types": ["code"],
  "grant_types": ["authorization_code", "refresh_token"],
  "token_endpoint_auth_method": "client_secret_basic",
  "auth_mode": "flexible"
}

```

---

## 4\. Update Client Settings

Modifies configurations of an existing client.

- **HTTP Method**: `PUT`
- **Path**: `/api/clients/:id`
- **Headers**:
  - `Content-Type: application/json`
  - `Authorization: Bearer <your-admin-jwt-token>`

### Example Request (curl)

```bash
curl -X PUT https://ids.fabrixly.com/api/clients/cli_abc123xyz789 \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <your-admin-jwt-token>" \
  -d '{
    "client_name": "My Client App (Updated)",
    "auth_mode": "magic-link",
    "enable_magic_link": true
  }'

```

### Response (`200 OK`)

```json
{
  "id": "cli_abc123xyz789",
  "client_id": "my-client-app-id",
  "client_name": "My Client App (Updated)",
  "auth_mode": "magic-link",
  "enable_magic_link": true
}

```

---

## 5\. Delete Client

Deletes a registered client from the system database.

- **HTTP Method**: `DELETE`
- **Path**: `/api/clients/:id`
- **Headers**:
  - `Authorization: Bearer <your-admin-jwt-token>`

### Example Request (curl)

```bash
curl -X DELETE https://ids.fabrixly.com/api/clients/cli_abc123xyz789 \
  -H "Authorization: Bearer <your-admin-jwt-token>"

```

### Response (`200 OK`)

```json
{
  "message": "Client deleted successfully"
}

```