Users

get

Get a list of users

Authorizations
Responses
curl -L \
  --url 'https://api.usepylon.com/users' \
  --header 'Authorization: Bearer JWT'
{
  "data": [
    {
      "avatar_url": "text",
      "email": "text",
      "emails": [
        "text"
      ],
      "id": "text",
      "name": "text",
      "role_id": "text",
      "status": "text"
    }
  ],
  "pagination": {
    "cursor": "text",
    "has_next_page": true
  },
  "request_id": "text"
}
get

Get a user by its ID

Authorizations
Path parameters
idstringrequired

The ID of the user to fetch.

Responses
curl -L \
  --url 'https://api.usepylon.com/users/{id}' \
  --header 'Authorization: Bearer JWT'
{
  "data": {
    "avatar_url": "text",
    "email": "text",
    "emails": [
      "text"
    ],
    "id": "text",
    "name": "text",
    "role_id": "text",
    "status": "text"
  },
  "request_id": "text"
}
patch

Update a user

Authorizations
Path parameters
idstringrequired

The ID of the user to update.

Body
role_idstringoptional

The role_id of the user.

statusstringoptional

The new user status for the user. Can be one of active, away, or out_of_office.

Responses
curl -L \
  --request PATCH \
  --url 'https://api.usepylon.com/users/{id}' \
  --header 'Authorization: Bearer JWT' \
  --header 'Content-Type: application/json' \
  --data '{
    "role_id": "text",
    "status": "text"
  }'
{
  "data": {
    "avatar_url": "text",
    "email": "text",
    "emails": [
      "text"
    ],
    "id": "text",
    "name": "text",
    "role_id": "text",
    "status": "text"
  },
  "request_id": "text"
}
post

Currently, the following fields are filterable for users:

  • email. Allowed operators: equals, in, not_in
Authorizations
Body
cursorstringoptional

The cursor to use for pagination.

filterobjectrequired

limitinteger · int64optional

The number of users to fetch. Defaults to 100. Must be greater than 0 and less than 1000.

Responses
curl -L \
  --request POST \
  --url 'https://api.usepylon.com/users/search' \
  --header 'Authorization: Bearer JWT' \
  --header 'Content-Type: application/json' \
  --data '{
    "cursor": "text",
    "filter": {
      "field": "text",
      "operator": "equals",
      "subfilters": [
        "[Circular Reference]"
      ],
      "value": "text",
      "values": [
        "text"
      ]
    },
    "limit": 1
  }'
{
  "data": [
    {
      "avatar_url": "text",
      "email": "text",
      "emails": [
        "text"
      ],
      "id": "text",
      "name": "text",
      "role_id": "text",
      "status": "text"
    }
  ],
  "pagination": {
    "cursor": "text",
    "has_next_page": true
  },
  "request_id": "text"
}

Last updated

Was this helpful?