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

Surveys

Get all surveys

get
/surveys

Returns all surveys for the organization.

Rate limit: 300 requests per minute

Authorizations
AuthorizationstringRequired

Authorization: Bearer

Responses
200Success
application/json
request_idstringRequired

The request ID for tracking.

get/surveys
GET /surveys HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": [
    {
      "id": "text",
      "name": "text",
      "type": "text",
      "updated_at": "2026-01-01T00:00:00.000Z"
    }
  ],
  "request_id": "text"
}

Get a survey by its ID

get
/surveys/{id}

Returns a single survey by ID.

Rate limit: 300 requests per minute

Authorizations
AuthorizationstringRequired

Authorization: Bearer

Path parameters
idstringRequired

The ID of the survey.

Responses
200Success
application/json
request_idstringRequired

The request ID for tracking.

get/surveys/{id}
GET /surveys/{id} HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": {
    "id": "text",
    "name": "text",
    "type": "text",
    "updated_at": "2026-01-01T00:00:00.000Z"
  },
  "request_id": "text"
}

Get survey responses for a survey

get
/surveys/{id}/responses

Returns paginated survey responses visible to the caller, optionally filtered by time range, account, or contact.

Rate limit: 300 requests per minute

Authorizations
AuthorizationstringRequired

Authorization: Bearer

Path parameters
idstringRequired

The ID of the survey.

Query parameters
submitted_afterstring · date-timeOptional

Filter responses submitted after this time (RFC3339 format).

submitted_beforestring · date-timeOptional

Filter responses submitted before this time (RFC3339 format).

account_idstringOptional

Filter responses by account ID. Required with contact_id when the caller has scoped account or contact access.

contact_idstringOptional

Filter responses by contact ID. Required with account_id when the caller has scoped account or contact access.

cursorstringOptional

The cursor for pagination.

limitinteger · int64Optional

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

Responses
200Success
application/json
request_idstringRequired

The request ID for tracking.

get/surveys/{id}/responses
GET /surveys/{id}/responses HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": [
    {
      "account_id": "text",
      "answers": [
        {
          "prompt": "text",
          "question_id": "text",
          "question_type": "text",
          "value": "text"
        }
      ],
      "contact_id": "text",
      "excluded_at": "2026-01-01T00:00:00.000Z",
      "id": "text",
      "issue_id": "text",
      "submitted_at": "2026-01-01T00:00:00.000Z",
      "survey_id": "text",
      "survey_instance_id": "text",
      "survey_type": "text"
    }
  ],
  "pagination": {
    "cursor": "text",
    "has_next_page": true
  },
  "request_id": "text"
}

Search for surveys by a given filter

post
/surveys/search

Filterable fields and their allowed operators:

Field
Allowed operators

updated_at

time_is_after, time_is_before, time_range

Timestamp values use RFC3339 format.

Rate limit: 120 requests per minute

Authorizations
AuthorizationstringRequired

Authorization: Bearer

Body
limitinteger · int64Optional

The number of surveys to fetch. Defaults to 100. Must be between 1 and 1000.

Responses
200Success
application/json
request_idstringRequired
post/surveys/search
POST /surveys/search HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 157

{
  "filter": {
    "field": "text",
    "operator": "equals",
    "subfilters": [
      {
        "field": "state",
        "operator": "equals",
        "value": "new"
      }
    ],
    "value": "text",
    "values": [
      "text"
    ]
  },
  "limit": 1
}
{
  "data": [
    {
      "id": "text",
      "name": "text",
      "type": "text",
      "updated_at": "2026-01-01T00:00:00.000Z"
    }
  ],
  "request_id": "text"
}

Get survey responses for an issue

get
/issues/{id}/survey-responses

Returns paginated CSAT and custom survey responses associated with an issue.

Rate limit: 300 requests per minute

Authorizations
AuthorizationstringRequired

Authorization: Bearer

Path parameters
idstringRequired

The ID or number of the issue.

Query parameters
survey_idstringOptional

Filter responses by survey template ID.

submitted_afterstring · date-timeOptional

Filter responses submitted after this time (RFC3339 format).

submitted_beforestring · date-timeOptional

Filter responses submitted before this time (RFC3339 format).

cursorstringOptional

The cursor for pagination.

limitinteger · int64Optional

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

Responses
200Success
application/json
issue_idstringRequired

The canonical issue ID.

request_idstringRequired

The request ID for tracking.

get/issues/{id}/survey-responses
GET /issues/{id}/survey-responses HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": [
    {
      "account_id": "text",
      "answers": [
        {
          "prompt": "text",
          "question_id": "text",
          "question_type": "text",
          "value": "text"
        }
      ],
      "contact_id": "text",
      "excluded_at": "2026-01-01T00:00:00.000Z",
      "id": "text",
      "issue_id": "text",
      "submitted_at": "2026-01-01T00:00:00.000Z",
      "survey_id": "text",
      "survey_instance_id": "text",
      "survey_type": "text"
    }
  ],
  "issue_id": "text",
  "pagination": {
    "cursor": "text",
    "has_next_page": true
  },
  "request_id": "text"
}

Last updated

Was this helpful?