Contacts
Get all contacts
GET /contacts HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"data": [
{
"account": {
"id": "text"
},
"avatar_url": "text",
"custom_fields": {
"ANY_ADDITIONAL_PROPERTY": {
"slug": "text",
"value": "text",
"values": [
"text"
]
}
},
"email": "text",
"emails": [
"text"
],
"id": "text",
"name": "text",
"portal_role": "no_access"
}
],
"pagination": {
"cursor": "text",
"has_next_page": true
},
"request_id": "text"
}
Create a new contact
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 portal role to assign to the contact. If not provided uses the default portal role from the portal settings.
-
no_access PortalRoleNoAccess
-
member PortalRoleMember
-
admin PortalRoleAdmin
POST /contacts HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 163
{
"account_id": "text",
"avatar_url": "text",
"custom_fields": [
{
"slug": "text",
"value": "text",
"values": [
"text"
]
}
],
"email": "text",
"name": "text",
"portal_role": "no_access"
}
{
"data": {
"account": {
"id": "text"
},
"avatar_url": "text",
"custom_fields": {
"ANY_ADDITIONAL_PROPERTY": {
"slug": "text",
"value": "text",
"values": [
"text"
]
}
},
"email": "text",
"emails": [
"text"
],
"id": "text",
"name": "text",
"portal_role": "no_access"
},
"request_id": "text"
}
Get a contact by its ID
The ID of the contact.
The cursor to use for pagination.
The number of accounts to fetch. Defaults to 100. Must be greater than 0 and less than 1000.
GET /contacts/{id} HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"data": {
"account": {
"id": "text"
},
"avatar_url": "text",
"custom_fields": {
"ANY_ADDITIONAL_PROPERTY": {
"slug": "text",
"value": "text",
"values": [
"text"
]
}
},
"email": "text",
"emails": [
"text"
],
"id": "text",
"name": "text",
"portal_role": "no_access"
},
"request_id": "text"
}
Update an existing contact
The ID of the contact to update.
The account to move the contact to.
The avatar URL of the contact. Must be a square .png, .jpg or .jpeg.
The email of the contact.
in: body
The name of the contact.
The portal role to assign to the contact. Can be one of no_access
, member
, or admin
.
-
no_access PortalRoleNoAccess
-
member PortalRoleMember
-
admin PortalRoleAdmin
PATCH /contacts/{id} HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 163
{
"account_id": "text",
"avatar_url": "text",
"custom_fields": [
{
"slug": "text",
"value": "text",
"values": [
"text"
]
}
],
"email": "text",
"name": "text",
"portal_role": "no_access"
}
{
"data": {
"account": {
"id": "text"
},
"avatar_url": "text",
"custom_fields": {
"ANY_ADDITIONAL_PROPERTY": {
"slug": "text",
"value": "text",
"values": [
"text"
]
}
},
"email": "text",
"emails": [
"text"
],
"id": "text",
"name": "text",
"portal_role": "no_access"
},
"request_id": "text"
}
Delete an existing contact
The ID of the contact to delete.
DELETE /contacts/{id} HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"request_id": "text"
}
Currently, the following fields are filterable for contacts:
-
id. Allowed operators:
equals
,in
,not_in
-
email. Allowed operators:
equals
,in
,not_in
,string_contains
-
custom fields (pass in the slug of the custom field)
-
account_id. Allowed operators:
equals
,in
,not_in
The cursor to use for pagination.
The number of contacts to fetch. Defaults to 100. Must be greater than 0 and less than 1000.
POST /contacts/search HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer YOUR_SECRET_TOKEN
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": [
{
"account": {
"id": "text"
},
"avatar_url": "text",
"custom_fields": {
"ANY_ADDITIONAL_PROPERTY": {
"slug": "text",
"value": "text",
"values": [
"text"
]
}
},
"email": "text",
"emails": [
"text"
],
"id": "text",
"name": "text",
"portal_role": "no_access"
}
],
"pagination": {
"cursor": "text",
"has_next_page": true
},
"request_id": "text"
}
Last updated
Was this helpful?