Pylon
Knowledge BaseWebsiteChangelogBook a DemoLogin
  • Getting Started
    • Introduction
    • Quick Start
    • Slack Setup
    • Channel Configuration
    • User Guide
  • Support Workflows
    • Omnichannel Support
    • Issues
      • Views
      • Statuses
      • Message Editor
      • Copilot
      • Sidebar
      • Internal Threads
      • Proactive Issues
      • Translation
      • Bulk actions
      • Issue Groups
    • SLAs
    • Support Hours
    • CSAT
    • Ticket Forms
    • Assignment Rules
      • User Status
    • Email
  • Platform
    • Custom Fields
    • Required and Conditional Fields
    • Tags
    • Teams
    • Triggers
      • Logs & History
    • Macros
    • Command Search
    • Roles & User Management
    • Training Data
    • Ask AI
  • AI Agents
    • Overview
    • Build
      • Resources
    • Test
  • Knowledge Base
    • Overview
    • Articles & Collections
      • Editor
      • Copilot
      • Templates
      • Collaboration
    • Knowledge Gaps
    • Styling & Customization
    • Custom Authentication
    • Search
    • Translation
  • Customer Portal
    • Overview
    • Styling & Customization
    • Access Control
    • Portal Experience
    • Custom Authentication
  • Chat Widget
    • Overview
    • Styling
    • Functionality
    • Chat Experience
    • Chat Setup
    • Identity Verification
    • JavaScript API
  • Account Management
    • Accounts
    • Views
    • Notebooks
      • Blocks
    • Highlights
    • Fields
    • Copilot
    • Activities
      • Custom Activities
    • Sidebar
  • Reporting & Analytics
    • Analytics
    • Default Dashboards
    • Custom Dashboards
  • Broadcasts
    • Overview
    • Create a Broadcast
    • Analytics
  • Integrations
    • CRM
      • Salesforce
      • Hubspot
      • Attio
      • Pipedrive
    • Ticketing
      • Linear
      • GitHub Issues
      • Asana
      • Jira
    • Alerting
      • PagerDuty
      • Opsgenie
    • Chat
      • Slack
        • Internal Threads
        • Collect Data
        • Support Ticket Flow
        • Welcome Message
        • Bookmarks
        • Onboard Employees
        • Left Company
        • Slack Community
      • Microsoft Teams
      • Discord
    • Incident Management
      • incident.io
    • Call Recording
      • Gong
      • Fathom
      • Grain
      • Fireflies
  • Data Warehouse
    • Snowflake
    • BigQuery
  • Developer
    • API
      • Authentication
      • Errors
      • API reference
        • Attachments
        • Accounts
          • Activities
          • Highlights
        • Contacts
        • Custom Fields
        • Issues
        • Knowledge Base
        • Me
        • Messages
        • Tags
        • Teams
        • Ticket Forms
        • User roles
        • Users
      • External IDs
    • Custom Apps
    • Embedded Iframes
    • Webhooks
Powered by GitBook
On this page

Was this helpful?

  1. Developer
  2. API
  3. API reference

Contacts

PreviousHighlightsNextCustom Fields

Last updated 2 months ago

Was this helpful?

get

Get a contact by its ID

Authorizations
Path parameters
idstringRequired

The ID of the contact.

Query parameters
cursorstringOptional

The cursor to use for pagination.

limitinteger · int64Required

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

Responses
200Success
application/json
400Error
application/json
404Error
application/json
500Error
application/json
get
GET /contacts/{id} HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer JWT
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"
}
delete

Delete an existing contact

Authorizations
Path parameters
idstringRequired

The ID of the contact to delete.

Responses
200Success
application/json
delete
DELETE /contacts/{id} HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer JWT
Accept: */*
200Success
{
  "request_id": "text"
}
  • GET/contacts
  • POST/contacts
  • GET/contacts/{id}
  • PATCH/contacts/{id}
  • DELETE/contacts/{id}
  • POSTSearch for contacts by a given filter
get

Get all contacts

Authorizations
Responses
200Success
application/json
400Error
application/json
404Error
application/json
500Error
application/json
get
GET /contacts HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer JWT
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"
}
post

Create a new contact

Authorizations
Body
account_idstringOptional

The account that this contact belongs to.

avatar_urlstringOptional

The avatar URL of the contact. Must be a square .png, .jpg or .jpeg.

emailstringRequired

The email of the contact.

namestringRequired

The name of the contact.

portal_rolestring · enumOptional

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

Possible values:
Responses
200Success
application/json
400Error
application/json
404Error
application/json
500Error
application/json
post
POST /contacts HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer JWT
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"
}
patch

Update an existing contact

Authorizations
Path parameters
idstringRequired

The ID of the contact to update.

Body
account_idstringOptional

The account to move the contact to.

avatar_urlstringOptional

The avatar URL of the contact. Must be a square .png, .jpg or .jpeg.

emailstringOptional

The email of the contact.

namestringOptional

in: body

The name of the contact.

portal_rolestring · enumOptional

The portal role to assign to the contact. Can be one of no_access, member, or admin.

  • no_access PortalRoleNoAccess

  • member PortalRoleMember

  • admin PortalRoleAdmin

Possible values:
Responses
200Success
application/json
400Error
application/json
404Error
application/json
500Error
application/json
patch
PATCH /contacts/{id} HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer JWT
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"
}

Search for contacts by a given filter

post

Currently, the following fields are filterable for contacts:

  • id. Allowed operators: equals, in, not_in

  • email. Allowed operators: equals, in, not_in

  • custom fields (pass in the slug of the custom field)

Authorizations
Body
cursorstringOptional

The cursor to use for pagination.

limitinteger · int64Optional

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

Responses
200Success
application/json
post
POST /contacts/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
}
200Success
{
  "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"
}