Contacts
Returns a paginated list of contacts for the organization.
Rate limit: 300 requests per minute
Authorization: Bearer
The cursor to use for pagination.
The number of contacts to fetch. Defaults to 100. Must be greater than 0 and less than 1000.
The request ID for tracking.
The request was invalid or could not be completed.
The authenticated caller or organization is not allowed to access this endpoint or operation.
An unexpected internal error occurred.
GET /contacts HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"data": [
{
"account": {
"external_ids": [
{
"external_id": "text",
"label": "text"
}
],
"id": "text"
},
"avatar_url": "text",
"custom_fields": {
"role": {
"value": "admin"
}
},
"email": "text",
"emails": [
"text"
],
"external_ids": [
{
"external_id": "text",
"label": "text"
}
],
"id": "text",
"integration_user_ids": [
{
"id": "text",
"source": "text"
}
],
"name": "text",
"phone_numbers": [
"text"
],
"portal_role": "no_access",
"portal_role_id": "text",
"primary_phone_number": "text"
}
],
"pagination": {
"cursor": "text",
"has_next_page": true
},
"request_id": "text"
}Creates a new contact with the specified email and optional metadata.
Rate limit: 300 requests per minute
Authorization: Bearer
The external ID of the account that this contact belongs to. Cannot be used together with account_id.
The account that this contact belongs to.
The avatar URL of the contact. Must be a square .png, .jpg or .jpeg.
The email of the contact.
The name of the contact.
The phone numbers of the contact. Must contain only digits 0-9 and be 15 digits or less.
The portal role to assign to the contact. If not provided uses the default portal role from the portal settings.
The ID of the custom portal role to assign to the contact. Takes precedence over portal_role if provided.
The primary phone number. Must be in the list of phone_numbers. If there are any phone_numbers and this is not specified, the first phone number will be primary.
The request ID for tracking.
The request was invalid or could not be completed.
The authenticated caller or organization is not allowed to access this endpoint or operation.
An unexpected internal error occurred.
POST /contacts HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 326
{
"account_external_id": "text",
"account_id": "text",
"avatar_url": "text",
"custom_fields": [
{
"slug": "text",
"value": "text",
"values": [
"text"
]
}
],
"email": "text",
"external_ids": [
{
"external_id": "text",
"label": "text"
}
],
"name": "text",
"phone_numbers": [
"text"
],
"portal_role": "no_access",
"portal_role_id": "text",
"primary_phone_number": "text"
}{
"data": {
"account": {
"external_ids": [
{
"external_id": "text",
"label": "text"
}
],
"id": "text"
},
"avatar_url": "text",
"custom_fields": {
"role": {
"value": "admin"
}
},
"email": "text",
"emails": [
"text"
],
"external_ids": [
{
"external_id": "text",
"label": "text"
}
],
"id": "text",
"integration_user_ids": [
{
"id": "text",
"source": "text"
}
],
"name": "text",
"phone_numbers": [
"text"
],
"portal_role": "no_access",
"portal_role_id": "text",
"primary_phone_number": "text"
},
"request_id": "text"
}Returns a single contact by ID or external ID.
Rate limit: 300 requests per minute
Authorization: Bearer
The ID or external ID of the contact.
The request ID for tracking.
The request was invalid or could not be completed.
The authenticated caller or organization is not allowed to access this endpoint or operation.
An unexpected internal error occurred.
GET /contacts/{id} HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"data": {
"account": {
"external_ids": [
{
"external_id": "text",
"label": "text"
}
],
"id": "text"
},
"avatar_url": "text",
"custom_fields": {
"role": {
"value": "admin"
}
},
"email": "text",
"emails": [
"text"
],
"external_ids": [
{
"external_id": "text",
"label": "text"
}
],
"id": "text",
"integration_user_ids": [
{
"id": "text",
"source": "text"
}
],
"name": "text",
"phone_numbers": [
"text"
],
"portal_role": "no_access",
"portal_role_id": "text",
"primary_phone_number": "text"
},
"request_id": "text"
}Updates a contact by ID or external ID. Only provided fields are modified.
Rate limit: 300 requests per minute
Authorization: Bearer
The ID or external ID of the contact to update.
The external ID of the account to move the contact to. Cannot be used together with account_id.
The account to move the contact to. If empty string is passed in, the contact will be removed from its account.
The avatar URL of the contact. Must be a square .png, .jpg or .jpeg.
The email of the contact. Cannot be used together with the emails array field.
in: body The name of the contact.
The phone numbers of the contact. Must contain only digits 0-9 and be 15 digits or less.
The portal role to assign to the contact. Can be one of no_access, member, or admin, or a custom role slug.
The ID of the custom portal role to assign to the contact. Takes precedence over portal_role if provided.
The primary phone number. Must be in the list of phone_numbers. If there are any phone_numbers and this is not specified, the first phone number will be primary.
The request ID for tracking.
The request was invalid or could not be completed.
The authenticated caller or organization is not allowed to access this endpoint or operation.
An unexpected internal error occurred.
PATCH /contacts/{id} HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 372
{
"account_external_id": "text",
"account_id": "text",
"avatar_url": "text",
"custom_fields": [
{
"slug": "text",
"value": "text",
"values": [
"text"
]
}
],
"email": "text",
"emails": [
{
"email": "text",
"is_primary": true
}
],
"external_ids": [
{
"external_id": "text",
"label": "text"
}
],
"name": "text",
"phone_numbers": [
"text"
],
"portal_role": "no_access",
"portal_role_id": "text",
"primary_phone_number": "text"
}{
"data": {
"account": {
"external_ids": [
{
"external_id": "text",
"label": "text"
}
],
"id": "text"
},
"avatar_url": "text",
"custom_fields": {
"role": {
"value": "admin"
}
},
"email": "text",
"emails": [
"text"
],
"external_ids": [
{
"external_id": "text",
"label": "text"
}
],
"id": "text",
"integration_user_ids": [
{
"id": "text",
"source": "text"
}
],
"name": "text",
"phone_numbers": [
"text"
],
"portal_role": "no_access",
"portal_role_id": "text",
"primary_phone_number": "text"
},
"request_id": "text"
}Permanently deletes a contact by ID or external ID.
Rate limit: 30 requests per minute
Authorization: Bearer
The ID or external ID of the contact to delete.
The request ID for tracking.
The authenticated caller or organization is not allowed to access this endpoint or operation.
DELETE /contacts/{id} HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"request_id": "text"
}Filterable fields and their allowed operators:
id
equals, in, not_in
email
equals, in, not_in, string_contains
name
equals, in, not_in, string_contains
account_id
equals, in, not_in
For custom fields, pass the field slug as field.
Rate limit: 120 requests per minute
Authorization: Bearer
The cursor to use for pagination.
The number of contacts to fetch. Defaults to 100. Must be greater than 0 and less than 1000.
Fuzzy text search. Results are intersected with any provided filter.
The request ID for tracking.
The authenticated caller or organization is not allowed to access this endpoint or operation.
POST /contacts/search HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 194
{
"cursor": "text",
"filter": {
"field": "text",
"operator": "equals",
"subfilters": [
{
"field": "state",
"operator": "equals",
"value": "new"
}
],
"value": "text",
"values": [
"text"
]
},
"limit": 1,
"search_text": "text"
}{
"data": [
{
"account": {
"external_ids": [
{
"external_id": "text",
"label": "text"
}
],
"id": "text"
},
"avatar_url": "text",
"custom_fields": {
"role": {
"value": "admin"
}
},
"email": "text",
"emails": [
"text"
],
"external_ids": [
{
"external_id": "text",
"label": "text"
}
],
"id": "text",
"integration_user_ids": [
{
"id": "text",
"source": "text"
}
],
"name": "text",
"phone_numbers": [
"text"
],
"portal_role": "no_access",
"portal_role_id": "text",
"primary_phone_number": "text"
}
],
"pagination": {
"cursor": "text",
"has_next_page": true
},
"request_id": "text"
}Last updated
Was this helpful?

