Skip to content
Last updated

Client Management API Quickstart Guide

This quickstart guide will help you get started with the Client Management API, allowing you to make your first API call.

Step 1: Retrieve your client_id and client_secret

  1. Login your email.
  2. Look for an email from raipartners.com with subject Client Management API.
  3. Grab your client_id and initial client_secret.

Your client_id and client_secret are required to authenticate all API requests.

Step 2: Make Your First Client Management Request

Let's start by rotating your client_secret to replace your existing client_secret.

Step 1: Authenticate

Before you can call any API endpoint, you must authenticate using the client_id and client_secret originally provided by your RAI Partners' Client Success representative via email.

Retrieving JWT Token

Use the following curl command to authenticate:

curl -X POST https://api.raipartners.com/client-management/auth/token \
-H "Content-Type: application/json" \
-H 'accept: application/json' \
-H 'API-Version: 1.0.0' \
-d '{
  "client_id": "<YOUR_CLIENT_ID>",
  "client_secret": "<YOUR_CLIENT_SECRET>"
}'
  • client_id: The client_id assigned to your company.
  • client_secret: The associated client secret.

Response Example:

{
  "scope": "read:user write:user",
  "refresh_expires_in": 300,
  "token_type": "Bearer",
  "not-before-policy": 0,
  "access_token": "eyo.....",
  "expires_in": 300
}

Rotating the client_secret

Grab the access_token value from the authentication cal then use the following curl command to rotate the client_secret:

curl -X POST https://api.raipartners.com/client-management/auth/client-secret/rotation \
-H "Content-Type: application/json" \
-H 'accept: application/json' \
-H 'API-Version: 1.0.0' \
-H Authorization: Bearer YOUR_ACCESS_TOKEN

Response Example

{
  "secret": "PX4eWb9rcRT1RBqvLw4GtuqyoUFWoGLr"
}

This response confirms that the client_secret has been successfully rotated and provides the new client_secret.