DocsGetting StartedAPI ReferenceGet All Users

Get All CL2C Users API

Learn how to retrieve a list of all CL2C users through the /v1/cl2c/users endpoint.

⚠️ This content is not available in your language yet.

The GET /v1/cl2c/users API endpoint provides a list of all CL2C users. Access to this endpoint requires specific headers, including tenant and X-API-Key, to authenticate the request securely.

Endpoint

GET
/v1/cl2c/users
Fetches a list of all CL2C users.

Parameters

NameTypeLocationRequiredDescription
tenantstringHeaderYesTenant ID for accessing this API.
X-API-KeystringHeaderYesAPI Key ID for accessing this API.

Responses

Success (200)

Content Type: application/json

Example Response

[
  {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "userName": "string",
    "firstName": "string",
    "lastName": "string",
    "email": "string",
    "emailConfirmed": true,
    "authenticated": true,
    "phoneNumber": "string",
    "walletAddress": "string"
  }
]

This response returns a JSON array of user objects, each containing fields such as id, userName, firstName, lastName, email, emailConfirmed, authenticated, phoneNumber, and walletAddress.

Error (400)

Content Type: application/json

Example Error Response

{
  "type": "string",
  "title": "string",
  "status": 400,
  "detail": "string",
  "instance": "string",
  "errors": {
    "fieldName": ["Error message 1", "Error message 2"]
  }
}

This response provides detailed information on the errors that occurred, such as the specific field issues, error type, and status.

Default Error Response

Content Type: application/json

Example Default Error Response

{
  "messages": ["string"],
  "source": "string",
  "exception": "string",
  "errorId": "string",
  "supportMessage": "string",
  "statusCode": 0
}

This generic error response includes an array of messages, an error source, an exception message, and an error ID for support.

Code Samples

Usage in Different Frameworks

Node.js Example

const axios = require('axios');
 
axios.get('https://api.example.com/v1/cl2c/users', {
  headers: {
    'tenant': 'your-tenant-id',
    'X-API-Key': 'your-api-key'
  }
})
.then(response => console.log(response.data))
.catch(error => console.error(error.response.data));