Users

Get a list of users.

GEThttps://api.usepylon.com/users
Response
Body
dataarray of User (object)

The data payload of the response.

errorsarray of string

The list of errors, if any.

paginationPagination (object)
request_idstring

The request ID for tracking.

Request
const response = await fetch('https://api.usepylon.com/users', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "data": [
    {
      "email": "text",
      "id": "text",
      "name": "text",
      "role_id": "text"
    }
  ],
  "errors": [
    "text"
  ],
  "pagination": {
    "cursor": "text",
    "has_next_page": false
  },
  "request_id": "text"
}

Get a user by its ID.

GEThttps://api.usepylon.com/users/{id}
Path parameters
id*string

The ID of the user to fetch.

Response
Body
dataUser (object)
errorsarray of string

The list of errors, if any.

paginationPagination (object)
request_idstring

The request ID for tracking.

Request
const response = await fetch('https://api.usepylon.com/users/{id}', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "data": {
    "email": "text",
    "id": "text",
    "name": "text",
    "role_id": "text"
  },
  "errors": [
    "text"
  ],
  "pagination": {
    "cursor": "text",
    "has_next_page": false
  },
  "request_id": "text"
}

Update a user.

PATCHhttps://api.usepylon.com/users/{id}
Path parameters
id*string

The ID of the user to update.

Body
role_idstring

The role_id of the user.

Response
Body
dataUser (object)
errorsarray of string

The list of errors, if any.

paginationPagination (object)
request_idstring

The request ID for tracking.

Request
const response = await fetch('https://api.usepylon.com/users/{id}', {
    method: 'PATCH',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "data": {
    "email": "text",
    "id": "text",
    "name": "text",
    "role_id": "text"
  },
  "errors": [
    "text"
  ],
  "pagination": {
    "cursor": "text",
    "has_next_page": false
  },
  "request_id": "text"
}