/contacts
This endpoint allows you to list all Contacts.
getContacts
| Name | Type | Description |
|---|---|---|
limit
|
integer |
Number of contacts per page (defaults to 25). |
page
|
integer |
Page number for pagination (defaults to 1). |
expanded
|
string |
Comma-separated list of relations to include in the response. Allowed values: locals, profile_picture, suppliers, user, extensions_permissions. |
sort
|
string |
Sort results by one or more fields. Allowed fields: name, email. Use a comma-separated list for multiple sorts and prefix a field with "-" for descending order. The alias "sorts" is also supported. |
s_contact_id
|
integer |
Filter by a specific contact ID. |
s_contact_id_in
|
string |
Comma-separated list of contact IDs to include. |
s_contact_id_notin
|
string |
Comma-separated list of contact IDs to exclude. |
s_email
|
string |
Filter by the exact email address. |
s_email_like
|
string |
Filter contacts whose email contains the provided value (case-insensitive). |
s_email_notin
|
string |
Comma-separated list of email addresses to exclude. |
s_name
|
string |
Filter by the exact contact name. |
s_name_like
|
string |
Filter contacts whose name contains the provided value (case-insensitive). |
s_phone
|
string |
Filter by the contact phone number. |
s_has_access
|
string |
Filter by the has_access field (can be 1 or 0). |
s_is_direct_user
|
string |
Filters only contacts who have access to the Direct portal. |
s_clients-client_id
|
integer |
Filter contacts associated with the provided client ID. |
sc_has_email
|
string |
Scope results to contacts that have a non-empty email address (flag parameter, any value). |
data
array<object>
id
string
required
read-only
ID of the Contact
Example: 123
type
string
required
read-only
Model type
contact
Example: contact
attributes
object
required
contact_id
integer
read-only
ID of the Contact
Example: 123
entity_id
integer
read-only
ID of the Entity
Example: 123
cellphone
string
The cellphone number of the Contact
Example: 123456789
language
string
The language of the Contact
Example: pt_br
email
string | null
The email of the Contact
Example: foo@bar.com
full_name
string
The full name of the Contact
Example: Jose Pinhal
phone
string
The phone number of the Contact
Example: 123456789
is_direct_user
boolean
Indicates whether the contact is a Direct user
Example:
has_access
union
Indicates whether the contact has access to Direct
Example:
relationships
object
The relationships of the Contact
suppliers
object
The Suppliers associated to the Contact
clients
object
The Clients associated to the Contact
extensionsPermissions
object
The Extensions Permissions associated to the Contact
locals
object
The Locations associated to the Contact
profilePicture
object
The profile picture of the Contact
user
object
The user associated to the Contact
meta
object
custom_fields
object | null
meta
object
Meta model structure details
pagination
object
total
integer
required
Total items.
Example: 1
count
integer
required
Total items returned for the current page.
Example: 1
per_page
integer
required
Maximum number of records per page.
Example: 1
current_page
integer
required
Number of the current page.
total_pages
integer
required
Number of the total pages.
links
object
Requests that return multiple items include a `links` attribute, with links related to request's context.
self
string
required
read-only
Current response link.
Example: /path?page=1
first
string
required
read-only
Link to the first page result.
Example: /path?page=1
last
string
required
read-only
Link to the previous page result.
Example: /path?page=1
next
string
read-only
Link to the next page result.
Example: /path?page=1
status
string
error
error
object
properties
object
Only present when related to property validation error
dev_message
string
Example: Property validation error. Check the "properties" section in the response.
http_code
integer
400
message
string
Example: Property validation error.
more_info
string
status
string
error
error
object
http_code
integer
401
message
string
Example: Authentication token invalid.
more_info
string
status
string
error
error
object
http_code
integer
429
message
string
Example: Too Many Requests.
more_info
string
status
string
error
error
object
http_code
integer
500
message
string
Example: An error has occurred during the request.
more_info
string
curl -X GET \
'https://api.sandbox.infraspeak.com/v3/contacts' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_API_TOKEN'
const response = await fetch('https://api.sandbox.infraspeak.com/v3/contacts', {
method: 'GET',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_TOKEN',
},
});
const data = await response.json();
$response = Http::withHeaders([
'Accept' => 'application/json',
'Content-Type' => 'application/json',
])->withToken('YOUR_API_TOKEN')
->get('https://api.sandbox.infraspeak.com/v3/contacts');
import requests
response = requests.get(
'https://api.sandbox.infraspeak.com/v3/contacts',
headers={
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_TOKEN',
},
)
data = response.json()