Get users

Retrieves a list of users with optional filtering, sorting and pagination.

POST
/v1/users/search

Authorization

apiKeyAuth
x-api-key<token>

API key authentication. Create an API key in your user profile and include it in the x-api-key header.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://customermates.com/api/v1/users/search" \  -H "Content-Type: application/json" \  -d '{}'
{
  "p13nId": "string",
  "items": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "email": "user@example.com",
      "firstName": "string",
      "lastName": "string",
      "roleId": "7382d58e-652a-4905-b7c9-bcca1e0e5391",
      "status": "active",
      "avatarUrl": "string",
      "createdAt": "string",
      "updatedAt": "string",
      "leftAt": "string"
    }
  ],
  "filters": [
    null
  ],
  "searchTerm": "string",
  "sortDescriptor": null,
  "pagination": {
    "page": 0,
    "pageSize": 0,
    "totalPages": 0,
    "total": 0
  },
  "filterableFields": [
    null
  ],
  "columnOrder": [
    "string"
  ],
  "columnWidths": {
    "property1": 0,
    "property2": 0
  },
  "hiddenColumns": [
    "string"
  ],
  "viewMode": "string",
  "groupCounts": {
    "property1": 0,
    "property2": 0
  }
}
{
  "error": {
    "kind": "validation",
    "issues": [
      {
        "code": "string",
        "path": [
          "string"
        ],
        "message": "string",
        "customCode": "recordNotFound",
        "entitlement": "string"
      }
    ],
    "retryable": true
  }
}
{
  "error": {
    "kind": "validation",
    "issues": [
      {
        "code": "string",
        "path": [
          "string"
        ],
        "message": "string",
        "customCode": "recordNotFound",
        "entitlement": "string"
      }
    ],
    "retryable": true
  }
}
{
  "error": {
    "kind": "validation",
    "issues": [
      {
        "code": "string",
        "path": [
          "string"
        ],
        "message": "string",
        "customCode": "recordNotFound",
        "entitlement": "string"
      }
    ],
    "retryable": true
  }
}
Empty