For the complete documentation index, see llms.txt. This page is also available as Markdown.

Activities

Create custom activity types and write new activity onto accounts.

Create a new activity for an account

post
/accounts/{id}/activities

The {id} parameter accepts either: Internal account ID (UUID format) External ID (any string format)

Rate limit: 120 requests per minute

Authorizations
AuthorizationstringRequired

Authorization: Bearer

Path parameters
idstringRequired

The ID or external ID of the account to create the activity for.

Body
body_htmlstringOptional

Optional HTML content to display in the activity.

contact_idstringOptional

Optional contact ID of the actor of the activity.

happened_atstring · date-timeOptional

Timestamp (RFC3339) of when the activity happened. Defaults to the current time if empty.

linkstringOptional

Optional link to add to the activity.

link_textstringOptional

Optional link text to display on the activity. Defaults to "Open link" if not provided. Applies only if a link is provided.

slugstringRequired

The slug of the activity to create.

user_idstringOptional

Optional user ID of the actor of the activity.

Responses
200Success
application/json
request_idstringRequired
post/accounts/{id}/activities
POST /accounts/{id}/activities HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 145

{
  "body_html": "text",
  "contact_id": "text",
  "happened_at": "2026-01-01T00:00:00.000Z",
  "link": "text",
  "link_text": "text",
  "slug": "text",
  "user_id": "text"
}
{
  "data": {
    "success": true
  },
  "request_id": "text"
}

Get custom activity types

get
/activity-types

Returns all custom activity type definitions for the organization.

Rate limit: 30 requests per minute

Authorizations
AuthorizationstringRequired

Authorization: Bearer

Responses
200Success
application/json
request_idstringRequired

The request ID for tracking.

get/activity-types
GET /activity-types HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": [
    {
      "icon_url": "text",
      "id": "text",
      "label": "text",
      "slug": "text"
    }
  ],
  "pagination": {
    "cursor": "text",
    "has_next_page": true
  },
  "request_id": "text"
}

Get custom activities for an account

get
/accounts/{id}/activities

Returns custom activities for the specified account, ordered from newest to oldest. The {id} parameter accepts either: Internal account ID (UUID format) External ID (any string format)

Rate limit: 300 requests per minute

Authorizations
AuthorizationstringRequired

Authorization: Bearer

Path parameters
idstringRequired

The ID or external ID of the account to fetch activities for.

Query parameters
activity_typestringOptional

The custom activity type slug to filter by.

start_timestring · date-timeOptional

The start time (RFC3339) of the activity time range.

end_timestring · date-timeOptional

The end time (RFC3339) of the activity time range.

cursorstringOptional

The cursor to use for pagination.

limitinteger · int64Optional

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

Responses
200Success
application/json
request_idstringRequired

The request ID for tracking.

get/accounts/{id}/activities
GET /accounts/{id}/activities HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": [
    {
      "account_id": "text",
      "activity_type": {
        "icon_url": "text",
        "id": "text",
        "label": "text",
        "slug": "text"
      },
      "body_html": "text",
      "contact_id": "text",
      "created_at": "2026-01-01T00:00:00.000Z",
      "happened_at": "2026-01-01T00:00:00.000Z",
      "id": "text",
      "link": "text",
      "link_text": "text",
      "updated_at": "2026-01-01T00:00:00.000Z",
      "user_id": "text"
    }
  ],
  "pagination": {
    "cursor": "text",
    "has_next_page": true
  },
  "request_id": "text"
}

Get email activities for an account

get
/accounts/{id}/email-activities

Returns email threads synced to the specified account from connected Gmail and Outlook inboxes, ordered by their latest email from newest to oldest. The {id} parameter accepts either: Internal account ID (UUID format) External ID (any string format)

Rate limit: 120 requests per minute

Authorizations
AuthorizationstringRequired

Authorization: Bearer

Path parameters
idstringRequired

The ID or external ID of the account to fetch email activities for.

Query parameters
start_timestring · date-timeOptional

The start time (RFC3339) of the activity time range, compared against each thread's latest email.

end_timestring · date-timeOptional

The end time (RFC3339) of the activity time range, compared against each thread's latest email.

cursorstringOptional

The cursor to use for pagination.

limitinteger · int64Optional

The number of email activities to fetch. Defaults to 20. Must be greater than 0 and less than or equal to 50.

Responses
200Success
application/json
request_idstringRequired

The request ID for tracking.

get/accounts/{id}/email-activities
GET /accounts/{id}/email-activities HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": [
    {
      "account_id": "text",
      "happened_at": "2026-01-01T00:00:00.000Z",
      "id": "text",
      "messages": [
        {
          "contact_id": "text",
          "email_info": {
            "bcc_emails": [
              "text"
            ],
            "cc_emails": [
              "text"
            ],
            "from_email": "text",
            "message_id": "text",
            "opens": [
              {
                "email": "text",
                "time": "2026-09-30T16:33:54Z"
              }
            ],
            "sender_authentication_status": "pass",
            "to_emails": [
              "text"
            ]
          },
          "id": "text",
          "issue_id": "text",
          "message_html": "text",
          "subject": "text",
          "timestamp": "2026-01-01T00:00:00.000Z",
          "user_id": "text"
        }
      ]
    }
  ],
  "pagination": {
    "cursor": "text",
    "has_next_page": true
  },
  "request_id": "text"
}

Last updated

Was this helpful?