User List API
curl --request GET \
--url https://api.pazy.io/v1.0/usersimport requests
url = "https://api.pazy.io/v1.0/users"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.pazy.io/v1.0/users', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.pazy.io/v1.0/users",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pazy.io/v1.0/users"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.pazy.io/v1.0/users")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pazy.io/v1.0/users")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyUser APIs
User List API
Retrieve a paginated list of users in your organization
User List API
curl --request GET \
--url https://api.pazy.io/v1.0/usersimport requests
url = "https://api.pazy.io/v1.0/users"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.pazy.io/v1.0/users', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.pazy.io/v1.0/users",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pazy.io/v1.0/users"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.pazy.io/v1.0/users")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pazy.io/v1.0/users")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyAuthentication
All requests require an API key in the request headers. Headers:Authorization: Api-Key YOUR_API_KEY
Request
Content-Type:application/json
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | No | Filter users by name (partial match). Min 1, Max 100 characters. |
limit | integer | No | Number of records to return. Min 1, Max 100. |
cursor | string | No | Cursor for pagination. Default 0. |
Code Examples
curl -X GET "https://api.pazy.io/v1.0/users?limit=30" \
-H "Authorization: Api-Key YOUR_API_KEY"
const params = new URLSearchParams({ limit: '30' });
const response = await fetch(`https://api.pazy.io/v1.0/users?${params}`, {
method: 'GET',
headers: {
'Authorization': 'Api-Key YOUR_API_KEY'
}
});
const result = await response.json();
import requests
url = "https://api.pazy.io/v1.0/users"
headers = {
"Authorization": "Api-Key YOUR_API_KEY"
}
params = { "limit": 30 }
response = requests.get(url, headers=headers, params=params)
result = response.json()
Success Response
HTTP Status:200 OK
Response Fields:
| Field | Type | Description |
|---|---|---|
ok | boolean | Indicates whether the request was successful |
data | object | Contains the user list response data |
data.users | array | List of users |
data.users[].id | string | Unique identifier for the user |
data.users[].name | string | Full name of the user |
data.context | object | Pagination metadata |
data.context.hasMore | boolean | Indicates whether there are more users to fetch |
data.context.nextCursor | number | Cursor to fetch the next page |
Response Example
{
"ok": true,
"data": {
"users": [
{
"id": "<userId>",
"name": "John Doe"
},
{
"id": "<userId>",
"name": "Jane Smith"
}
],
"context": {
"hasMore": true,
"nextCursor": 30
}
}
}
Error Responses
Validation Error
HTTP Status:400 Bad Request
{
"ok": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Validation failed: /query/limit: must be <= 100"
}
}
Authentication Errors
HTTP Status:401 Unauthorized
{
"ok": false,
"error": {
"code": "MISSING_CREDENTIALS",
"message": "Missing Credentials"
}
}
{
"ok": false,
"error": {
"code": "INVALID_API_KEY",
"message": "Invalid API Key"
}
}
Permission Errors
HTTP Status:403 Forbidden
{
"ok": false,
"error": {
"code": "INSUFFICIENT_PERMISSIONS",
"message": "Permission check failed - PERMISSION_CHECK_FAILED"
}
}
Internal Error
HTTP Status:500 Internal Server Error
{
"ok": false,
"error": {
"code": "INTERNAL_ERROR",
"message": "Internal error"
}
}
Best Practices
- Use the
idreturned for a user as the input to the User Details API for full user information - Use
nameto narrow down results — partial matching is supported (e.g.,JohnmatchesJohn Doe,Johnny) - Use
cursorandlimittogether to paginate;nextCursorfrom the response can be used as thecursorvalue for the next call
Was this page helpful?