Users

get

Get a list of users

Authorizations
Responses
200Success
application/json
get
GET /users HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer JWT
Accept: */*
{
  "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
200Success
application/json
get
GET /users/{id} HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer JWT
Accept: */*
{
  "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
200Success
application/json
patch
PATCH /users/{id} HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 34

{
  "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"
}

Search for users by a given filter

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.

limitinteger · int64Optional

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

Responses
200Success
application/json
post
POST /users/search HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 312

{
  "cursor": "text",
  "filter": {
    "field": "text",
    "operator": "equals",
    "subfilters": [
      {
        "field": "text",
        "operator": "equals",
        "subfilters": [
          {
            "field": "text",
            "operator": "equals",
            "subfilters": "[Circular Reference]",
            "value": "text",
            "values": [
              "text"
            ]
          }
        ],
        "value": "text",
        "values": [
          "text"
        ]
      }
    ],
    "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?