Get User Details API

Learn how to retrieve CleverTap users via SCIM.

Overview

This API retrieves CleverTap user details. You can:

  • Fetch a specific user by email address, or
  • Retrieve a paginated list of users with optional SCIM-compliant filtering.

HTTP Method

GET

Endpoint

  • List users: /nx/v2/scim/v2/Users
  • Get user by email: /nx/v2/scim/v2/Users/{email}

Base URL

The following is an example base URL for a CleverTap account in the United States region:

https://<clevertap_domain>/nx/v2/scim/v2/Users

Example: https://us1.dashboard.clevertap.com/nx/v2/scim/v2/Users

🚧

Region-Specific

The CleverTap domain is environment- and region-specific. Do not copy the example URL directly. Always replace <clevertap_domain> with the domain for your region. Refer Region for more details.

Headers

The following headers must be included with every API request:

Header

Description

Required

Content-Type

Content type of the request payload.
Must be application/scim+json

Yes

Authorization

Bearer <SCIM_TOKEN>

Yes

Replace <SCIM_TOKEN> with a valid SCIM Bearer token generated from the CleverTap dashboard. Refer to Generate SCIM Token for API-Based Provisioning.

Example Request (Get User by Email)

The following is the sample request:

curl -X GET /nx/v2/scim/v2/Users/[email protected] \
-H "Authorization: Bearer <SCIM_TOKEN>" \
-H "Content-Type: application/scim+json"

Path Parameters

The following is the list of path parameters:

ParameterTypeRequiredDescription
emailStringYesEmail address of the user

Example Response 1

The following is the sample response:

{
  "id": "user-unique-id",
  "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
  "userName": "[email protected]",
  "name": {
    "givenName": "John",
    "familyName": "Doe"
  },
  "active": true,
  "accounts": [
    {
      "accountId": "CLEVERTAP_ACCOUNT_ID",
      "roles": "Admin,Editor",
      "teams": "Engineering,Product",
      "status": "Active"
    }
  ],
  "invitedBy": "[email protected]"
}

Example Request 2 (List Users)

The following is the sample request with a query parameter:

curl -X GET "https://<clevertap_domain>/nx/v2/scim/v2/Users?startIndex=0&count=20" \
-H "Authorization: Bearer <SCIM_TOKEN>" \
-H "Content-Type: application/scim+json"

Query Parameters

The following is the list of query parameters:

ParameterTypeRequiredDescription
startIndexintNoZero-based index to start returning results (pagination).
countintNoMaximum number of users to return in the response.
filterstringNoSCIM-compliant filter expression (for example, userName eq "email").

Example Response 2

The following is the sample response:

{
  "schemas": ["urn:ietf:params:scim:api:messages:2.0:ListResponse"],
  "totalResults": 50,
  "startIndex": 0,
  "itemsPerPage": 20,
  "resources": [
    {
      "id": "user-unique-id",
      "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
      "name": {
        "givenName": "John",
        "familyName": "Doe"
      },
      "active": true,
      "accounts": [
        {
          "accountId": "CLEVERTAP_ACCOUNT_ID",
          "roles": "Admin,Editor",
          "teams": "Engineering,Product",
          "status": "Active"
        }
      ],
      "invitedBy": "[email protected]"
    }
  ]
}

Response Parameters

The following is the list of response parameters:

Parameter PathTypeDescription
schemasArray of StringSCIM schema identifiers. Must include urn:ietf:params:scim:schemas:core:2.0:User.
totalResultsintTotal number of matching users.
startIndexintIndex of the first returned result.
itemsPerPageintNumber of users returned in the response.
resourcesArrayList of user resources.
resources[].idStringUnique identifier of the user.
resources[].activeBooleanIndicates whether the user is active.
resources[].invitedByStringEmail address of the user who invited this user. (Mandatory)
resources[].nameObjectUser name details.
resources[].name.givenNameStringFirst name.
resources[].name.familyNameStringLast name.
resources[].accountsArrayAccounts associated with the user.
resources[].accounts[].accountIdStringCleverTap account identifier.
resources[].accounts[].rolesStringComma-separated list of roles.
resources[].accounts[].teamsStringComma-separated list of teams.
resources[].accounts[].statusStringUser status in the account (Active, Revoke, Delete).

Error Codes

The following is the list of error codes and responses:

Error CodeDescriptionSample Payload
400Bad Request – Invalid or malformed input (e.g., incorrect email format).json\n{\n "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],\n "detail": "Invalid email format",\n "status": 400\n}
401Unauthorized – SCIM token is missing or invalid.json\n{\n "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],\n "detail": "Unauthorized: Invalid token",\n "status": 401\n}
403Forbidden – You do not have permission to access this resource.json\n{\n "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],\n "detail": "Forbidden: Access denied",\n "status": 403\n}
404Not Found – User not found with the provided identifier.json\n{\n "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],\n "detail": "User not found: [email protected]",\n "status": 404\n}
429Too Many Requests – Rate limit exceeded.json\n{\n "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],\n "detail": "Rate limit exceeded. Please try again later.",\n "status": 429\n}
500Internal Server Error – Something went wrong on the server.json\n{\n "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],\n "detail": "Unexpected server error",\n "status": 500\n}