> For the complete documentation index, see [llms.txt](https://docs.usepylon.com/pylon-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.usepylon.com/pylon-docs/developer/api/api-reference/issues.md).

# Issues

## Update multiple issues

> Applies the same changes to up to 100 issues. Only provided fields are modified. Issues that do not exist, or that the caller cannot update, are skipped and listed in skipped\_issues instead of failing the request.\
> \
> \*\*Rate limit:\*\* 30 requests per minute

```json
{"openapi":"3.0.3","info":{"title":"Pylon API.","version":"1.0.0"},"tags":[],"servers":[{"description":"US region","url":"https://api.usepylon.com"},{"description":"EU region","url":"https://api.eu.usepylon.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"description":"Authorization: Bearer <token>","scheme":"bearer","type":"http"}},"schemas":{"UpdateIssuesRequest":{"properties":{"assignee_id":{"description":"The ID of the user to assign the issues to. If empty string is passed in, the issues will be unassigned.","type":"string"},"custom_fields":{"description":"Custom fields to set on the issues. Only passed in fields are modified. Clearing a custom field is not supported in bulk; use PATCH /issues/{id}.","items":{"$ref":"#/components/schemas/CustomFieldValue"},"type":"array"},"customer_portal_visible":{"description":"Whether the issues should be visible in the customer portal.","type":"boolean"},"issue_ids":{"description":"The IDs of the issues to update. Must contain between 1 and 100 IDs.","items":{"type":"string"},"type":"array"},"state":{"description":"The state to move the issues to. Standard values are `new`, `waiting_on_you`, `waiting_on_customer`, `on_hold`, and `closed`; custom status slugs are also supported.","type":"string"},"tags":{"description":"Tags to apply to the issues, according to tags_apply_mode.","items":{"type":"string"},"type":"array"},"tags_apply_mode":{"default":"replace","description":"The mode for applying tags. Valid values: \"append_only\", \"remove_only\", \"replace\". Defaults to \"replace\".","enum":["append_only","remove_only","replace"],"type":"string"},"team_id":{"description":"The ID of the team to assign the issues to. If empty string is passed in, the team will be removed. Team assignment is applied asynchronously.","type":"string"}},"required":["issue_ids"],"type":"object"},"CustomFieldValue":{"description":"A custom field value to set. Custom fields not listed in a write request are left unchanged.","properties":{"slug":{"description":"The slug of the custom field.","type":"string"},"value":{"description":"The value of the custom field. Only to be used for single-valued custom fields. If unset, the custom field will be unset. If the custom field is a select field, the value must be the select option slug, which you can find from the GET /custom-fields endpoint. If the custom field is a relationship field, the value must be the related object ID.","type":"string"},"values":{"description":"The values of the custom field. Only to be used for multi-valued custom fields (ex. multiselect). Replaces the full selection; it does not add to or remove from the existing values. If unset, the custom field will be unset. If the custom field is a multiselect field, the values must be the select option slugs which you can find from the GET /custom-fields endpoint.","items":{"type":"string"},"type":"array"}},"title":"CustomFieldValue","type":"object"},"UpdateIssuesResponseBody":{"properties":{"data":{"$ref":"#/components/schemas/BulkIssueResult"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"required":["data","request_id"],"type":"object"},"BulkIssueResult":{"properties":{"skipped_issues":{"description":"The issues the operation was not applied to, with the reason for each.","items":{"$ref":"#/components/schemas/SkippedIssue"},"nullable":true,"type":"array"},"succeeded_issue_ids":{"description":"The issues the operation was applied to.","items":{"type":"string"},"nullable":true,"type":"array"}},"type":"object"},"SkippedIssue":{"properties":{"issue_id":{"description":"The issue ID as given in the request.","type":"string"},"reason":{"description":"Why the operation was not applied to this issue.\n\nKnown values: `not_found`, `forbidden`, `unsupported_source`, `failed`. This list is not exhaustive.","type":"string"}},"required":["issue_id","reason"],"type":"object"},"ErrorApiResponseBody":{"properties":{"code":{"description":"A stable machine-readable identifier for this failure, safe to branch on\ninstead of the message text. Omitted when the failure has no assigned code.\n\nKnown values: `recipients_suppressed`, `email_bounced`, `internal_issue_reply_not_allowed`, `duplicate_object`, `invalid_authorization_header`, `invalid_api_token`, `invalid_oauth_token`, `wrong_region_token`, `organization_deactivated`, `organization_suspended`, `permission_denied`, `oauth_not_permitted`, `rate_limited`, `not_found`, `method_not_allowed`, `payload_too_large`, `invalid_request_body`, `internal_error`, `invalid_webhook_credentials`, `organization_inactive`. This list is not exhaustive.","type":"string"},"errors":{"description":"The list of errors.","items":{"type":"string"},"type":"array"},"exists_id":{"description":"The ID of the object that already exists if this is a duplicate object error.","type":"string"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"required":["request_id"],"type":"object"}},"responses":{"UpdateIssuesResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateIssuesResponseBody"}}},"description":""},"BadRequestApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request was invalid or could not be completed."},"UnauthorizedApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request could not be authenticated for this API."},"ForbiddenApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The authenticated caller or organization is not allowed to access this endpoint or operation."},"TooManyRequestsApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request exceeded the applicable rate limit.","headers":{"Retry-After":{"description":"Seconds until the next request to this endpoint is permitted.","schema":{"format":"int64","type":"integer"}},"X-Retry-After":{"description":"Seconds until the full per-minute allowance is restored. Capacity returns gradually before then.","schema":{"format":"int64","type":"integer"}}}},"InternalServerErrorApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"An unexpected internal error occurred."}}},"paths":{"/issues":{"patch":{"description":"Applies the same changes to up to 100 issues. Only provided fields are modified. Issues that do not exist, or that the caller cannot update, are skipped and listed in skipped_issues instead of failing the request.\n\n**Rate limit:** 30 requests per minute","operationId":"UpdateIssues","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateIssuesRequest"}}}},"responses":{"200":{"$ref":"#/components/responses/UpdateIssuesResponse"},"400":{"$ref":"#/components/responses/BadRequestApiResponse"},"401":{"$ref":"#/components/responses/UnauthorizedApiResponse"},"403":{"$ref":"#/components/responses/ForbiddenApiResponse"},"429":{"$ref":"#/components/responses/TooManyRequestsApiResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorApiResponse"}},"summary":"Update multiple issues","tags":["issues"]}}}}
```

## Mark issues as spam

> Marks up to 100 email issues as spam. Each issue is deleted, and the sender's email address is blocked unless it belongs to your own domains or support inboxes. If an issue's account has no issues left afterwards, the account is deleted too. Issues from other sources are skipped with reason unsupported\_source. Issues that do not exist, or that the caller cannot mark as spam, are skipped and listed in skipped\_issues instead of failing the request.\
> \
> \*\*Rate limit:\*\* 30 requests per minute

```json
{"openapi":"3.0.3","info":{"title":"Pylon API.","version":"1.0.0"},"tags":[],"servers":[{"description":"US region","url":"https://api.usepylon.com"},{"description":"EU region","url":"https://api.eu.usepylon.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"description":"Authorization: Bearer <token>","scheme":"bearer","type":"http"}},"schemas":{"MarkIssuesAsSpamRequest":{"properties":{"issue_ids":{"description":"The IDs of the issues to mark as spam. Must contain between 1 and 100 IDs.","items":{"type":"string"},"type":"array"}},"required":["issue_ids"],"type":"object"},"MarkIssuesAsSpamResponseBody":{"properties":{"data":{"$ref":"#/components/schemas/BulkIssueResult"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"required":["data","request_id"],"type":"object"},"BulkIssueResult":{"properties":{"skipped_issues":{"description":"The issues the operation was not applied to, with the reason for each.","items":{"$ref":"#/components/schemas/SkippedIssue"},"nullable":true,"type":"array"},"succeeded_issue_ids":{"description":"The issues the operation was applied to.","items":{"type":"string"},"nullable":true,"type":"array"}},"type":"object"},"SkippedIssue":{"properties":{"issue_id":{"description":"The issue ID as given in the request.","type":"string"},"reason":{"description":"Why the operation was not applied to this issue.\n\nKnown values: `not_found`, `forbidden`, `unsupported_source`, `failed`. This list is not exhaustive.","type":"string"}},"required":["issue_id","reason"],"type":"object"},"ErrorApiResponseBody":{"properties":{"code":{"description":"A stable machine-readable identifier for this failure, safe to branch on\ninstead of the message text. Omitted when the failure has no assigned code.\n\nKnown values: `recipients_suppressed`, `email_bounced`, `internal_issue_reply_not_allowed`, `duplicate_object`, `invalid_authorization_header`, `invalid_api_token`, `invalid_oauth_token`, `wrong_region_token`, `organization_deactivated`, `organization_suspended`, `permission_denied`, `oauth_not_permitted`, `rate_limited`, `not_found`, `method_not_allowed`, `payload_too_large`, `invalid_request_body`, `internal_error`, `invalid_webhook_credentials`, `organization_inactive`. This list is not exhaustive.","type":"string"},"errors":{"description":"The list of errors.","items":{"type":"string"},"type":"array"},"exists_id":{"description":"The ID of the object that already exists if this is a duplicate object error.","type":"string"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"required":["request_id"],"type":"object"}},"responses":{"MarkIssuesAsSpamResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkIssuesAsSpamResponseBody"}}},"description":""},"BadRequestApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request was invalid or could not be completed."},"UnauthorizedApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request could not be authenticated for this API."},"ForbiddenApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The authenticated caller or organization is not allowed to access this endpoint or operation."},"TooManyRequestsApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request exceeded the applicable rate limit.","headers":{"Retry-After":{"description":"Seconds until the next request to this endpoint is permitted.","schema":{"format":"int64","type":"integer"}},"X-Retry-After":{"description":"Seconds until the full per-minute allowance is restored. Capacity returns gradually before then.","schema":{"format":"int64","type":"integer"}}}},"InternalServerErrorApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"An unexpected internal error occurred."}}},"paths":{"/issues/mark-spam":{"post":{"description":"Marks up to 100 email issues as spam. Each issue is deleted, and the sender's email address is blocked unless it belongs to your own domains or support inboxes. If an issue's account has no issues left afterwards, the account is deleted too. Issues from other sources are skipped with reason unsupported_source. Issues that do not exist, or that the caller cannot mark as spam, are skipped and listed in skipped_issues instead of failing the request.\n\n**Rate limit:** 30 requests per minute","operationId":"MarkIssuesAsSpam","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkIssuesAsSpamRequest"}}}},"responses":{"200":{"$ref":"#/components/responses/MarkIssuesAsSpamResponse"},"400":{"$ref":"#/components/responses/BadRequestApiResponse"},"401":{"$ref":"#/components/responses/UnauthorizedApiResponse"},"403":{"$ref":"#/components/responses/ForbiddenApiResponse"},"429":{"$ref":"#/components/responses/TooManyRequestsApiResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorApiResponse"}},"summary":"Mark issues as spam","tags":["issues"]}}}}
```

## Merge issues

> Merges one or more issues into a primary issue. All issues must belong to the same account (or, without an account, the same requester). All issues are found and validated before anything changes, so a request rejected for a missing or ineligible issue merges nothing. Closing messages are sent before the merge and are not recalled: if sending one fails, or the merge fails afterwards, duplicates processed earlier may already have received it. This cannot be undone.\
> \
> \*\*Rate limit:\*\* 30 requests per minute

```json
{"openapi":"3.0.3","info":{"title":"Pylon API.","version":"1.0.0"},"tags":[],"servers":[{"description":"US region","url":"https://api.usepylon.com"},{"description":"EU region","url":"https://api.eu.usepylon.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"description":"Authorization: Bearer <token>","scheme":"bearer","type":"http"}},"schemas":{"MergeIssuesRequest":{"properties":{"closing_message":{"description":"Optional plain-text message sent to the customer on each merged Slack or form issue before it is merged.","type":"string"},"duplicate_issue_ids":{"description":"The IDs or numbers of the issues to merge into the primary issue. Must contain between 1 and 50 issues, all in the same account as the primary issue.","items":{"type":"string"},"type":"array"},"primary_issue_id":{"description":"The ID or number of the issue to merge into. It keeps its ID and receives the messages of the merged issues.","type":"string"}},"required":["primary_issue_id","duplicate_issue_ids"],"type":"object"},"MergeIssuesResponseBody":{"properties":{"data":{"$ref":"#/components/schemas/Issue"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"required":["data","request_id"],"type":"object"},"Issue":{"properties":{"account":{"allOf":[{"$ref":"#/components/schemas/MiniAccount"}],"nullable":true},"active_time_by_user":{"description":"Active time spent on the issue broken down per user, if any.","items":{"$ref":"#/components/schemas/ActiveTimeByUser"},"type":"array"},"active_time_seconds":{"description":"The total active time spent on the issue in seconds, if any. Equals the sum of the per-user active time.","format":"int64","type":"integer"},"assignee":{"allOf":[{"$ref":"#/components/schemas/MiniUser"}],"nullable":true},"attachment_urls":{"description":"The attachment URLs attached to this issue, if any. Signed download URLs. Fetch with a plain GET, no Authorization header.","items":{"type":"string"},"type":"array"},"author_unverified":{"description":"Whether any message on the issue has an unverified author identity. True if any message author's identity has NOT been verified (e.g., from public forms).","type":"boolean"},"body_html":{"description":"The body of the issue in HTML format.","type":"string"},"business_hours_active_time_seconds":{"description":"The total business-hours active time spent on the issue in seconds, if any. Equals the sum of the per-user business-hours active time.","format":"int64","type":"integer"},"business_hours_first_response_seconds":{"description":"The business hours time in seconds it took for the first response to the issue, if any.","format":"int64","type":"integer"},"business_hours_resolution_seconds":{"description":"The business hours time in seconds it took for the issue to be resolved, if any.","format":"int64","type":"integer"},"business_hours_time_in_status_seconds":{"additionalProperties":{"format":"int64","type":"integer"},"description":"A map of status slug to the business hours time in seconds the issue has spent in that status. Includes both base statuses (e.g. \"new\", \"waiting_on_you\") and custom statuses.","type":"object"},"chat_widget_info":{"$ref":"#/components/schemas/IssueChatWidgetInfo"},"child_issues":{"description":"The child issues in this group, if this issue is an issue group.","items":{"$ref":"#/components/schemas/MiniIssue"},"type":"array"},"created_at":{"description":"The time the issue was created.","format":"date-time","type":"string"},"csat_responses":{"description":"The CSAT responses of the issue, if any.","items":{"$ref":"#/components/schemas/CSATResponse"},"type":"array"},"custom_fields":{"additionalProperties":{"$ref":"#/components/schemas/CustomFieldValue"},"description":"Custom field values associated with the issue.","nullable":true,"type":"object"},"customer_portal_visible":{"description":"Whether the issue is visible in the customer portal.","type":"boolean"},"external_incidents":{"description":"Incidents from incident.io or Rootly linked to this issue.","items":{"$ref":"#/components/schemas/ExternalIncident"},"type":"array"},"external_issues":{"description":"The external issues associated with the issue, if any.","items":{"$ref":"#/components/schemas/ExternalIssue"},"type":"array"},"first_resolution_time":{"description":"The time of the first resolution of the issue, if any. Frozen at the issue's first resolution and never updated on reopen/re-resolve.","format":"date-time","nullable":true,"type":"string"},"first_response_breach_time":{"description":"The time by which the issue's first response SLA will breach, if any. Only present for issues with an active first response SLA.","format":"date-time","type":"string"},"first_response_seconds":{"description":"The time in seconds it took for the first response to the issue, if any.","format":"int64","type":"integer"},"first_response_time":{"description":"The time of the first response to the issue, if any.","format":"date-time","nullable":true,"type":"string"},"id":{"description":"The ID of the issue.","type":"string"},"is_issue_group":{"description":"Whether this issue is an issue group.","type":"boolean"},"latest_message_time":{"description":"The time of the latest message in the issue, if any.","format":"date-time","nullable":true,"type":"string"},"link":{"description":"The link to the issue in Pylon.","type":"string"},"number":{"description":"The number of the issue.","format":"int64","type":"integer"},"number_of_touches":{"description":"The number of times the issue has been touched.","format":"int64","type":"integer"},"parent_issue_group":{"$ref":"#/components/schemas/MiniIssue"},"requester":{"allOf":[{"$ref":"#/components/schemas/MiniContact"}],"nullable":true},"resolution_breach_time":{"description":"The time by which the issue's resolution SLA will breach, if any. Only present for open issues with an active resolution SLA.","format":"date-time","type":"string"},"resolution_seconds":{"description":"The time in seconds it took for the issue to be resolved, if any.","format":"int64","type":"integer"},"resolution_time":{"description":"The time of the resolution of the issue, if any.","format":"date-time","nullable":true,"type":"string"},"slack":{"$ref":"#/components/schemas/SlackInfo"},"snoozed_until_time":{"description":"The time the issue was snoozed until in RFC3339 format, if any.","format":"date-time","type":"string"},"source":{"description":"The source of the issue.\n\nKnown values: `slack`, `microsoft_teams`, `microsoft_teams_chat`, `chat_widget`, `customer_portal`, `email`, `manual`, `form`, `discord`, `google_chat`, `whatsapp`, `sms`, `telegram`, `phone`. This list is not exhaustive.","type":"string"},"state":{"description":"The state of the issue. Standard values are `new`, `waiting_on_you`, `waiting_on_customer`, `on_hold`, and `closed`; custom status slugs are also supported.","type":"string"},"tags":{"description":"Tags associated with the issue.","items":{"type":"string"},"nullable":true,"type":"array"},"team":{"allOf":[{"$ref":"#/components/schemas/MiniTeam"}],"nullable":true},"team_slas":{"description":"The team-scoped SLAs on the issue, if any. One entry per team, mirroring the issue-level first response and resolution SLA fields.","items":{"$ref":"#/components/schemas/TeamSLA"},"type":"array"},"time_in_status_seconds":{"additionalProperties":{"format":"int64","type":"integer"},"description":"A map of status slug to the time in seconds the issue has spent in that status. Includes both base statuses (e.g. \"new\", \"waiting_on_you\") and custom statuses.","type":"object"},"title":{"description":"The title of the issue.","type":"string"},"type":{"description":"The type of the issue.\n\nKnown values: `conversation`, `ticket`. This list is not exhaustive.","type":"string"},"updated_at":{"description":"The time the issue was last updated.","format":"date-time","type":"string"},"workspace_email":{"description":"The email address connected to the Pylon workspace through which the issue's email conversation is routed. For inbound issues, this is the address that received the original email.","type":"string"}},"required":["body_html","created_at","customer_portal_visible","id","is_issue_group","link","number","number_of_touches","source","state","title","type","updated_at"],"type":"object"},"MiniAccount":{"properties":{"external_ids":{"description":"External IDs associated with the account.","items":{"$ref":"#/components/schemas/ExternalID"},"nullable":true,"type":"array"},"id":{"description":"The ID of the account.","type":"string"}},"required":["id"],"type":"object"},"ExternalID":{"properties":{"external_id":{"description":"The external ID. Must be unique per object type (ex. account).","type":"string"},"label":{"description":"The label of the external ID. Must be unique per object.","type":"string"}},"type":"object"},"ActiveTimeByUser":{"properties":{"active_time_seconds":{"description":"The user's active time on the issue in seconds.","format":"int64","type":"integer"},"business_hours_active_time_seconds":{"description":"The user's business-hours active time on the issue in seconds.","format":"int64","type":"integer"},"user_id":{"description":"The ID of the user who spent the time.","type":"string"}},"required":["active_time_seconds","business_hours_active_time_seconds","user_id"],"type":"object"},"MiniUser":{"properties":{"email":{"description":"The email of the user.","type":"string"},"id":{"description":"The ID of the user.","type":"string"}},"required":["id"],"type":"object"},"IssueChatWidgetInfo":{"properties":{"page_url":{"description":"The URL of the page that the user was on when they started the chat widget issue.","type":"string"}},"required":["page_url"],"type":"object"},"MiniIssue":{"properties":{"id":{"description":"The ID of the issue.","type":"string"},"number":{"description":"The number of the issue.","format":"int64","type":"integer"},"title":{"description":"The title of the issue.","type":"string"}},"required":["id","number","title"],"type":"object"},"CSATResponse":{"properties":{"comment":{"description":"The comment of the CSAT response.","nullable":true,"type":"string"},"score":{"description":"The score of the CSAT response.","format":"int64","type":"integer"}},"required":["score"],"type":"object"},"CustomFieldValue":{"description":"A custom field value to set. Custom fields not listed in a write request are left unchanged.","properties":{"slug":{"description":"The slug of the custom field.","type":"string"},"value":{"description":"The value of the custom field. Only to be used for single-valued custom fields. If unset, the custom field will be unset. If the custom field is a select field, the value must be the select option slug, which you can find from the GET /custom-fields endpoint. If the custom field is a relationship field, the value must be the related object ID.","type":"string"},"values":{"description":"The values of the custom field. Only to be used for multi-valued custom fields (ex. multiselect). Replaces the full selection; it does not add to or remove from the existing values. If unset, the custom field will be unset. If the custom field is a multiselect field, the values must be the select option slugs which you can find from the GET /custom-fields endpoint.","items":{"type":"string"},"type":"array"}},"title":"CustomFieldValue","type":"object"},"ExternalIncident":{"properties":{"external_id":{"description":"The incident system's own ID for the incident, when known.","type":"string"},"link":{"description":"Link to the incident, when known.","type":"string"},"reference":{"description":"The incident's reference in the incident system, such as INC-123 or ROOT-123.","type":"string"},"source":{"description":"The incident system the incident belongs to.\n\nKnown values: `incident_io`, `rootly`. This list is not exhaustive.","type":"string"}},"required":["reference","source"],"type":"object"},"ExternalIssue":{"properties":{"external_id":{"description":"The external ID of the external issue.\nJira: ID of the issue (autoincrementing number from 10000).\nGitHub: Owner/Repo/IssueID.\nLinear: ID of the issue (UUID).\nAsana: ID of the task (Long number).","type":"string"},"link":{"description":"Link to the product issue.","type":"string"},"source":{"description":"The source of the external issue.","type":"string"}},"required":["external_id","link","source"],"type":"object"},"MiniContact":{"properties":{"email":{"description":"The email of the contact.","type":"string"},"id":{"description":"The ID of the contact.","type":"string"}},"required":["id"],"type":"object"},"SlackInfo":{"properties":{"channel_id":{"description":"The Slack channel ID associated with the issue.","type":"string"},"message_ts":{"description":"The root message ID of slack message that started issue.","type":"string"},"workspace_id":{"description":"The Slack workspace ID associated with the issue.","type":"string"}},"required":["channel_id","message_ts","workspace_id"],"type":"object"},"MiniTeam":{"properties":{"id":{"description":"The ID of the team.","type":"string"}},"required":["id"],"type":"object"},"TeamSLA":{"properties":{"first_resolution":{"$ref":"#/components/schemas/SLATimes"},"first_response":{"$ref":"#/components/schemas/SLATimes"},"resolution":{"$ref":"#/components/schemas/SLATimes"},"team_id":{"description":"The ID of the team these are scoped to.","type":"string"}},"required":["team_id"],"type":"object"},"SLATimes":{"properties":{"breach_time":{"description":"The time at which it breaches (or has breached), if any.","format":"date-time","type":"string"},"business_hours_seconds":{"description":"The elapsed business-hours time in seconds, if any.","format":"int64","type":"integer"},"seconds":{"description":"The elapsed time in seconds, if any.","format":"int64","type":"integer"},"time":{"description":"The time it was reached, if any.","format":"date-time","nullable":true,"type":"string"}},"type":"object"},"ErrorApiResponseBody":{"properties":{"code":{"description":"A stable machine-readable identifier for this failure, safe to branch on\ninstead of the message text. Omitted when the failure has no assigned code.\n\nKnown values: `recipients_suppressed`, `email_bounced`, `internal_issue_reply_not_allowed`, `duplicate_object`, `invalid_authorization_header`, `invalid_api_token`, `invalid_oauth_token`, `wrong_region_token`, `organization_deactivated`, `organization_suspended`, `permission_denied`, `oauth_not_permitted`, `rate_limited`, `not_found`, `method_not_allowed`, `payload_too_large`, `invalid_request_body`, `internal_error`, `invalid_webhook_credentials`, `organization_inactive`. This list is not exhaustive.","type":"string"},"errors":{"description":"The list of errors.","items":{"type":"string"},"type":"array"},"exists_id":{"description":"The ID of the object that already exists if this is a duplicate object error.","type":"string"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"required":["request_id"],"type":"object"}},"responses":{"MergeIssuesResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeIssuesResponseBody"}}},"description":""},"BadRequestApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request was invalid or could not be completed."},"UnauthorizedApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request could not be authenticated for this API."},"ForbiddenApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The authenticated caller or organization is not allowed to access this endpoint or operation."},"ErrorApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":""},"TooManyRequestsApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request exceeded the applicable rate limit.","headers":{"Retry-After":{"description":"Seconds until the next request to this endpoint is permitted.","schema":{"format":"int64","type":"integer"}},"X-Retry-After":{"description":"Seconds until the full per-minute allowance is restored. Capacity returns gradually before then.","schema":{"format":"int64","type":"integer"}}}},"InternalServerErrorApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"An unexpected internal error occurred."}}},"paths":{"/issues/merge":{"post":{"description":"Merges one or more issues into a primary issue. All issues must belong to the same account (or, without an account, the same requester). All issues are found and validated before anything changes, so a request rejected for a missing or ineligible issue merges nothing. Closing messages are sent before the merge and are not recalled: if sending one fails, or the merge fails afterwards, duplicates processed earlier may already have received it. This cannot be undone.\n\n**Rate limit:** 30 requests per minute","operationId":"MergeIssues","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeIssuesRequest"}}}},"responses":{"200":{"$ref":"#/components/responses/MergeIssuesResponse"},"400":{"$ref":"#/components/responses/BadRequestApiResponse"},"401":{"$ref":"#/components/responses/UnauthorizedApiResponse"},"403":{"$ref":"#/components/responses/ForbiddenApiResponse"},"404":{"$ref":"#/components/responses/ErrorApiResponse"},"429":{"$ref":"#/components/responses/TooManyRequestsApiResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorApiResponse"}},"summary":"Merge issues","tags":["issues"]}}}}
```

## Get a list of issues

> Returns a paginated list of issues created within a required time range (max 365 days). Results are sorted by created\_at, newest first. To filter on updated\_at or other timestamps, use POST /issues/search.\
> \
> \*\*Rate limit:\*\* 30 requests per minute

```json
{"openapi":"3.0.3","info":{"title":"Pylon API.","version":"1.0.0"},"tags":[],"servers":[{"description":"US region","url":"https://api.usepylon.com"},{"description":"EU region","url":"https://api.eu.usepylon.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"description":"Authorization: Bearer <token>","scheme":"bearer","type":"http"}},"responses":{"GetIssuesResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetIssuesResponseBody"}}},"description":""},"BadRequestApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request was invalid or could not be completed."},"UnauthorizedApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request could not be authenticated for this API."},"ForbiddenApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The authenticated caller or organization is not allowed to access this endpoint or operation."},"ErrorApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":""},"TooManyRequestsApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request exceeded the applicable rate limit.","headers":{"Retry-After":{"description":"Seconds until the next request to this endpoint is permitted.","schema":{"format":"int64","type":"integer"}},"X-Retry-After":{"description":"Seconds until the full per-minute allowance is restored. Capacity returns gradually before then.","schema":{"format":"int64","type":"integer"}}}},"InternalServerErrorApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"An unexpected internal error occurred."}},"schemas":{"GetIssuesResponseBody":{"properties":{"data":{"description":"The data payload of the response.","items":{"$ref":"#/components/schemas/Issue"},"type":"array"},"pagination":{"$ref":"#/components/schemas/Pagination"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"required":["data","request_id"],"type":"object"},"Issue":{"properties":{"account":{"allOf":[{"$ref":"#/components/schemas/MiniAccount"}],"nullable":true},"active_time_by_user":{"description":"Active time spent on the issue broken down per user, if any.","items":{"$ref":"#/components/schemas/ActiveTimeByUser"},"type":"array"},"active_time_seconds":{"description":"The total active time spent on the issue in seconds, if any. Equals the sum of the per-user active time.","format":"int64","type":"integer"},"assignee":{"allOf":[{"$ref":"#/components/schemas/MiniUser"}],"nullable":true},"attachment_urls":{"description":"The attachment URLs attached to this issue, if any. Signed download URLs. Fetch with a plain GET, no Authorization header.","items":{"type":"string"},"type":"array"},"author_unverified":{"description":"Whether any message on the issue has an unverified author identity. True if any message author's identity has NOT been verified (e.g., from public forms).","type":"boolean"},"body_html":{"description":"The body of the issue in HTML format.","type":"string"},"business_hours_active_time_seconds":{"description":"The total business-hours active time spent on the issue in seconds, if any. Equals the sum of the per-user business-hours active time.","format":"int64","type":"integer"},"business_hours_first_response_seconds":{"description":"The business hours time in seconds it took for the first response to the issue, if any.","format":"int64","type":"integer"},"business_hours_resolution_seconds":{"description":"The business hours time in seconds it took for the issue to be resolved, if any.","format":"int64","type":"integer"},"business_hours_time_in_status_seconds":{"additionalProperties":{"format":"int64","type":"integer"},"description":"A map of status slug to the business hours time in seconds the issue has spent in that status. Includes both base statuses (e.g. \"new\", \"waiting_on_you\") and custom statuses.","type":"object"},"chat_widget_info":{"$ref":"#/components/schemas/IssueChatWidgetInfo"},"child_issues":{"description":"The child issues in this group, if this issue is an issue group.","items":{"$ref":"#/components/schemas/MiniIssue"},"type":"array"},"created_at":{"description":"The time the issue was created.","format":"date-time","type":"string"},"csat_responses":{"description":"The CSAT responses of the issue, if any.","items":{"$ref":"#/components/schemas/CSATResponse"},"type":"array"},"custom_fields":{"additionalProperties":{"$ref":"#/components/schemas/CustomFieldValue"},"description":"Custom field values associated with the issue.","nullable":true,"type":"object"},"customer_portal_visible":{"description":"Whether the issue is visible in the customer portal.","type":"boolean"},"external_incidents":{"description":"Incidents from incident.io or Rootly linked to this issue.","items":{"$ref":"#/components/schemas/ExternalIncident"},"type":"array"},"external_issues":{"description":"The external issues associated with the issue, if any.","items":{"$ref":"#/components/schemas/ExternalIssue"},"type":"array"},"first_resolution_time":{"description":"The time of the first resolution of the issue, if any. Frozen at the issue's first resolution and never updated on reopen/re-resolve.","format":"date-time","nullable":true,"type":"string"},"first_response_breach_time":{"description":"The time by which the issue's first response SLA will breach, if any. Only present for issues with an active first response SLA.","format":"date-time","type":"string"},"first_response_seconds":{"description":"The time in seconds it took for the first response to the issue, if any.","format":"int64","type":"integer"},"first_response_time":{"description":"The time of the first response to the issue, if any.","format":"date-time","nullable":true,"type":"string"},"id":{"description":"The ID of the issue.","type":"string"},"is_issue_group":{"description":"Whether this issue is an issue group.","type":"boolean"},"latest_message_time":{"description":"The time of the latest message in the issue, if any.","format":"date-time","nullable":true,"type":"string"},"link":{"description":"The link to the issue in Pylon.","type":"string"},"number":{"description":"The number of the issue.","format":"int64","type":"integer"},"number_of_touches":{"description":"The number of times the issue has been touched.","format":"int64","type":"integer"},"parent_issue_group":{"$ref":"#/components/schemas/MiniIssue"},"requester":{"allOf":[{"$ref":"#/components/schemas/MiniContact"}],"nullable":true},"resolution_breach_time":{"description":"The time by which the issue's resolution SLA will breach, if any. Only present for open issues with an active resolution SLA.","format":"date-time","type":"string"},"resolution_seconds":{"description":"The time in seconds it took for the issue to be resolved, if any.","format":"int64","type":"integer"},"resolution_time":{"description":"The time of the resolution of the issue, if any.","format":"date-time","nullable":true,"type":"string"},"slack":{"$ref":"#/components/schemas/SlackInfo"},"snoozed_until_time":{"description":"The time the issue was snoozed until in RFC3339 format, if any.","format":"date-time","type":"string"},"source":{"description":"The source of the issue.\n\nKnown values: `slack`, `microsoft_teams`, `microsoft_teams_chat`, `chat_widget`, `customer_portal`, `email`, `manual`, `form`, `discord`, `google_chat`, `whatsapp`, `sms`, `telegram`, `phone`. This list is not exhaustive.","type":"string"},"state":{"description":"The state of the issue. Standard values are `new`, `waiting_on_you`, `waiting_on_customer`, `on_hold`, and `closed`; custom status slugs are also supported.","type":"string"},"tags":{"description":"Tags associated with the issue.","items":{"type":"string"},"nullable":true,"type":"array"},"team":{"allOf":[{"$ref":"#/components/schemas/MiniTeam"}],"nullable":true},"team_slas":{"description":"The team-scoped SLAs on the issue, if any. One entry per team, mirroring the issue-level first response and resolution SLA fields.","items":{"$ref":"#/components/schemas/TeamSLA"},"type":"array"},"time_in_status_seconds":{"additionalProperties":{"format":"int64","type":"integer"},"description":"A map of status slug to the time in seconds the issue has spent in that status. Includes both base statuses (e.g. \"new\", \"waiting_on_you\") and custom statuses.","type":"object"},"title":{"description":"The title of the issue.","type":"string"},"type":{"description":"The type of the issue.\n\nKnown values: `conversation`, `ticket`. This list is not exhaustive.","type":"string"},"updated_at":{"description":"The time the issue was last updated.","format":"date-time","type":"string"},"workspace_email":{"description":"The email address connected to the Pylon workspace through which the issue's email conversation is routed. For inbound issues, this is the address that received the original email.","type":"string"}},"required":["body_html","created_at","customer_portal_visible","id","is_issue_group","link","number","number_of_touches","source","state","title","type","updated_at"],"type":"object"},"MiniAccount":{"properties":{"external_ids":{"description":"External IDs associated with the account.","items":{"$ref":"#/components/schemas/ExternalID"},"nullable":true,"type":"array"},"id":{"description":"The ID of the account.","type":"string"}},"required":["id"],"type":"object"},"ExternalID":{"properties":{"external_id":{"description":"The external ID. Must be unique per object type (ex. account).","type":"string"},"label":{"description":"The label of the external ID. Must be unique per object.","type":"string"}},"type":"object"},"ActiveTimeByUser":{"properties":{"active_time_seconds":{"description":"The user's active time on the issue in seconds.","format":"int64","type":"integer"},"business_hours_active_time_seconds":{"description":"The user's business-hours active time on the issue in seconds.","format":"int64","type":"integer"},"user_id":{"description":"The ID of the user who spent the time.","type":"string"}},"required":["active_time_seconds","business_hours_active_time_seconds","user_id"],"type":"object"},"MiniUser":{"properties":{"email":{"description":"The email of the user.","type":"string"},"id":{"description":"The ID of the user.","type":"string"}},"required":["id"],"type":"object"},"IssueChatWidgetInfo":{"properties":{"page_url":{"description":"The URL of the page that the user was on when they started the chat widget issue.","type":"string"}},"required":["page_url"],"type":"object"},"MiniIssue":{"properties":{"id":{"description":"The ID of the issue.","type":"string"},"number":{"description":"The number of the issue.","format":"int64","type":"integer"},"title":{"description":"The title of the issue.","type":"string"}},"required":["id","number","title"],"type":"object"},"CSATResponse":{"properties":{"comment":{"description":"The comment of the CSAT response.","nullable":true,"type":"string"},"score":{"description":"The score of the CSAT response.","format":"int64","type":"integer"}},"required":["score"],"type":"object"},"CustomFieldValue":{"description":"A custom field value to set. Custom fields not listed in a write request are left unchanged.","properties":{"slug":{"description":"The slug of the custom field.","type":"string"},"value":{"description":"The value of the custom field. Only to be used for single-valued custom fields. If unset, the custom field will be unset. If the custom field is a select field, the value must be the select option slug, which you can find from the GET /custom-fields endpoint. If the custom field is a relationship field, the value must be the related object ID.","type":"string"},"values":{"description":"The values of the custom field. Only to be used for multi-valued custom fields (ex. multiselect). Replaces the full selection; it does not add to or remove from the existing values. If unset, the custom field will be unset. If the custom field is a multiselect field, the values must be the select option slugs which you can find from the GET /custom-fields endpoint.","items":{"type":"string"},"type":"array"}},"title":"CustomFieldValue","type":"object"},"ExternalIncident":{"properties":{"external_id":{"description":"The incident system's own ID for the incident, when known.","type":"string"},"link":{"description":"Link to the incident, when known.","type":"string"},"reference":{"description":"The incident's reference in the incident system, such as INC-123 or ROOT-123.","type":"string"},"source":{"description":"The incident system the incident belongs to.\n\nKnown values: `incident_io`, `rootly`. This list is not exhaustive.","type":"string"}},"required":["reference","source"],"type":"object"},"ExternalIssue":{"properties":{"external_id":{"description":"The external ID of the external issue.\nJira: ID of the issue (autoincrementing number from 10000).\nGitHub: Owner/Repo/IssueID.\nLinear: ID of the issue (UUID).\nAsana: ID of the task (Long number).","type":"string"},"link":{"description":"Link to the product issue.","type":"string"},"source":{"description":"The source of the external issue.","type":"string"}},"required":["external_id","link","source"],"type":"object"},"MiniContact":{"properties":{"email":{"description":"The email of the contact.","type":"string"},"id":{"description":"The ID of the contact.","type":"string"}},"required":["id"],"type":"object"},"SlackInfo":{"properties":{"channel_id":{"description":"The Slack channel ID associated with the issue.","type":"string"},"message_ts":{"description":"The root message ID of slack message that started issue.","type":"string"},"workspace_id":{"description":"The Slack workspace ID associated with the issue.","type":"string"}},"required":["channel_id","message_ts","workspace_id"],"type":"object"},"MiniTeam":{"properties":{"id":{"description":"The ID of the team.","type":"string"}},"required":["id"],"type":"object"},"TeamSLA":{"properties":{"first_resolution":{"$ref":"#/components/schemas/SLATimes"},"first_response":{"$ref":"#/components/schemas/SLATimes"},"resolution":{"$ref":"#/components/schemas/SLATimes"},"team_id":{"description":"The ID of the team these are scoped to.","type":"string"}},"required":["team_id"],"type":"object"},"SLATimes":{"properties":{"breach_time":{"description":"The time at which it breaches (or has breached), if any.","format":"date-time","type":"string"},"business_hours_seconds":{"description":"The elapsed business-hours time in seconds, if any.","format":"int64","type":"integer"},"seconds":{"description":"The elapsed time in seconds, if any.","format":"int64","type":"integer"},"time":{"description":"The time it was reached, if any.","format":"date-time","nullable":true,"type":"string"}},"type":"object"},"Pagination":{"description":"Pagination information for list responses. Absent when there are no more results.","properties":{"cursor":{"description":"The cursor for the next page of results.","type":"string"},"has_next_page":{"description":"Indicates if there is a next page of results.","type":"boolean"}},"required":["cursor","has_next_page"],"title":"Pagination","type":"object"},"ErrorApiResponseBody":{"properties":{"code":{"description":"A stable machine-readable identifier for this failure, safe to branch on\ninstead of the message text. Omitted when the failure has no assigned code.\n\nKnown values: `recipients_suppressed`, `email_bounced`, `internal_issue_reply_not_allowed`, `duplicate_object`, `invalid_authorization_header`, `invalid_api_token`, `invalid_oauth_token`, `wrong_region_token`, `organization_deactivated`, `organization_suspended`, `permission_denied`, `oauth_not_permitted`, `rate_limited`, `not_found`, `method_not_allowed`, `payload_too_large`, `invalid_request_body`, `internal_error`, `invalid_webhook_credentials`, `organization_inactive`. This list is not exhaustive.","type":"string"},"errors":{"description":"The list of errors.","items":{"type":"string"},"type":"array"},"exists_id":{"description":"The ID of the object that already exists if this is a duplicate object error.","type":"string"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"required":["request_id"],"type":"object"}}},"paths":{"/issues":{"get":{"description":"Returns a paginated list of issues created within a required time range (max 365 days). Results are sorted by created_at, newest first. To filter on updated_at or other timestamps, use POST /issues/search.\n\n**Rate limit:** 30 requests per minute","operationId":"GetIssues","parameters":[{"description":"The start of the time range, filtering on the issue's created_at (inclusive). Use RFC3339 with Z or a URL-encoded offset (%2B). The duration between start_time and end_time must be less than or equal to 365 days.","in":"query","name":"start_time","required":true,"schema":{"format":"date-time","type":"string"}},{"description":"The end of the time range, filtering on the issue's created_at (exclusive). Use RFC3339 with Z or a URL-encoded offset (%2B). The duration between start_time and end_time must be less than or equal to 365 days.","in":"query","name":"end_time","required":true,"schema":{"format":"date-time","type":"string"}},{"description":"The cursor to use for pagination.","in":"query","name":"cursor","schema":{"type":"string"}},{"description":"The number of issues to fetch. Defaults to 20000. Set to 0 or omit to use the default. Must be between 0 and 20000.","in":"query","name":"limit","schema":{"format":"int64","type":"integer"}}],"responses":{"200":{"$ref":"#/components/responses/GetIssuesResponse"},"400":{"$ref":"#/components/responses/BadRequestApiResponse"},"401":{"$ref":"#/components/responses/UnauthorizedApiResponse"},"403":{"$ref":"#/components/responses/ForbiddenApiResponse"},"404":{"$ref":"#/components/responses/ErrorApiResponse"},"429":{"$ref":"#/components/responses/TooManyRequestsApiResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorApiResponse"}},"summary":"Get a list of issues","tags":["issues"]}}}}
```

## Link or unlink an incident to/from an issue

> Links an incident from one of the organization's connected incident systems (incident.io or Rootly). An issue can have several linked incidents, and linking one that is already linked has no effect. To unlink, set the operation field to "unlink".\
> \
> \*\*Rate limit:\*\* 120 requests per minute

```json
{"openapi":"3.0.3","info":{"title":"Pylon API.","version":"1.0.0"},"tags":[],"servers":[{"description":"US region","url":"https://api.usepylon.com"},{"description":"EU region","url":"https://api.eu.usepylon.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"description":"Authorization: Bearer <token>","scheme":"bearer","type":"http"}},"schemas":{"LinkExternalIncidentRequestBody":{"properties":{"incident_id":{"description":"The incident's reference (such as INC-123 or ROOT-123) or its ID in the incident system.","type":"string"},"operation":{"description":"Operation to perform. Use \"link\" to link the incident (default) or \"unlink\" to unlink it.","type":"string"},"source":{"description":"The incident system the incident belongs to. It must be connected to the organization.\nValid values: \"incident_io\", \"rootly\"","enum":["incident_io","rootly"],"type":"string"}},"required":["source","incident_id"],"type":"object"},"LinkExternalIncidentResponseBody":{"properties":{"data":{"$ref":"#/components/schemas/Issue"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"required":["data","request_id"],"type":"object"},"Issue":{"properties":{"account":{"allOf":[{"$ref":"#/components/schemas/MiniAccount"}],"nullable":true},"active_time_by_user":{"description":"Active time spent on the issue broken down per user, if any.","items":{"$ref":"#/components/schemas/ActiveTimeByUser"},"type":"array"},"active_time_seconds":{"description":"The total active time spent on the issue in seconds, if any. Equals the sum of the per-user active time.","format":"int64","type":"integer"},"assignee":{"allOf":[{"$ref":"#/components/schemas/MiniUser"}],"nullable":true},"attachment_urls":{"description":"The attachment URLs attached to this issue, if any. Signed download URLs. Fetch with a plain GET, no Authorization header.","items":{"type":"string"},"type":"array"},"author_unverified":{"description":"Whether any message on the issue has an unverified author identity. True if any message author's identity has NOT been verified (e.g., from public forms).","type":"boolean"},"body_html":{"description":"The body of the issue in HTML format.","type":"string"},"business_hours_active_time_seconds":{"description":"The total business-hours active time spent on the issue in seconds, if any. Equals the sum of the per-user business-hours active time.","format":"int64","type":"integer"},"business_hours_first_response_seconds":{"description":"The business hours time in seconds it took for the first response to the issue, if any.","format":"int64","type":"integer"},"business_hours_resolution_seconds":{"description":"The business hours time in seconds it took for the issue to be resolved, if any.","format":"int64","type":"integer"},"business_hours_time_in_status_seconds":{"additionalProperties":{"format":"int64","type":"integer"},"description":"A map of status slug to the business hours time in seconds the issue has spent in that status. Includes both base statuses (e.g. \"new\", \"waiting_on_you\") and custom statuses.","type":"object"},"chat_widget_info":{"$ref":"#/components/schemas/IssueChatWidgetInfo"},"child_issues":{"description":"The child issues in this group, if this issue is an issue group.","items":{"$ref":"#/components/schemas/MiniIssue"},"type":"array"},"created_at":{"description":"The time the issue was created.","format":"date-time","type":"string"},"csat_responses":{"description":"The CSAT responses of the issue, if any.","items":{"$ref":"#/components/schemas/CSATResponse"},"type":"array"},"custom_fields":{"additionalProperties":{"$ref":"#/components/schemas/CustomFieldValue"},"description":"Custom field values associated with the issue.","nullable":true,"type":"object"},"customer_portal_visible":{"description":"Whether the issue is visible in the customer portal.","type":"boolean"},"external_incidents":{"description":"Incidents from incident.io or Rootly linked to this issue.","items":{"$ref":"#/components/schemas/ExternalIncident"},"type":"array"},"external_issues":{"description":"The external issues associated with the issue, if any.","items":{"$ref":"#/components/schemas/ExternalIssue"},"type":"array"},"first_resolution_time":{"description":"The time of the first resolution of the issue, if any. Frozen at the issue's first resolution and never updated on reopen/re-resolve.","format":"date-time","nullable":true,"type":"string"},"first_response_breach_time":{"description":"The time by which the issue's first response SLA will breach, if any. Only present for issues with an active first response SLA.","format":"date-time","type":"string"},"first_response_seconds":{"description":"The time in seconds it took for the first response to the issue, if any.","format":"int64","type":"integer"},"first_response_time":{"description":"The time of the first response to the issue, if any.","format":"date-time","nullable":true,"type":"string"},"id":{"description":"The ID of the issue.","type":"string"},"is_issue_group":{"description":"Whether this issue is an issue group.","type":"boolean"},"latest_message_time":{"description":"The time of the latest message in the issue, if any.","format":"date-time","nullable":true,"type":"string"},"link":{"description":"The link to the issue in Pylon.","type":"string"},"number":{"description":"The number of the issue.","format":"int64","type":"integer"},"number_of_touches":{"description":"The number of times the issue has been touched.","format":"int64","type":"integer"},"parent_issue_group":{"$ref":"#/components/schemas/MiniIssue"},"requester":{"allOf":[{"$ref":"#/components/schemas/MiniContact"}],"nullable":true},"resolution_breach_time":{"description":"The time by which the issue's resolution SLA will breach, if any. Only present for open issues with an active resolution SLA.","format":"date-time","type":"string"},"resolution_seconds":{"description":"The time in seconds it took for the issue to be resolved, if any.","format":"int64","type":"integer"},"resolution_time":{"description":"The time of the resolution of the issue, if any.","format":"date-time","nullable":true,"type":"string"},"slack":{"$ref":"#/components/schemas/SlackInfo"},"snoozed_until_time":{"description":"The time the issue was snoozed until in RFC3339 format, if any.","format":"date-time","type":"string"},"source":{"description":"The source of the issue.\n\nKnown values: `slack`, `microsoft_teams`, `microsoft_teams_chat`, `chat_widget`, `customer_portal`, `email`, `manual`, `form`, `discord`, `google_chat`, `whatsapp`, `sms`, `telegram`, `phone`. This list is not exhaustive.","type":"string"},"state":{"description":"The state of the issue. Standard values are `new`, `waiting_on_you`, `waiting_on_customer`, `on_hold`, and `closed`; custom status slugs are also supported.","type":"string"},"tags":{"description":"Tags associated with the issue.","items":{"type":"string"},"nullable":true,"type":"array"},"team":{"allOf":[{"$ref":"#/components/schemas/MiniTeam"}],"nullable":true},"team_slas":{"description":"The team-scoped SLAs on the issue, if any. One entry per team, mirroring the issue-level first response and resolution SLA fields.","items":{"$ref":"#/components/schemas/TeamSLA"},"type":"array"},"time_in_status_seconds":{"additionalProperties":{"format":"int64","type":"integer"},"description":"A map of status slug to the time in seconds the issue has spent in that status. Includes both base statuses (e.g. \"new\", \"waiting_on_you\") and custom statuses.","type":"object"},"title":{"description":"The title of the issue.","type":"string"},"type":{"description":"The type of the issue.\n\nKnown values: `conversation`, `ticket`. This list is not exhaustive.","type":"string"},"updated_at":{"description":"The time the issue was last updated.","format":"date-time","type":"string"},"workspace_email":{"description":"The email address connected to the Pylon workspace through which the issue's email conversation is routed. For inbound issues, this is the address that received the original email.","type":"string"}},"required":["body_html","created_at","customer_portal_visible","id","is_issue_group","link","number","number_of_touches","source","state","title","type","updated_at"],"type":"object"},"MiniAccount":{"properties":{"external_ids":{"description":"External IDs associated with the account.","items":{"$ref":"#/components/schemas/ExternalID"},"nullable":true,"type":"array"},"id":{"description":"The ID of the account.","type":"string"}},"required":["id"],"type":"object"},"ExternalID":{"properties":{"external_id":{"description":"The external ID. Must be unique per object type (ex. account).","type":"string"},"label":{"description":"The label of the external ID. Must be unique per object.","type":"string"}},"type":"object"},"ActiveTimeByUser":{"properties":{"active_time_seconds":{"description":"The user's active time on the issue in seconds.","format":"int64","type":"integer"},"business_hours_active_time_seconds":{"description":"The user's business-hours active time on the issue in seconds.","format":"int64","type":"integer"},"user_id":{"description":"The ID of the user who spent the time.","type":"string"}},"required":["active_time_seconds","business_hours_active_time_seconds","user_id"],"type":"object"},"MiniUser":{"properties":{"email":{"description":"The email of the user.","type":"string"},"id":{"description":"The ID of the user.","type":"string"}},"required":["id"],"type":"object"},"IssueChatWidgetInfo":{"properties":{"page_url":{"description":"The URL of the page that the user was on when they started the chat widget issue.","type":"string"}},"required":["page_url"],"type":"object"},"MiniIssue":{"properties":{"id":{"description":"The ID of the issue.","type":"string"},"number":{"description":"The number of the issue.","format":"int64","type":"integer"},"title":{"description":"The title of the issue.","type":"string"}},"required":["id","number","title"],"type":"object"},"CSATResponse":{"properties":{"comment":{"description":"The comment of the CSAT response.","nullable":true,"type":"string"},"score":{"description":"The score of the CSAT response.","format":"int64","type":"integer"}},"required":["score"],"type":"object"},"CustomFieldValue":{"description":"A custom field value to set. Custom fields not listed in a write request are left unchanged.","properties":{"slug":{"description":"The slug of the custom field.","type":"string"},"value":{"description":"The value of the custom field. Only to be used for single-valued custom fields. If unset, the custom field will be unset. If the custom field is a select field, the value must be the select option slug, which you can find from the GET /custom-fields endpoint. If the custom field is a relationship field, the value must be the related object ID.","type":"string"},"values":{"description":"The values of the custom field. Only to be used for multi-valued custom fields (ex. multiselect). Replaces the full selection; it does not add to or remove from the existing values. If unset, the custom field will be unset. If the custom field is a multiselect field, the values must be the select option slugs which you can find from the GET /custom-fields endpoint.","items":{"type":"string"},"type":"array"}},"title":"CustomFieldValue","type":"object"},"ExternalIncident":{"properties":{"external_id":{"description":"The incident system's own ID for the incident, when known.","type":"string"},"link":{"description":"Link to the incident, when known.","type":"string"},"reference":{"description":"The incident's reference in the incident system, such as INC-123 or ROOT-123.","type":"string"},"source":{"description":"The incident system the incident belongs to.\n\nKnown values: `incident_io`, `rootly`. This list is not exhaustive.","type":"string"}},"required":["reference","source"],"type":"object"},"ExternalIssue":{"properties":{"external_id":{"description":"The external ID of the external issue.\nJira: ID of the issue (autoincrementing number from 10000).\nGitHub: Owner/Repo/IssueID.\nLinear: ID of the issue (UUID).\nAsana: ID of the task (Long number).","type":"string"},"link":{"description":"Link to the product issue.","type":"string"},"source":{"description":"The source of the external issue.","type":"string"}},"required":["external_id","link","source"],"type":"object"},"MiniContact":{"properties":{"email":{"description":"The email of the contact.","type":"string"},"id":{"description":"The ID of the contact.","type":"string"}},"required":["id"],"type":"object"},"SlackInfo":{"properties":{"channel_id":{"description":"The Slack channel ID associated with the issue.","type":"string"},"message_ts":{"description":"The root message ID of slack message that started issue.","type":"string"},"workspace_id":{"description":"The Slack workspace ID associated with the issue.","type":"string"}},"required":["channel_id","message_ts","workspace_id"],"type":"object"},"MiniTeam":{"properties":{"id":{"description":"The ID of the team.","type":"string"}},"required":["id"],"type":"object"},"TeamSLA":{"properties":{"first_resolution":{"$ref":"#/components/schemas/SLATimes"},"first_response":{"$ref":"#/components/schemas/SLATimes"},"resolution":{"$ref":"#/components/schemas/SLATimes"},"team_id":{"description":"The ID of the team these are scoped to.","type":"string"}},"required":["team_id"],"type":"object"},"SLATimes":{"properties":{"breach_time":{"description":"The time at which it breaches (or has breached), if any.","format":"date-time","type":"string"},"business_hours_seconds":{"description":"The elapsed business-hours time in seconds, if any.","format":"int64","type":"integer"},"seconds":{"description":"The elapsed time in seconds, if any.","format":"int64","type":"integer"},"time":{"description":"The time it was reached, if any.","format":"date-time","nullable":true,"type":"string"}},"type":"object"},"ErrorApiResponseBody":{"properties":{"code":{"description":"A stable machine-readable identifier for this failure, safe to branch on\ninstead of the message text. Omitted when the failure has no assigned code.\n\nKnown values: `recipients_suppressed`, `email_bounced`, `internal_issue_reply_not_allowed`, `duplicate_object`, `invalid_authorization_header`, `invalid_api_token`, `invalid_oauth_token`, `wrong_region_token`, `organization_deactivated`, `organization_suspended`, `permission_denied`, `oauth_not_permitted`, `rate_limited`, `not_found`, `method_not_allowed`, `payload_too_large`, `invalid_request_body`, `internal_error`, `invalid_webhook_credentials`, `organization_inactive`. This list is not exhaustive.","type":"string"},"errors":{"description":"The list of errors.","items":{"type":"string"},"type":"array"},"exists_id":{"description":"The ID of the object that already exists if this is a duplicate object error.","type":"string"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"required":["request_id"],"type":"object"}},"responses":{"LinkExternalIncidentResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkExternalIncidentResponseBody"}}},"description":""},"BadRequestApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request was invalid or could not be completed."},"UnauthorizedApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request could not be authenticated for this API."},"ForbiddenApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The authenticated caller or organization is not allowed to access this endpoint or operation."},"ErrorApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":""},"TooManyRequestsApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request exceeded the applicable rate limit.","headers":{"Retry-After":{"description":"Seconds until the next request to this endpoint is permitted.","schema":{"format":"int64","type":"integer"}},"X-Retry-After":{"description":"Seconds until the full per-minute allowance is restored. Capacity returns gradually before then.","schema":{"format":"int64","type":"integer"}}}},"InternalServerErrorApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"An unexpected internal error occurred."}}},"paths":{"/issues/{id}/external-incidents":{"post":{"description":"Links an incident from one of the organization's connected incident systems (incident.io or Rootly). An issue can have several linked incidents, and linking one that is already linked has no effect. To unlink, set the operation field to \"unlink\".\n\n**Rate limit:** 120 requests per minute","operationId":"LinkExternalIncident","parameters":[{"description":"The ID or number of the issue to link the incident to.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkExternalIncidentRequestBody"}}}},"responses":{"200":{"$ref":"#/components/responses/LinkExternalIncidentResponse"},"400":{"$ref":"#/components/responses/BadRequestApiResponse"},"401":{"$ref":"#/components/responses/UnauthorizedApiResponse"},"403":{"$ref":"#/components/responses/ForbiddenApiResponse"},"404":{"$ref":"#/components/responses/ErrorApiResponse"},"429":{"$ref":"#/components/responses/TooManyRequestsApiResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorApiResponse"}},"summary":"Link or unlink an incident to/from an issue","tags":["issues"]}}}}
```

## Create a new issue

> Creates a new issue and its first message. Requires either an account\_id or requester information.\
> \
> Requester fields identify the customer, user\_id or contact\_id identifies the first-message author, and destination\_metadata controls delivery. These choices are independent. If destination\_metadata is omitted, the first message is an internal note and no customer is contacted. See the request-field descriptions and examples for destination-specific requirements.\
> \
> \*\*Rate limit:\*\* 30 requests per minute

```json
{"openapi":"3.0.3","info":{"title":"Pylon API.","version":"1.0.0"},"tags":[],"servers":[{"description":"US region","url":"https://api.usepylon.com"},{"description":"EU region","url":"https://api.eu.usepylon.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"description":"Authorization: Bearer <token>","scheme":"bearer","type":"http"}},"schemas":{"CreateIssueRequest":{"properties":{"account_id":{"description":"The account that this issue belongs to. If requester_id is also provided, the requester must belong to this account. If requester_email is provided, the contact is found or created in this account.","type":"string"},"assignee_id":{"description":"The user the issue should be assigned to.","type":"string"},"attachment_urls":{"description":"URLs of files to attach to the issue's first message.","items":{"type":"string"},"type":"array"},"author_unverified":{"description":"Whether the requester's identity has NOT been verified. Defaults to false (verified).","type":"boolean"},"body_html":{"description":"The HTML content of the body of the issue.","type":"string"},"contact_id":{"description":"The contact to attribute the first message to. This controls the message author, not the issue requester. Makes the message appear as a customer message rather than an internal note. Only one of user_id or contact_id can be provided. Requires destination_metadata.","type":"string"},"created_at":{"description":"Timestamp of when the issue was created. If not specified, the current time will be used. (RFC3339)","format":"date-time","type":"string"},"custom_fields":{"description":"An array of custom fields to be used on this issue.","items":{"$ref":"#/components/schemas/CustomFieldValue"},"type":"array"},"customer_portal_visible":{"description":"Whether the issue should be visible in the customer portal. When destination is \"customer_portal\", this is set to true and cannot be false.","type":"boolean"},"destination_metadata":{"$ref":"#/components/schemas/DestinationMetadata"},"priority":{"description":"The priority of the issue. Can be one of: urgent, high, medium, or low.","enum":["urgent","high","medium","low"],"type":"string"},"requester_avatar_url":{"description":"The URL of an avatar of the requester.","type":"string"},"requester_email":{"description":"The email of the customer this issue is for. Used when requester_id is omitted. If no matching contact exists, one will be created. When account_id is provided, the contact is found or created in that account. This does not control who authored the first message.","type":"string"},"requester_id":{"description":"The customer this issue is for. Sets the \"Requester\" shown in the issue sidebar but does not control who authored the first message. If account_id is omitted, the requester's primary account is used when available. If requester_email is also provided, requester_id takes precedence.","type":"string"},"requester_name":{"description":"The optional full name of the requester. Used when creating a new contact via requester_email.","type":"string"},"requester_phone_number":{"description":"The phone number of a new requester. Only supported for direct WhatsApp delivery and cannot be combined with requester_id, requester_email, requester_name, or requester_avatar_url. The number is normalized to E.164 format and used to create a phone-only contact in the same transaction as the issue.","type":"string"},"tags":{"description":"An array of strings to use as tags on this issue. If provided, the issue tags will be updated to the given tags.","items":{"type":"string"},"type":"array"},"team_id":{"description":"The ID of the team this issue should be assigned to.","type":"string"},"title":{"description":"The title of the issue.","type":"string"},"user_id":{"description":"The internal Pylon user to attribute the first message to. This does not assign the user as the requester. Only one of user_id or contact_id can be provided. If neither is set, the API token's user is used.","type":"string"}},"required":["title","body_html"],"type":"object"},"CustomFieldValue":{"description":"A custom field value to set. Custom fields not listed in a write request are left unchanged.","properties":{"slug":{"description":"The slug of the custom field.","type":"string"},"value":{"description":"The value of the custom field. Only to be used for single-valued custom fields. If unset, the custom field will be unset. If the custom field is a select field, the value must be the select option slug, which you can find from the GET /custom-fields endpoint. If the custom field is a relationship field, the value must be the related object ID.","type":"string"},"values":{"description":"The values of the custom field. Only to be used for multi-valued custom fields (ex. multiselect). Replaces the full selection; it does not add to or remove from the existing values. If unset, the custom field will be unset. If the custom field is a multiselect field, the values must be the select option slugs which you can find from the GET /custom-fields endpoint.","items":{"type":"string"},"type":"array"}},"title":"CustomFieldValue","type":"object"},"DestinationMetadata":{"description":"Specifies if/how communication will be delivered to the customer.\nYou can configure the issue to contact the requester via email, Slack, in-app chat, SMS, WhatsApp, make it available only in the customer portal, or keep it internal.\nIf an external destination is specified, a message with the issue's BodyHTML will be delivered to the requester. The `customer_portal` destination requires Customer Portal to be enabled and creates a customer-visible message without external delivery.\nTo avoid contacting the requester, omit destination_metadata from the create-issue request or specify the `internal` destination.\nIf destination_metadata is provided, destination is required.","properties":{"chat_widget_app_id":{"description":"The ID of the chat widget app to use for in-app chat.","type":"string"},"destination":{"description":"The destination type of the issue. Can be \"email\", \"slack\", \"in_app_chat\", \"customer_portal\", \"sms\", \"whatsapp\", or \"internal\". Required when destination_metadata is provided. Use \"customer_portal\" for a customer-visible issue with no external delivery; Customer Portal must be enabled for the organization. To create an internal issue, omit destination_metadata or set this field to \"internal\".","enum":["slack","email","in_app_chat","customer_portal","internal","sms","whatsapp"],"type":"string"},"email":{"description":"The email that emails to the requester will be sent from. You must configure an email app in Pylon with this address.","type":"string"},"email_bccs":{"description":"Emails that will be BCCed on emails to the requester.","items":{"type":"string"},"type":"array"},"email_ccs":{"description":"Emails that will be CCed on emails to the requester.","items":{"type":"string"},"type":"array"},"from_sms_phone_number":{"description":"The Pylon phone number to send SMS from, in E.164 format. Required if destination is \"sms\" unless from_sms_phone_number_id is provided.","type":"string"},"from_sms_phone_number_id":{"description":"The ID of the Pylon phone number to send SMS from. Required if destination is \"sms\" unless from_sms_phone_number is provided. Deprecated: Use from_sms_phone_number instead.","type":"string"},"from_whatsapp_phone_number":{"description":"The configured WhatsApp phone number to send messages from. Required if destination is \"whatsapp\" unless whatsapp_app_id is provided. The number is normalized and used to resolve the WhatsApp app within the organization.","type":"string"},"whatsapp_app_id":{"description":"The ID of the WhatsApp app to send messages from. Required if destination is \"whatsapp\" unless from_whatsapp_phone_number is provided. Deprecated: Use from_whatsapp_phone_number instead.","type":"string"},"whatsapp_message_template_language":{"description":"The language of the WhatsApp message template to use. Required if destination is \"whatsapp\".","type":"string"},"whatsapp_message_template_name":{"description":"The name of the WhatsApp message template to use. Required if destination is \"whatsapp\".","type":"string"}},"required":["destination"],"title":"DestinationMetadata","type":"object"},"CreateIssueResponseBody":{"properties":{"data":{"$ref":"#/components/schemas/Issue"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"required":["data","request_id"],"type":"object"},"Issue":{"properties":{"account":{"allOf":[{"$ref":"#/components/schemas/MiniAccount"}],"nullable":true},"active_time_by_user":{"description":"Active time spent on the issue broken down per user, if any.","items":{"$ref":"#/components/schemas/ActiveTimeByUser"},"type":"array"},"active_time_seconds":{"description":"The total active time spent on the issue in seconds, if any. Equals the sum of the per-user active time.","format":"int64","type":"integer"},"assignee":{"allOf":[{"$ref":"#/components/schemas/MiniUser"}],"nullable":true},"attachment_urls":{"description":"The attachment URLs attached to this issue, if any. Signed download URLs. Fetch with a plain GET, no Authorization header.","items":{"type":"string"},"type":"array"},"author_unverified":{"description":"Whether any message on the issue has an unverified author identity. True if any message author's identity has NOT been verified (e.g., from public forms).","type":"boolean"},"body_html":{"description":"The body of the issue in HTML format.","type":"string"},"business_hours_active_time_seconds":{"description":"The total business-hours active time spent on the issue in seconds, if any. Equals the sum of the per-user business-hours active time.","format":"int64","type":"integer"},"business_hours_first_response_seconds":{"description":"The business hours time in seconds it took for the first response to the issue, if any.","format":"int64","type":"integer"},"business_hours_resolution_seconds":{"description":"The business hours time in seconds it took for the issue to be resolved, if any.","format":"int64","type":"integer"},"business_hours_time_in_status_seconds":{"additionalProperties":{"format":"int64","type":"integer"},"description":"A map of status slug to the business hours time in seconds the issue has spent in that status. Includes both base statuses (e.g. \"new\", \"waiting_on_you\") and custom statuses.","type":"object"},"chat_widget_info":{"$ref":"#/components/schemas/IssueChatWidgetInfo"},"child_issues":{"description":"The child issues in this group, if this issue is an issue group.","items":{"$ref":"#/components/schemas/MiniIssue"},"type":"array"},"created_at":{"description":"The time the issue was created.","format":"date-time","type":"string"},"csat_responses":{"description":"The CSAT responses of the issue, if any.","items":{"$ref":"#/components/schemas/CSATResponse"},"type":"array"},"custom_fields":{"additionalProperties":{"$ref":"#/components/schemas/CustomFieldValue"},"description":"Custom field values associated with the issue.","nullable":true,"type":"object"},"customer_portal_visible":{"description":"Whether the issue is visible in the customer portal.","type":"boolean"},"external_incidents":{"description":"Incidents from incident.io or Rootly linked to this issue.","items":{"$ref":"#/components/schemas/ExternalIncident"},"type":"array"},"external_issues":{"description":"The external issues associated with the issue, if any.","items":{"$ref":"#/components/schemas/ExternalIssue"},"type":"array"},"first_resolution_time":{"description":"The time of the first resolution of the issue, if any. Frozen at the issue's first resolution and never updated on reopen/re-resolve.","format":"date-time","nullable":true,"type":"string"},"first_response_breach_time":{"description":"The time by which the issue's first response SLA will breach, if any. Only present for issues with an active first response SLA.","format":"date-time","type":"string"},"first_response_seconds":{"description":"The time in seconds it took for the first response to the issue, if any.","format":"int64","type":"integer"},"first_response_time":{"description":"The time of the first response to the issue, if any.","format":"date-time","nullable":true,"type":"string"},"id":{"description":"The ID of the issue.","type":"string"},"is_issue_group":{"description":"Whether this issue is an issue group.","type":"boolean"},"latest_message_time":{"description":"The time of the latest message in the issue, if any.","format":"date-time","nullable":true,"type":"string"},"link":{"description":"The link to the issue in Pylon.","type":"string"},"number":{"description":"The number of the issue.","format":"int64","type":"integer"},"number_of_touches":{"description":"The number of times the issue has been touched.","format":"int64","type":"integer"},"parent_issue_group":{"$ref":"#/components/schemas/MiniIssue"},"requester":{"allOf":[{"$ref":"#/components/schemas/MiniContact"}],"nullable":true},"resolution_breach_time":{"description":"The time by which the issue's resolution SLA will breach, if any. Only present for open issues with an active resolution SLA.","format":"date-time","type":"string"},"resolution_seconds":{"description":"The time in seconds it took for the issue to be resolved, if any.","format":"int64","type":"integer"},"resolution_time":{"description":"The time of the resolution of the issue, if any.","format":"date-time","nullable":true,"type":"string"},"slack":{"$ref":"#/components/schemas/SlackInfo"},"snoozed_until_time":{"description":"The time the issue was snoozed until in RFC3339 format, if any.","format":"date-time","type":"string"},"source":{"description":"The source of the issue.\n\nKnown values: `slack`, `microsoft_teams`, `microsoft_teams_chat`, `chat_widget`, `customer_portal`, `email`, `manual`, `form`, `discord`, `google_chat`, `whatsapp`, `sms`, `telegram`, `phone`. This list is not exhaustive.","type":"string"},"state":{"description":"The state of the issue. Standard values are `new`, `waiting_on_you`, `waiting_on_customer`, `on_hold`, and `closed`; custom status slugs are also supported.","type":"string"},"tags":{"description":"Tags associated with the issue.","items":{"type":"string"},"nullable":true,"type":"array"},"team":{"allOf":[{"$ref":"#/components/schemas/MiniTeam"}],"nullable":true},"team_slas":{"description":"The team-scoped SLAs on the issue, if any. One entry per team, mirroring the issue-level first response and resolution SLA fields.","items":{"$ref":"#/components/schemas/TeamSLA"},"type":"array"},"time_in_status_seconds":{"additionalProperties":{"format":"int64","type":"integer"},"description":"A map of status slug to the time in seconds the issue has spent in that status. Includes both base statuses (e.g. \"new\", \"waiting_on_you\") and custom statuses.","type":"object"},"title":{"description":"The title of the issue.","type":"string"},"type":{"description":"The type of the issue.\n\nKnown values: `conversation`, `ticket`. This list is not exhaustive.","type":"string"},"updated_at":{"description":"The time the issue was last updated.","format":"date-time","type":"string"},"workspace_email":{"description":"The email address connected to the Pylon workspace through which the issue's email conversation is routed. For inbound issues, this is the address that received the original email.","type":"string"}},"required":["body_html","created_at","customer_portal_visible","id","is_issue_group","link","number","number_of_touches","source","state","title","type","updated_at"],"type":"object"},"MiniAccount":{"properties":{"external_ids":{"description":"External IDs associated with the account.","items":{"$ref":"#/components/schemas/ExternalID"},"nullable":true,"type":"array"},"id":{"description":"The ID of the account.","type":"string"}},"required":["id"],"type":"object"},"ExternalID":{"properties":{"external_id":{"description":"The external ID. Must be unique per object type (ex. account).","type":"string"},"label":{"description":"The label of the external ID. Must be unique per object.","type":"string"}},"type":"object"},"ActiveTimeByUser":{"properties":{"active_time_seconds":{"description":"The user's active time on the issue in seconds.","format":"int64","type":"integer"},"business_hours_active_time_seconds":{"description":"The user's business-hours active time on the issue in seconds.","format":"int64","type":"integer"},"user_id":{"description":"The ID of the user who spent the time.","type":"string"}},"required":["active_time_seconds","business_hours_active_time_seconds","user_id"],"type":"object"},"MiniUser":{"properties":{"email":{"description":"The email of the user.","type":"string"},"id":{"description":"The ID of the user.","type":"string"}},"required":["id"],"type":"object"},"IssueChatWidgetInfo":{"properties":{"page_url":{"description":"The URL of the page that the user was on when they started the chat widget issue.","type":"string"}},"required":["page_url"],"type":"object"},"MiniIssue":{"properties":{"id":{"description":"The ID of the issue.","type":"string"},"number":{"description":"The number of the issue.","format":"int64","type":"integer"},"title":{"description":"The title of the issue.","type":"string"}},"required":["id","number","title"],"type":"object"},"CSATResponse":{"properties":{"comment":{"description":"The comment of the CSAT response.","nullable":true,"type":"string"},"score":{"description":"The score of the CSAT response.","format":"int64","type":"integer"}},"required":["score"],"type":"object"},"ExternalIncident":{"properties":{"external_id":{"description":"The incident system's own ID for the incident, when known.","type":"string"},"link":{"description":"Link to the incident, when known.","type":"string"},"reference":{"description":"The incident's reference in the incident system, such as INC-123 or ROOT-123.","type":"string"},"source":{"description":"The incident system the incident belongs to.\n\nKnown values: `incident_io`, `rootly`. This list is not exhaustive.","type":"string"}},"required":["reference","source"],"type":"object"},"ExternalIssue":{"properties":{"external_id":{"description":"The external ID of the external issue.\nJira: ID of the issue (autoincrementing number from 10000).\nGitHub: Owner/Repo/IssueID.\nLinear: ID of the issue (UUID).\nAsana: ID of the task (Long number).","type":"string"},"link":{"description":"Link to the product issue.","type":"string"},"source":{"description":"The source of the external issue.","type":"string"}},"required":["external_id","link","source"],"type":"object"},"MiniContact":{"properties":{"email":{"description":"The email of the contact.","type":"string"},"id":{"description":"The ID of the contact.","type":"string"}},"required":["id"],"type":"object"},"SlackInfo":{"properties":{"channel_id":{"description":"The Slack channel ID associated with the issue.","type":"string"},"message_ts":{"description":"The root message ID of slack message that started issue.","type":"string"},"workspace_id":{"description":"The Slack workspace ID associated with the issue.","type":"string"}},"required":["channel_id","message_ts","workspace_id"],"type":"object"},"MiniTeam":{"properties":{"id":{"description":"The ID of the team.","type":"string"}},"required":["id"],"type":"object"},"TeamSLA":{"properties":{"first_resolution":{"$ref":"#/components/schemas/SLATimes"},"first_response":{"$ref":"#/components/schemas/SLATimes"},"resolution":{"$ref":"#/components/schemas/SLATimes"},"team_id":{"description":"The ID of the team these are scoped to.","type":"string"}},"required":["team_id"],"type":"object"},"SLATimes":{"properties":{"breach_time":{"description":"The time at which it breaches (or has breached), if any.","format":"date-time","type":"string"},"business_hours_seconds":{"description":"The elapsed business-hours time in seconds, if any.","format":"int64","type":"integer"},"seconds":{"description":"The elapsed time in seconds, if any.","format":"int64","type":"integer"},"time":{"description":"The time it was reached, if any.","format":"date-time","nullable":true,"type":"string"}},"type":"object"},"ErrorApiResponseBody":{"properties":{"code":{"description":"A stable machine-readable identifier for this failure, safe to branch on\ninstead of the message text. Omitted when the failure has no assigned code.\n\nKnown values: `recipients_suppressed`, `email_bounced`, `internal_issue_reply_not_allowed`, `duplicate_object`, `invalid_authorization_header`, `invalid_api_token`, `invalid_oauth_token`, `wrong_region_token`, `organization_deactivated`, `organization_suspended`, `permission_denied`, `oauth_not_permitted`, `rate_limited`, `not_found`, `method_not_allowed`, `payload_too_large`, `invalid_request_body`, `internal_error`, `invalid_webhook_credentials`, `organization_inactive`. This list is not exhaustive.","type":"string"},"errors":{"description":"The list of errors.","items":{"type":"string"},"type":"array"},"exists_id":{"description":"The ID of the object that already exists if this is a duplicate object error.","type":"string"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"required":["request_id"],"type":"object"}},"responses":{"CreateIssueResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateIssueResponseBody"}}},"description":""},"BadRequestApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request was invalid or could not be completed."},"UnauthorizedApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request could not be authenticated for this API."},"ForbiddenApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The authenticated caller or organization is not allowed to access this endpoint or operation."},"ErrorApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":""},"TooManyRequestsApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request exceeded the applicable rate limit.","headers":{"Retry-After":{"description":"Seconds until the next request to this endpoint is permitted.","schema":{"format":"int64","type":"integer"}},"X-Retry-After":{"description":"Seconds until the full per-minute allowance is restored. Capacity returns gradually before then.","schema":{"format":"int64","type":"integer"}}}},"InternalServerErrorApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"An unexpected internal error occurred."}}},"paths":{"/issues":{"post":{"description":"Creates a new issue and its first message. Requires either an account_id or requester information.\n\nRequester fields identify the customer, user_id or contact_id identifies the first-message author, and destination_metadata controls delivery. These choices are independent. If destination_metadata is omitted, the first message is an internal note and no customer is contacted. See the request-field descriptions and examples for destination-specific requirements.\n\n**Rate limit:** 30 requests per minute","operationId":"CreateIssue","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateIssueRequest"}}}},"responses":{"200":{"$ref":"#/components/responses/CreateIssueResponse"},"400":{"$ref":"#/components/responses/BadRequestApiResponse"},"401":{"$ref":"#/components/responses/UnauthorizedApiResponse"},"403":{"$ref":"#/components/responses/ForbiddenApiResponse"},"404":{"$ref":"#/components/responses/ErrorApiResponse"},"429":{"$ref":"#/components/responses/TooManyRequestsApiResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorApiResponse"}},"summary":"Create a new issue","tags":["issues"]}}}}
```

## Create an issue group

> Creates an issue group and attaches its initial child issues atomically.\
> \
> \*\*Rate limit:\*\* 30 requests per minute

```json
{"openapi":"3.0.3","info":{"title":"Pylon API.","version":"1.0.0"},"tags":[],"servers":[{"description":"US region","url":"https://api.usepylon.com"},{"description":"EU region","url":"https://api.eu.usepylon.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"description":"Authorization: Bearer <token>","scheme":"bearer","type":"http"}},"schemas":{"CreateIssueGroupRequestBody":{"properties":{"child_issue_ids":{"description":"The IDs of the issues to include in the group. At least one is required.","items":{"type":"string"},"type":"array"},"title":{"description":"The title of the issue group.","type":"string"}},"required":["title","child_issue_ids"],"type":"object"},"CreateIssueGroupResponseBody":{"properties":{"data":{"$ref":"#/components/schemas/Issue"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"required":["data","request_id"],"type":"object"},"Issue":{"properties":{"account":{"allOf":[{"$ref":"#/components/schemas/MiniAccount"}],"nullable":true},"active_time_by_user":{"description":"Active time spent on the issue broken down per user, if any.","items":{"$ref":"#/components/schemas/ActiveTimeByUser"},"type":"array"},"active_time_seconds":{"description":"The total active time spent on the issue in seconds, if any. Equals the sum of the per-user active time.","format":"int64","type":"integer"},"assignee":{"allOf":[{"$ref":"#/components/schemas/MiniUser"}],"nullable":true},"attachment_urls":{"description":"The attachment URLs attached to this issue, if any. Signed download URLs. Fetch with a plain GET, no Authorization header.","items":{"type":"string"},"type":"array"},"author_unverified":{"description":"Whether any message on the issue has an unverified author identity. True if any message author's identity has NOT been verified (e.g., from public forms).","type":"boolean"},"body_html":{"description":"The body of the issue in HTML format.","type":"string"},"business_hours_active_time_seconds":{"description":"The total business-hours active time spent on the issue in seconds, if any. Equals the sum of the per-user business-hours active time.","format":"int64","type":"integer"},"business_hours_first_response_seconds":{"description":"The business hours time in seconds it took for the first response to the issue, if any.","format":"int64","type":"integer"},"business_hours_resolution_seconds":{"description":"The business hours time in seconds it took for the issue to be resolved, if any.","format":"int64","type":"integer"},"business_hours_time_in_status_seconds":{"additionalProperties":{"format":"int64","type":"integer"},"description":"A map of status slug to the business hours time in seconds the issue has spent in that status. Includes both base statuses (e.g. \"new\", \"waiting_on_you\") and custom statuses.","type":"object"},"chat_widget_info":{"$ref":"#/components/schemas/IssueChatWidgetInfo"},"child_issues":{"description":"The child issues in this group, if this issue is an issue group.","items":{"$ref":"#/components/schemas/MiniIssue"},"type":"array"},"created_at":{"description":"The time the issue was created.","format":"date-time","type":"string"},"csat_responses":{"description":"The CSAT responses of the issue, if any.","items":{"$ref":"#/components/schemas/CSATResponse"},"type":"array"},"custom_fields":{"additionalProperties":{"$ref":"#/components/schemas/CustomFieldValue"},"description":"Custom field values associated with the issue.","nullable":true,"type":"object"},"customer_portal_visible":{"description":"Whether the issue is visible in the customer portal.","type":"boolean"},"external_incidents":{"description":"Incidents from incident.io or Rootly linked to this issue.","items":{"$ref":"#/components/schemas/ExternalIncident"},"type":"array"},"external_issues":{"description":"The external issues associated with the issue, if any.","items":{"$ref":"#/components/schemas/ExternalIssue"},"type":"array"},"first_resolution_time":{"description":"The time of the first resolution of the issue, if any. Frozen at the issue's first resolution and never updated on reopen/re-resolve.","format":"date-time","nullable":true,"type":"string"},"first_response_breach_time":{"description":"The time by which the issue's first response SLA will breach, if any. Only present for issues with an active first response SLA.","format":"date-time","type":"string"},"first_response_seconds":{"description":"The time in seconds it took for the first response to the issue, if any.","format":"int64","type":"integer"},"first_response_time":{"description":"The time of the first response to the issue, if any.","format":"date-time","nullable":true,"type":"string"},"id":{"description":"The ID of the issue.","type":"string"},"is_issue_group":{"description":"Whether this issue is an issue group.","type":"boolean"},"latest_message_time":{"description":"The time of the latest message in the issue, if any.","format":"date-time","nullable":true,"type":"string"},"link":{"description":"The link to the issue in Pylon.","type":"string"},"number":{"description":"The number of the issue.","format":"int64","type":"integer"},"number_of_touches":{"description":"The number of times the issue has been touched.","format":"int64","type":"integer"},"parent_issue_group":{"$ref":"#/components/schemas/MiniIssue"},"requester":{"allOf":[{"$ref":"#/components/schemas/MiniContact"}],"nullable":true},"resolution_breach_time":{"description":"The time by which the issue's resolution SLA will breach, if any. Only present for open issues with an active resolution SLA.","format":"date-time","type":"string"},"resolution_seconds":{"description":"The time in seconds it took for the issue to be resolved, if any.","format":"int64","type":"integer"},"resolution_time":{"description":"The time of the resolution of the issue, if any.","format":"date-time","nullable":true,"type":"string"},"slack":{"$ref":"#/components/schemas/SlackInfo"},"snoozed_until_time":{"description":"The time the issue was snoozed until in RFC3339 format, if any.","format":"date-time","type":"string"},"source":{"description":"The source of the issue.\n\nKnown values: `slack`, `microsoft_teams`, `microsoft_teams_chat`, `chat_widget`, `customer_portal`, `email`, `manual`, `form`, `discord`, `google_chat`, `whatsapp`, `sms`, `telegram`, `phone`. This list is not exhaustive.","type":"string"},"state":{"description":"The state of the issue. Standard values are `new`, `waiting_on_you`, `waiting_on_customer`, `on_hold`, and `closed`; custom status slugs are also supported.","type":"string"},"tags":{"description":"Tags associated with the issue.","items":{"type":"string"},"nullable":true,"type":"array"},"team":{"allOf":[{"$ref":"#/components/schemas/MiniTeam"}],"nullable":true},"team_slas":{"description":"The team-scoped SLAs on the issue, if any. One entry per team, mirroring the issue-level first response and resolution SLA fields.","items":{"$ref":"#/components/schemas/TeamSLA"},"type":"array"},"time_in_status_seconds":{"additionalProperties":{"format":"int64","type":"integer"},"description":"A map of status slug to the time in seconds the issue has spent in that status. Includes both base statuses (e.g. \"new\", \"waiting_on_you\") and custom statuses.","type":"object"},"title":{"description":"The title of the issue.","type":"string"},"type":{"description":"The type of the issue.\n\nKnown values: `conversation`, `ticket`. This list is not exhaustive.","type":"string"},"updated_at":{"description":"The time the issue was last updated.","format":"date-time","type":"string"},"workspace_email":{"description":"The email address connected to the Pylon workspace through which the issue's email conversation is routed. For inbound issues, this is the address that received the original email.","type":"string"}},"required":["body_html","created_at","customer_portal_visible","id","is_issue_group","link","number","number_of_touches","source","state","title","type","updated_at"],"type":"object"},"MiniAccount":{"properties":{"external_ids":{"description":"External IDs associated with the account.","items":{"$ref":"#/components/schemas/ExternalID"},"nullable":true,"type":"array"},"id":{"description":"The ID of the account.","type":"string"}},"required":["id"],"type":"object"},"ExternalID":{"properties":{"external_id":{"description":"The external ID. Must be unique per object type (ex. account).","type":"string"},"label":{"description":"The label of the external ID. Must be unique per object.","type":"string"}},"type":"object"},"ActiveTimeByUser":{"properties":{"active_time_seconds":{"description":"The user's active time on the issue in seconds.","format":"int64","type":"integer"},"business_hours_active_time_seconds":{"description":"The user's business-hours active time on the issue in seconds.","format":"int64","type":"integer"},"user_id":{"description":"The ID of the user who spent the time.","type":"string"}},"required":["active_time_seconds","business_hours_active_time_seconds","user_id"],"type":"object"},"MiniUser":{"properties":{"email":{"description":"The email of the user.","type":"string"},"id":{"description":"The ID of the user.","type":"string"}},"required":["id"],"type":"object"},"IssueChatWidgetInfo":{"properties":{"page_url":{"description":"The URL of the page that the user was on when they started the chat widget issue.","type":"string"}},"required":["page_url"],"type":"object"},"MiniIssue":{"properties":{"id":{"description":"The ID of the issue.","type":"string"},"number":{"description":"The number of the issue.","format":"int64","type":"integer"},"title":{"description":"The title of the issue.","type":"string"}},"required":["id","number","title"],"type":"object"},"CSATResponse":{"properties":{"comment":{"description":"The comment of the CSAT response.","nullable":true,"type":"string"},"score":{"description":"The score of the CSAT response.","format":"int64","type":"integer"}},"required":["score"],"type":"object"},"CustomFieldValue":{"description":"A custom field value to set. Custom fields not listed in a write request are left unchanged.","properties":{"slug":{"description":"The slug of the custom field.","type":"string"},"value":{"description":"The value of the custom field. Only to be used for single-valued custom fields. If unset, the custom field will be unset. If the custom field is a select field, the value must be the select option slug, which you can find from the GET /custom-fields endpoint. If the custom field is a relationship field, the value must be the related object ID.","type":"string"},"values":{"description":"The values of the custom field. Only to be used for multi-valued custom fields (ex. multiselect). Replaces the full selection; it does not add to or remove from the existing values. If unset, the custom field will be unset. If the custom field is a multiselect field, the values must be the select option slugs which you can find from the GET /custom-fields endpoint.","items":{"type":"string"},"type":"array"}},"title":"CustomFieldValue","type":"object"},"ExternalIncident":{"properties":{"external_id":{"description":"The incident system's own ID for the incident, when known.","type":"string"},"link":{"description":"Link to the incident, when known.","type":"string"},"reference":{"description":"The incident's reference in the incident system, such as INC-123 or ROOT-123.","type":"string"},"source":{"description":"The incident system the incident belongs to.\n\nKnown values: `incident_io`, `rootly`. This list is not exhaustive.","type":"string"}},"required":["reference","source"],"type":"object"},"ExternalIssue":{"properties":{"external_id":{"description":"The external ID of the external issue.\nJira: ID of the issue (autoincrementing number from 10000).\nGitHub: Owner/Repo/IssueID.\nLinear: ID of the issue (UUID).\nAsana: ID of the task (Long number).","type":"string"},"link":{"description":"Link to the product issue.","type":"string"},"source":{"description":"The source of the external issue.","type":"string"}},"required":["external_id","link","source"],"type":"object"},"MiniContact":{"properties":{"email":{"description":"The email of the contact.","type":"string"},"id":{"description":"The ID of the contact.","type":"string"}},"required":["id"],"type":"object"},"SlackInfo":{"properties":{"channel_id":{"description":"The Slack channel ID associated with the issue.","type":"string"},"message_ts":{"description":"The root message ID of slack message that started issue.","type":"string"},"workspace_id":{"description":"The Slack workspace ID associated with the issue.","type":"string"}},"required":["channel_id","message_ts","workspace_id"],"type":"object"},"MiniTeam":{"properties":{"id":{"description":"The ID of the team.","type":"string"}},"required":["id"],"type":"object"},"TeamSLA":{"properties":{"first_resolution":{"$ref":"#/components/schemas/SLATimes"},"first_response":{"$ref":"#/components/schemas/SLATimes"},"resolution":{"$ref":"#/components/schemas/SLATimes"},"team_id":{"description":"The ID of the team these are scoped to.","type":"string"}},"required":["team_id"],"type":"object"},"SLATimes":{"properties":{"breach_time":{"description":"The time at which it breaches (or has breached), if any.","format":"date-time","type":"string"},"business_hours_seconds":{"description":"The elapsed business-hours time in seconds, if any.","format":"int64","type":"integer"},"seconds":{"description":"The elapsed time in seconds, if any.","format":"int64","type":"integer"},"time":{"description":"The time it was reached, if any.","format":"date-time","nullable":true,"type":"string"}},"type":"object"},"ErrorApiResponseBody":{"properties":{"code":{"description":"A stable machine-readable identifier for this failure, safe to branch on\ninstead of the message text. Omitted when the failure has no assigned code.\n\nKnown values: `recipients_suppressed`, `email_bounced`, `internal_issue_reply_not_allowed`, `duplicate_object`, `invalid_authorization_header`, `invalid_api_token`, `invalid_oauth_token`, `wrong_region_token`, `organization_deactivated`, `organization_suspended`, `permission_denied`, `oauth_not_permitted`, `rate_limited`, `not_found`, `method_not_allowed`, `payload_too_large`, `invalid_request_body`, `internal_error`, `invalid_webhook_credentials`, `organization_inactive`. This list is not exhaustive.","type":"string"},"errors":{"description":"The list of errors.","items":{"type":"string"},"type":"array"},"exists_id":{"description":"The ID of the object that already exists if this is a duplicate object error.","type":"string"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"required":["request_id"],"type":"object"}},"responses":{"CreateIssueGroupResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateIssueGroupResponseBody"}}},"description":""},"BadRequestApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request was invalid or could not be completed."},"UnauthorizedApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request could not be authenticated for this API."},"ForbiddenApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The authenticated caller or organization is not allowed to access this endpoint or operation."},"ErrorApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":""},"TooManyRequestsApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request exceeded the applicable rate limit.","headers":{"Retry-After":{"description":"Seconds until the next request to this endpoint is permitted.","schema":{"format":"int64","type":"integer"}},"X-Retry-After":{"description":"Seconds until the full per-minute allowance is restored. Capacity returns gradually before then.","schema":{"format":"int64","type":"integer"}}}},"InternalServerErrorApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"An unexpected internal error occurred."}}},"paths":{"/issue-groups":{"post":{"description":"Creates an issue group and attaches its initial child issues atomically.\n\n**Rate limit:** 30 requests per minute","operationId":"CreateIssueGroup","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateIssueGroupRequestBody"}}}},"responses":{"200":{"$ref":"#/components/responses/CreateIssueGroupResponse"},"400":{"$ref":"#/components/responses/BadRequestApiResponse"},"401":{"$ref":"#/components/responses/UnauthorizedApiResponse"},"403":{"$ref":"#/components/responses/ForbiddenApiResponse"},"404":{"$ref":"#/components/responses/ErrorApiResponse"},"409":{"$ref":"#/components/responses/ErrorApiResponse"},"429":{"$ref":"#/components/responses/TooManyRequestsApiResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorApiResponse"}},"summary":"Create an issue group","tags":["issues"]}}}}
```

## Add children to an issue group

> Adds one or more child issues atomically. Issues already attached to this group are ignored.\
> \
> \*\*Rate limit:\*\* 120 requests per minute

```json
{"openapi":"3.0.3","info":{"title":"Pylon API.","version":"1.0.0"},"tags":[],"servers":[{"description":"US region","url":"https://api.usepylon.com"},{"description":"EU region","url":"https://api.eu.usepylon.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"description":"Authorization: Bearer <token>","scheme":"bearer","type":"http"}},"schemas":{"AddIssueGroupChildrenRequestBody":{"properties":{"child_issue_ids":{"description":"The IDs of the issues to add to the group. At least one is required.","items":{"type":"string"},"type":"array"}},"required":["child_issue_ids"],"type":"object"},"IssueGroupMutationResponseBody":{"properties":{"request_id":{"description":"The request ID for tracking.","type":"string"},"success":{"description":"Whether the mutation succeeded.","type":"boolean"}},"required":["request_id","success"],"type":"object"},"ErrorApiResponseBody":{"properties":{"code":{"description":"A stable machine-readable identifier for this failure, safe to branch on\ninstead of the message text. Omitted when the failure has no assigned code.\n\nKnown values: `recipients_suppressed`, `email_bounced`, `internal_issue_reply_not_allowed`, `duplicate_object`, `invalid_authorization_header`, `invalid_api_token`, `invalid_oauth_token`, `wrong_region_token`, `organization_deactivated`, `organization_suspended`, `permission_denied`, `oauth_not_permitted`, `rate_limited`, `not_found`, `method_not_allowed`, `payload_too_large`, `invalid_request_body`, `internal_error`, `invalid_webhook_credentials`, `organization_inactive`. This list is not exhaustive.","type":"string"},"errors":{"description":"The list of errors.","items":{"type":"string"},"type":"array"},"exists_id":{"description":"The ID of the object that already exists if this is a duplicate object error.","type":"string"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"required":["request_id"],"type":"object"}},"responses":{"IssueGroupMutationResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueGroupMutationResponseBody"}}},"description":""},"BadRequestApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request was invalid or could not be completed."},"UnauthorizedApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request could not be authenticated for this API."},"ForbiddenApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The authenticated caller or organization is not allowed to access this endpoint or operation."},"ErrorApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":""},"TooManyRequestsApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request exceeded the applicable rate limit.","headers":{"Retry-After":{"description":"Seconds until the next request to this endpoint is permitted.","schema":{"format":"int64","type":"integer"}},"X-Retry-After":{"description":"Seconds until the full per-minute allowance is restored. Capacity returns gradually before then.","schema":{"format":"int64","type":"integer"}}}},"InternalServerErrorApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"An unexpected internal error occurred."}}},"paths":{"/issue-groups/{issue_group_id}/children":{"post":{"description":"Adds one or more child issues atomically. Issues already attached to this group are ignored.\n\n**Rate limit:** 120 requests per minute","operationId":"AddIssueGroupChildren","parameters":[{"description":"The ID of the issue group.","in":"path","name":"issue_group_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddIssueGroupChildrenRequestBody"}}}},"responses":{"200":{"$ref":"#/components/responses/IssueGroupMutationResponse"},"400":{"$ref":"#/components/responses/BadRequestApiResponse"},"401":{"$ref":"#/components/responses/UnauthorizedApiResponse"},"403":{"$ref":"#/components/responses/ForbiddenApiResponse"},"404":{"$ref":"#/components/responses/ErrorApiResponse"},"409":{"$ref":"#/components/responses/ErrorApiResponse"},"429":{"$ref":"#/components/responses/TooManyRequestsApiResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorApiResponse"}},"summary":"Add children to an issue group","tags":["issues"]}}}}
```

## Remove a child from an issue group

> Removes one child issue. An issue group must retain at least one child.\
> \
> \*\*Rate limit:\*\* 120 requests per minute

```json
{"openapi":"3.0.3","info":{"title":"Pylon API.","version":"1.0.0"},"tags":[],"servers":[{"description":"US region","url":"https://api.usepylon.com"},{"description":"EU region","url":"https://api.eu.usepylon.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"description":"Authorization: Bearer <token>","scheme":"bearer","type":"http"}},"responses":{"IssueGroupMutationResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueGroupMutationResponseBody"}}},"description":""},"BadRequestApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request was invalid or could not be completed."},"UnauthorizedApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request could not be authenticated for this API."},"ForbiddenApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The authenticated caller or organization is not allowed to access this endpoint or operation."},"ErrorApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":""},"TooManyRequestsApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request exceeded the applicable rate limit.","headers":{"Retry-After":{"description":"Seconds until the next request to this endpoint is permitted.","schema":{"format":"int64","type":"integer"}},"X-Retry-After":{"description":"Seconds until the full per-minute allowance is restored. Capacity returns gradually before then.","schema":{"format":"int64","type":"integer"}}}},"InternalServerErrorApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"An unexpected internal error occurred."}},"schemas":{"IssueGroupMutationResponseBody":{"properties":{"request_id":{"description":"The request ID for tracking.","type":"string"},"success":{"description":"Whether the mutation succeeded.","type":"boolean"}},"required":["request_id","success"],"type":"object"},"ErrorApiResponseBody":{"properties":{"code":{"description":"A stable machine-readable identifier for this failure, safe to branch on\ninstead of the message text. Omitted when the failure has no assigned code.\n\nKnown values: `recipients_suppressed`, `email_bounced`, `internal_issue_reply_not_allowed`, `duplicate_object`, `invalid_authorization_header`, `invalid_api_token`, `invalid_oauth_token`, `wrong_region_token`, `organization_deactivated`, `organization_suspended`, `permission_denied`, `oauth_not_permitted`, `rate_limited`, `not_found`, `method_not_allowed`, `payload_too_large`, `invalid_request_body`, `internal_error`, `invalid_webhook_credentials`, `organization_inactive`. This list is not exhaustive.","type":"string"},"errors":{"description":"The list of errors.","items":{"type":"string"},"type":"array"},"exists_id":{"description":"The ID of the object that already exists if this is a duplicate object error.","type":"string"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"required":["request_id"],"type":"object"}}},"paths":{"/issue-groups/{issue_group_id}/children/{child_issue_id}":{"delete":{"description":"Removes one child issue. An issue group must retain at least one child.\n\n**Rate limit:** 120 requests per minute","operationId":"RemoveIssueGroupChild","parameters":[{"description":"The ID of the issue group.","in":"path","name":"issue_group_id","required":true,"schema":{"type":"string"}},{"description":"The ID of the child issue to remove.","in":"path","name":"child_issue_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/IssueGroupMutationResponse"},"400":{"$ref":"#/components/responses/BadRequestApiResponse"},"401":{"$ref":"#/components/responses/UnauthorizedApiResponse"},"403":{"$ref":"#/components/responses/ForbiddenApiResponse"},"404":{"$ref":"#/components/responses/ErrorApiResponse"},"409":{"$ref":"#/components/responses/ErrorApiResponse"},"429":{"$ref":"#/components/responses/TooManyRequestsApiResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorApiResponse"}},"summary":"Remove a child from an issue group","tags":["issues"]}}}}
```

## Create an AI response for an issue

> Generates an AI response for the specified issue using the given agent.\
> \
> \*\*Rate limit:\*\* 120 requests per minute

```json
{"openapi":"3.0.3","info":{"title":"Pylon API.","version":"1.0.0"},"tags":[],"servers":[{"description":"US region","url":"https://api.usepylon.com"},{"description":"EU region","url":"https://api.eu.usepylon.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"description":"Authorization: Bearer <token>","scheme":"bearer","type":"http"}},"schemas":{"CreateIssueAIResponseRequestBody":{"properties":{"ai_agent_id":{"description":"The ID of the AI agent to use to create the AI response.","type":"string"},"post_as_internal_note":{"description":"Whether to post the AI response as an internal note on the issue.","type":"boolean"}},"required":["ai_agent_id"],"type":"object"},"CreateIssueAIResponseResponseBody":{"properties":{"request_id":{"description":"The request ID for tracking.","type":"string"},"response_html":{"description":"The HTML content of the AI response.","type":"string"},"response_valid":{"description":"Whether the AI was able to answer the question.","type":"boolean"}},"required":["request_id","response_html","response_valid"],"type":"object"},"ErrorApiResponseBody":{"properties":{"code":{"description":"A stable machine-readable identifier for this failure, safe to branch on\ninstead of the message text. Omitted when the failure has no assigned code.\n\nKnown values: `recipients_suppressed`, `email_bounced`, `internal_issue_reply_not_allowed`, `duplicate_object`, `invalid_authorization_header`, `invalid_api_token`, `invalid_oauth_token`, `wrong_region_token`, `organization_deactivated`, `organization_suspended`, `permission_denied`, `oauth_not_permitted`, `rate_limited`, `not_found`, `method_not_allowed`, `payload_too_large`, `invalid_request_body`, `internal_error`, `invalid_webhook_credentials`, `organization_inactive`. This list is not exhaustive.","type":"string"},"errors":{"description":"The list of errors.","items":{"type":"string"},"type":"array"},"exists_id":{"description":"The ID of the object that already exists if this is a duplicate object error.","type":"string"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"required":["request_id"],"type":"object"}},"responses":{"CreateIssueAIResponseResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateIssueAIResponseResponseBody"}}},"description":""},"BadRequestApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request was invalid or could not be completed."},"UnauthorizedApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request could not be authenticated for this API."},"ForbiddenApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The authenticated caller or organization is not allowed to access this endpoint or operation."},"ErrorApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":""},"TooManyRequestsApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request exceeded the applicable rate limit.","headers":{"Retry-After":{"description":"Seconds until the next request to this endpoint is permitted.","schema":{"format":"int64","type":"integer"}},"X-Retry-After":{"description":"Seconds until the full per-minute allowance is restored. Capacity returns gradually before then.","schema":{"format":"int64","type":"integer"}}}},"InternalServerErrorApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"An unexpected internal error occurred."}}},"paths":{"/issues/{id}/ai-response":{"post":{"description":"Generates an AI response for the specified issue using the given agent.\n\n**Rate limit:** 120 requests per minute","operationId":"CreateIssueAIResponse","parameters":[{"description":"The ID or number of the issue to create an AI response for.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateIssueAIResponseRequestBody"}}}},"responses":{"200":{"$ref":"#/components/responses/CreateIssueAIResponseResponse"},"400":{"$ref":"#/components/responses/BadRequestApiResponse"},"401":{"$ref":"#/components/responses/UnauthorizedApiResponse"},"403":{"$ref":"#/components/responses/ForbiddenApiResponse"},"404":{"$ref":"#/components/responses/ErrorApiResponse"},"429":{"$ref":"#/components/responses/TooManyRequestsApiResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorApiResponse"}},"summary":"Create an AI response for an issue","tags":["issues"]}}}}
```

## Get all issue statuses

> Returns all issue statuses for the organization. Use \`slug\` as \`state\` in PATCH /issues and issue search filters.\
> \
> \*\*Rate limit:\*\* 30 requests per minute

```json
{"openapi":"3.0.3","info":{"title":"Pylon API.","version":"1.0.0"},"tags":[],"servers":[{"description":"US region","url":"https://api.usepylon.com"},{"description":"EU region","url":"https://api.eu.usepylon.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"description":"Authorization: Bearer <token>","scheme":"bearer","type":"http"}},"responses":{"GetIssueStatusesResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetIssueStatusesResponseBody"}}},"description":""},"BadRequestApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request was invalid or could not be completed."},"UnauthorizedApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request could not be authenticated for this API."},"ForbiddenApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The authenticated caller or organization is not allowed to access this endpoint or operation."},"ErrorApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":""},"TooManyRequestsApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request exceeded the applicable rate limit.","headers":{"Retry-After":{"description":"Seconds until the next request to this endpoint is permitted.","schema":{"format":"int64","type":"integer"}},"X-Retry-After":{"description":"Seconds until the full per-minute allowance is restored. Capacity returns gradually before then.","schema":{"format":"int64","type":"integer"}}}},"InternalServerErrorApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"An unexpected internal error occurred."}},"schemas":{"GetIssueStatusesResponseBody":{"properties":{"data":{"description":"The data payload of the response.","items":{"$ref":"#/components/schemas/IssueStatus"},"type":"array"},"pagination":{"$ref":"#/components/schemas/Pagination"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"required":["data","request_id"],"type":"object"},"IssueStatus":{"properties":{"category":{"description":"The category of the issue status.","type":"string"},"is_archived":{"description":"Indicates if the issue status is archived.","type":"boolean"},"is_default_status":{"description":"Indicates if the issue status is a default status.","type":"boolean"},"label":{"description":"The label of the issue status.","type":"string"},"slug":{"description":"The slug of the issue status.","type":"string"}},"required":["category","is_archived","is_default_status","label","slug"],"type":"object"},"Pagination":{"description":"Pagination information for list responses. Absent when there are no more results.","properties":{"cursor":{"description":"The cursor for the next page of results.","type":"string"},"has_next_page":{"description":"Indicates if there is a next page of results.","type":"boolean"}},"required":["cursor","has_next_page"],"title":"Pagination","type":"object"},"ErrorApiResponseBody":{"properties":{"code":{"description":"A stable machine-readable identifier for this failure, safe to branch on\ninstead of the message text. Omitted when the failure has no assigned code.\n\nKnown values: `recipients_suppressed`, `email_bounced`, `internal_issue_reply_not_allowed`, `duplicate_object`, `invalid_authorization_header`, `invalid_api_token`, `invalid_oauth_token`, `wrong_region_token`, `organization_deactivated`, `organization_suspended`, `permission_denied`, `oauth_not_permitted`, `rate_limited`, `not_found`, `method_not_allowed`, `payload_too_large`, `invalid_request_body`, `internal_error`, `invalid_webhook_credentials`, `organization_inactive`. This list is not exhaustive.","type":"string"},"errors":{"description":"The list of errors.","items":{"type":"string"},"type":"array"},"exists_id":{"description":"The ID of the object that already exists if this is a duplicate object error.","type":"string"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"required":["request_id"],"type":"object"}}},"paths":{"/issue-statuses":{"get":{"description":"Returns all issue statuses for the organization. Use `slug` as `state` in PATCH /issues and issue search filters.\n\n**Rate limit:** 30 requests per minute","operationId":"GetIssueStatuses","responses":{"200":{"$ref":"#/components/responses/GetIssueStatusesResponse"},"400":{"$ref":"#/components/responses/BadRequestApiResponse"},"401":{"$ref":"#/components/responses/UnauthorizedApiResponse"},"403":{"$ref":"#/components/responses/ForbiddenApiResponse"},"404":{"$ref":"#/components/responses/ErrorApiResponse"},"429":{"$ref":"#/components/responses/TooManyRequestsApiResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorApiResponse"}},"summary":"Get all issue statuses","tags":["issue-statuses"]}}}}
```

## Get voice calls (with recordings and transcripts) for an issue.

> Returns voice call records for the specified phone issue. Each call includes its recordings, with parsed transcript segments and a presigned download URL for the audio file. Recordings whose transcript has not yet completed are omitted; refetch later to see them.\
> \
> \*\*Rate limit:\*\* 120 requests per minute

```json
{"openapi":"3.0.3","info":{"title":"Pylon API.","version":"1.0.0"},"tags":[],"servers":[{"description":"US region","url":"https://api.usepylon.com"},{"description":"EU region","url":"https://api.eu.usepylon.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"description":"Authorization: Bearer <token>","scheme":"bearer","type":"http"}},"responses":{"GetIssueVoiceCallsResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetIssueVoiceCallsResponseBody"}}},"description":""},"BadRequestApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request was invalid or could not be completed."},"UnauthorizedApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request could not be authenticated for this API."},"ForbiddenApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The authenticated caller or organization is not allowed to access this endpoint or operation."},"ErrorApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":""},"TooManyRequestsApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request exceeded the applicable rate limit.","headers":{"Retry-After":{"description":"Seconds until the next request to this endpoint is permitted.","schema":{"format":"int64","type":"integer"}},"X-Retry-After":{"description":"Seconds until the full per-minute allowance is restored. Capacity returns gradually before then.","schema":{"format":"int64","type":"integer"}}}},"InternalServerErrorApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"An unexpected internal error occurred."}},"schemas":{"GetIssueVoiceCallsResponseBody":{"properties":{"data":{"description":"The voice calls associated with the issue, including recordings and transcripts.","items":{"$ref":"#/components/schemas/VoiceCall"},"type":"array"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"required":["data","request_id"],"type":"object"},"VoiceCall":{"properties":{"created_at":{"description":"RFC3339 timestamp of when the call record was created.","format":"date-time","type":"string"},"duration_sec":{"description":"The duration of the call in seconds.","format":"int64","type":"integer"},"from_phone_number":{"description":"The phone number that originated the call.","type":"string"},"id":{"description":"The ID of the voice call.","type":"string"},"recordings":{"description":"Recordings produced for this call.","items":{"$ref":"#/components/schemas/VoiceCallRecording"},"nullable":true,"type":"array"},"to_phone_number":{"description":"The phone number that was dialed.","type":"string"}},"required":["created_at","from_phone_number","id","to_phone_number"],"type":"object"},"VoiceCallRecording":{"properties":{"download_url":{"description":"A presigned URL to download the audio file. Expires 1 hour after this response is generated; refetch the voice call to get a new URL. Empty when the audio was deleted under a retention policy.","type":"string"},"id":{"description":"The ID of the recording.","type":"string"},"transcript_segments":{"description":"Parsed transcript with one entry per spoken segment.","items":{"$ref":"#/components/schemas/VoiceCallTranscriptSegment"},"nullable":true,"type":"array"}},"required":["download_url","id"],"type":"object"},"VoiceCallTranscriptSegment":{"properties":{"speaker":{"description":"The speaker label for this segment.","type":"string"},"text":{"description":"The text spoken in this segment.","type":"string"}},"required":["speaker","text"],"type":"object"},"ErrorApiResponseBody":{"properties":{"code":{"description":"A stable machine-readable identifier for this failure, safe to branch on\ninstead of the message text. Omitted when the failure has no assigned code.\n\nKnown values: `recipients_suppressed`, `email_bounced`, `internal_issue_reply_not_allowed`, `duplicate_object`, `invalid_authorization_header`, `invalid_api_token`, `invalid_oauth_token`, `wrong_region_token`, `organization_deactivated`, `organization_suspended`, `permission_denied`, `oauth_not_permitted`, `rate_limited`, `not_found`, `method_not_allowed`, `payload_too_large`, `invalid_request_body`, `internal_error`, `invalid_webhook_credentials`, `organization_inactive`. This list is not exhaustive.","type":"string"},"errors":{"description":"The list of errors.","items":{"type":"string"},"type":"array"},"exists_id":{"description":"The ID of the object that already exists if this is a duplicate object error.","type":"string"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"required":["request_id"],"type":"object"}}},"paths":{"/issues/{id}/voice-calls":{"get":{"description":"Returns voice call records for the specified phone issue. Each call includes its recordings, with parsed transcript segments and a presigned download URL for the audio file. Recordings whose transcript has not yet completed are omitted; refetch later to see them.\n\n**Rate limit:** 120 requests per minute","operationId":"GetIssueVoiceCalls","parameters":[{"description":"The ID of the issue to fetch voice calls for.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/GetIssueVoiceCallsResponse"},"400":{"$ref":"#/components/responses/BadRequestApiResponse"},"401":{"$ref":"#/components/responses/UnauthorizedApiResponse"},"403":{"$ref":"#/components/responses/ForbiddenApiResponse"},"404":{"$ref":"#/components/responses/ErrorApiResponse"},"429":{"$ref":"#/components/responses/TooManyRequestsApiResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorApiResponse"}},"summary":"Get voice calls (with recordings and transcripts) for an issue.","tags":["voice_calls"]}}}}
```

## Get an issue by its ID/number

> Returns a single issue by ID or issue number.\
> \
> \*\*Rate limit:\*\* 300 requests per minute

```json
{"openapi":"3.0.3","info":{"title":"Pylon API.","version":"1.0.0"},"tags":[],"servers":[{"description":"US region","url":"https://api.usepylon.com"},{"description":"EU region","url":"https://api.eu.usepylon.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"description":"Authorization: Bearer <token>","scheme":"bearer","type":"http"}},"responses":{"GetIssueResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetIssueResponseBody"}}},"description":""},"BadRequestApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request was invalid or could not be completed."},"UnauthorizedApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request could not be authenticated for this API."},"ForbiddenApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The authenticated caller or organization is not allowed to access this endpoint or operation."},"ErrorApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":""},"TooManyRequestsApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request exceeded the applicable rate limit.","headers":{"Retry-After":{"description":"Seconds until the next request to this endpoint is permitted.","schema":{"format":"int64","type":"integer"}},"X-Retry-After":{"description":"Seconds until the full per-minute allowance is restored. Capacity returns gradually before then.","schema":{"format":"int64","type":"integer"}}}},"InternalServerErrorApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"An unexpected internal error occurred."}},"schemas":{"GetIssueResponseBody":{"properties":{"data":{"$ref":"#/components/schemas/Issue"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"required":["data","request_id"],"type":"object"},"Issue":{"properties":{"account":{"allOf":[{"$ref":"#/components/schemas/MiniAccount"}],"nullable":true},"active_time_by_user":{"description":"Active time spent on the issue broken down per user, if any.","items":{"$ref":"#/components/schemas/ActiveTimeByUser"},"type":"array"},"active_time_seconds":{"description":"The total active time spent on the issue in seconds, if any. Equals the sum of the per-user active time.","format":"int64","type":"integer"},"assignee":{"allOf":[{"$ref":"#/components/schemas/MiniUser"}],"nullable":true},"attachment_urls":{"description":"The attachment URLs attached to this issue, if any. Signed download URLs. Fetch with a plain GET, no Authorization header.","items":{"type":"string"},"type":"array"},"author_unverified":{"description":"Whether any message on the issue has an unverified author identity. True if any message author's identity has NOT been verified (e.g., from public forms).","type":"boolean"},"body_html":{"description":"The body of the issue in HTML format.","type":"string"},"business_hours_active_time_seconds":{"description":"The total business-hours active time spent on the issue in seconds, if any. Equals the sum of the per-user business-hours active time.","format":"int64","type":"integer"},"business_hours_first_response_seconds":{"description":"The business hours time in seconds it took for the first response to the issue, if any.","format":"int64","type":"integer"},"business_hours_resolution_seconds":{"description":"The business hours time in seconds it took for the issue to be resolved, if any.","format":"int64","type":"integer"},"business_hours_time_in_status_seconds":{"additionalProperties":{"format":"int64","type":"integer"},"description":"A map of status slug to the business hours time in seconds the issue has spent in that status. Includes both base statuses (e.g. \"new\", \"waiting_on_you\") and custom statuses.","type":"object"},"chat_widget_info":{"$ref":"#/components/schemas/IssueChatWidgetInfo"},"child_issues":{"description":"The child issues in this group, if this issue is an issue group.","items":{"$ref":"#/components/schemas/MiniIssue"},"type":"array"},"created_at":{"description":"The time the issue was created.","format":"date-time","type":"string"},"csat_responses":{"description":"The CSAT responses of the issue, if any.","items":{"$ref":"#/components/schemas/CSATResponse"},"type":"array"},"custom_fields":{"additionalProperties":{"$ref":"#/components/schemas/CustomFieldValue"},"description":"Custom field values associated with the issue.","nullable":true,"type":"object"},"customer_portal_visible":{"description":"Whether the issue is visible in the customer portal.","type":"boolean"},"external_incidents":{"description":"Incidents from incident.io or Rootly linked to this issue.","items":{"$ref":"#/components/schemas/ExternalIncident"},"type":"array"},"external_issues":{"description":"The external issues associated with the issue, if any.","items":{"$ref":"#/components/schemas/ExternalIssue"},"type":"array"},"first_resolution_time":{"description":"The time of the first resolution of the issue, if any. Frozen at the issue's first resolution and never updated on reopen/re-resolve.","format":"date-time","nullable":true,"type":"string"},"first_response_breach_time":{"description":"The time by which the issue's first response SLA will breach, if any. Only present for issues with an active first response SLA.","format":"date-time","type":"string"},"first_response_seconds":{"description":"The time in seconds it took for the first response to the issue, if any.","format":"int64","type":"integer"},"first_response_time":{"description":"The time of the first response to the issue, if any.","format":"date-time","nullable":true,"type":"string"},"id":{"description":"The ID of the issue.","type":"string"},"is_issue_group":{"description":"Whether this issue is an issue group.","type":"boolean"},"latest_message_time":{"description":"The time of the latest message in the issue, if any.","format":"date-time","nullable":true,"type":"string"},"link":{"description":"The link to the issue in Pylon.","type":"string"},"number":{"description":"The number of the issue.","format":"int64","type":"integer"},"number_of_touches":{"description":"The number of times the issue has been touched.","format":"int64","type":"integer"},"parent_issue_group":{"$ref":"#/components/schemas/MiniIssue"},"requester":{"allOf":[{"$ref":"#/components/schemas/MiniContact"}],"nullable":true},"resolution_breach_time":{"description":"The time by which the issue's resolution SLA will breach, if any. Only present for open issues with an active resolution SLA.","format":"date-time","type":"string"},"resolution_seconds":{"description":"The time in seconds it took for the issue to be resolved, if any.","format":"int64","type":"integer"},"resolution_time":{"description":"The time of the resolution of the issue, if any.","format":"date-time","nullable":true,"type":"string"},"slack":{"$ref":"#/components/schemas/SlackInfo"},"snoozed_until_time":{"description":"The time the issue was snoozed until in RFC3339 format, if any.","format":"date-time","type":"string"},"source":{"description":"The source of the issue.\n\nKnown values: `slack`, `microsoft_teams`, `microsoft_teams_chat`, `chat_widget`, `customer_portal`, `email`, `manual`, `form`, `discord`, `google_chat`, `whatsapp`, `sms`, `telegram`, `phone`. This list is not exhaustive.","type":"string"},"state":{"description":"The state of the issue. Standard values are `new`, `waiting_on_you`, `waiting_on_customer`, `on_hold`, and `closed`; custom status slugs are also supported.","type":"string"},"tags":{"description":"Tags associated with the issue.","items":{"type":"string"},"nullable":true,"type":"array"},"team":{"allOf":[{"$ref":"#/components/schemas/MiniTeam"}],"nullable":true},"team_slas":{"description":"The team-scoped SLAs on the issue, if any. One entry per team, mirroring the issue-level first response and resolution SLA fields.","items":{"$ref":"#/components/schemas/TeamSLA"},"type":"array"},"time_in_status_seconds":{"additionalProperties":{"format":"int64","type":"integer"},"description":"A map of status slug to the time in seconds the issue has spent in that status. Includes both base statuses (e.g. \"new\", \"waiting_on_you\") and custom statuses.","type":"object"},"title":{"description":"The title of the issue.","type":"string"},"type":{"description":"The type of the issue.\n\nKnown values: `conversation`, `ticket`. This list is not exhaustive.","type":"string"},"updated_at":{"description":"The time the issue was last updated.","format":"date-time","type":"string"},"workspace_email":{"description":"The email address connected to the Pylon workspace through which the issue's email conversation is routed. For inbound issues, this is the address that received the original email.","type":"string"}},"required":["body_html","created_at","customer_portal_visible","id","is_issue_group","link","number","number_of_touches","source","state","title","type","updated_at"],"type":"object"},"MiniAccount":{"properties":{"external_ids":{"description":"External IDs associated with the account.","items":{"$ref":"#/components/schemas/ExternalID"},"nullable":true,"type":"array"},"id":{"description":"The ID of the account.","type":"string"}},"required":["id"],"type":"object"},"ExternalID":{"properties":{"external_id":{"description":"The external ID. Must be unique per object type (ex. account).","type":"string"},"label":{"description":"The label of the external ID. Must be unique per object.","type":"string"}},"type":"object"},"ActiveTimeByUser":{"properties":{"active_time_seconds":{"description":"The user's active time on the issue in seconds.","format":"int64","type":"integer"},"business_hours_active_time_seconds":{"description":"The user's business-hours active time on the issue in seconds.","format":"int64","type":"integer"},"user_id":{"description":"The ID of the user who spent the time.","type":"string"}},"required":["active_time_seconds","business_hours_active_time_seconds","user_id"],"type":"object"},"MiniUser":{"properties":{"email":{"description":"The email of the user.","type":"string"},"id":{"description":"The ID of the user.","type":"string"}},"required":["id"],"type":"object"},"IssueChatWidgetInfo":{"properties":{"page_url":{"description":"The URL of the page that the user was on when they started the chat widget issue.","type":"string"}},"required":["page_url"],"type":"object"},"MiniIssue":{"properties":{"id":{"description":"The ID of the issue.","type":"string"},"number":{"description":"The number of the issue.","format":"int64","type":"integer"},"title":{"description":"The title of the issue.","type":"string"}},"required":["id","number","title"],"type":"object"},"CSATResponse":{"properties":{"comment":{"description":"The comment of the CSAT response.","nullable":true,"type":"string"},"score":{"description":"The score of the CSAT response.","format":"int64","type":"integer"}},"required":["score"],"type":"object"},"CustomFieldValue":{"description":"A custom field value to set. Custom fields not listed in a write request are left unchanged.","properties":{"slug":{"description":"The slug of the custom field.","type":"string"},"value":{"description":"The value of the custom field. Only to be used for single-valued custom fields. If unset, the custom field will be unset. If the custom field is a select field, the value must be the select option slug, which you can find from the GET /custom-fields endpoint. If the custom field is a relationship field, the value must be the related object ID.","type":"string"},"values":{"description":"The values of the custom field. Only to be used for multi-valued custom fields (ex. multiselect). Replaces the full selection; it does not add to or remove from the existing values. If unset, the custom field will be unset. If the custom field is a multiselect field, the values must be the select option slugs which you can find from the GET /custom-fields endpoint.","items":{"type":"string"},"type":"array"}},"title":"CustomFieldValue","type":"object"},"ExternalIncident":{"properties":{"external_id":{"description":"The incident system's own ID for the incident, when known.","type":"string"},"link":{"description":"Link to the incident, when known.","type":"string"},"reference":{"description":"The incident's reference in the incident system, such as INC-123 or ROOT-123.","type":"string"},"source":{"description":"The incident system the incident belongs to.\n\nKnown values: `incident_io`, `rootly`. This list is not exhaustive.","type":"string"}},"required":["reference","source"],"type":"object"},"ExternalIssue":{"properties":{"external_id":{"description":"The external ID of the external issue.\nJira: ID of the issue (autoincrementing number from 10000).\nGitHub: Owner/Repo/IssueID.\nLinear: ID of the issue (UUID).\nAsana: ID of the task (Long number).","type":"string"},"link":{"description":"Link to the product issue.","type":"string"},"source":{"description":"The source of the external issue.","type":"string"}},"required":["external_id","link","source"],"type":"object"},"MiniContact":{"properties":{"email":{"description":"The email of the contact.","type":"string"},"id":{"description":"The ID of the contact.","type":"string"}},"required":["id"],"type":"object"},"SlackInfo":{"properties":{"channel_id":{"description":"The Slack channel ID associated with the issue.","type":"string"},"message_ts":{"description":"The root message ID of slack message that started issue.","type":"string"},"workspace_id":{"description":"The Slack workspace ID associated with the issue.","type":"string"}},"required":["channel_id","message_ts","workspace_id"],"type":"object"},"MiniTeam":{"properties":{"id":{"description":"The ID of the team.","type":"string"}},"required":["id"],"type":"object"},"TeamSLA":{"properties":{"first_resolution":{"$ref":"#/components/schemas/SLATimes"},"first_response":{"$ref":"#/components/schemas/SLATimes"},"resolution":{"$ref":"#/components/schemas/SLATimes"},"team_id":{"description":"The ID of the team these are scoped to.","type":"string"}},"required":["team_id"],"type":"object"},"SLATimes":{"properties":{"breach_time":{"description":"The time at which it breaches (or has breached), if any.","format":"date-time","type":"string"},"business_hours_seconds":{"description":"The elapsed business-hours time in seconds, if any.","format":"int64","type":"integer"},"seconds":{"description":"The elapsed time in seconds, if any.","format":"int64","type":"integer"},"time":{"description":"The time it was reached, if any.","format":"date-time","nullable":true,"type":"string"}},"type":"object"},"ErrorApiResponseBody":{"properties":{"code":{"description":"A stable machine-readable identifier for this failure, safe to branch on\ninstead of the message text. Omitted when the failure has no assigned code.\n\nKnown values: `recipients_suppressed`, `email_bounced`, `internal_issue_reply_not_allowed`, `duplicate_object`, `invalid_authorization_header`, `invalid_api_token`, `invalid_oauth_token`, `wrong_region_token`, `organization_deactivated`, `organization_suspended`, `permission_denied`, `oauth_not_permitted`, `rate_limited`, `not_found`, `method_not_allowed`, `payload_too_large`, `invalid_request_body`, `internal_error`, `invalid_webhook_credentials`, `organization_inactive`. This list is not exhaustive.","type":"string"},"errors":{"description":"The list of errors.","items":{"type":"string"},"type":"array"},"exists_id":{"description":"The ID of the object that already exists if this is a duplicate object error.","type":"string"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"required":["request_id"],"type":"object"}}},"paths":{"/issues/{id}":{"get":{"description":"Returns a single issue by ID or issue number.\n\n**Rate limit:** 300 requests per minute","operationId":"GetIssue","parameters":[{"description":"The ID or number of the issue to fetch.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/GetIssueResponse"},"400":{"$ref":"#/components/responses/BadRequestApiResponse"},"401":{"$ref":"#/components/responses/UnauthorizedApiResponse"},"403":{"$ref":"#/components/responses/ForbiddenApiResponse"},"404":{"$ref":"#/components/responses/ErrorApiResponse"},"429":{"$ref":"#/components/responses/TooManyRequestsApiResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorApiResponse"}},"summary":"Get an issue by its ID/number","tags":["issues"]}}}}
```

## Update an existing issue

> Updates an existing issue. Only provided fields are modified.\
> \
> \*\*Rate limit:\*\* 120 requests per minute

```json
{"openapi":"3.0.3","info":{"title":"Pylon API.","version":"1.0.0"},"tags":[],"servers":[{"description":"US region","url":"https://api.usepylon.com"},{"description":"EU region","url":"https://api.eu.usepylon.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"description":"Authorization: Bearer <token>","scheme":"bearer","type":"http"}},"schemas":{"UpdateIssueRequestBody":{"properties":{"account_id":{"description":"The ID of the account that this issue belongs to. To remove the account, pass an empty string and also provide requester_id. The requester can be cleared with an empty string or retained if it has no account memberships. Account removal is supported only for manual, form, and email issues.","type":"string"},"assignee_id":{"description":"The ID of the user who should be assigned to this issue. If empty string is passed in, the issue assignee will be removed.","type":"string"},"custom_fields":{"description":"An array of custom fields to be used on this issue. Only passed in fields will be modified.","items":{"$ref":"#/components/schemas/CustomFieldValue"},"type":"array"},"customer_portal_visible":{"description":"Whether the issue should be visible in the customer portal.","type":"boolean"},"requester_id":{"description":"The ID of the requester that this issue is on behalf of. If an empty string is passed, the requester will be removed. This field must be provided when removing the issue's account, and a retained requester must not belong to any account.","type":"string"},"requestor_id":{"description":"Deprecated: Use requester_id instead.","type":"string"},"state":{"description":"The state this issue should be moved to. Standard values are `new`, `waiting_on_you`, `waiting_on_customer`, `on_hold`, and `closed`; custom status slugs are also supported.","type":"string"},"tags":{"description":"An array of strings to use as tags on this issue. If provided, the issue tags will be updated to be exactly the given tags.","items":{"type":"string"},"type":"array"},"team_id":{"description":"The ID of the team this issue should be assigned to. If empty string is passed in, any assigned team will be removed.","type":"string"},"title":{"description":"The title of the issue.","type":"string"},"type":{"description":"The type of the issue. Set to \"ticket\" to upgrade a conversation to a support ticket. Cannot be downgraded from \"ticket\" to \"conversation\".","enum":["conversation","ticket"],"type":"string"}},"type":"object"},"CustomFieldValue":{"description":"A custom field value to set. Custom fields not listed in a write request are left unchanged.","properties":{"slug":{"description":"The slug of the custom field.","type":"string"},"value":{"description":"The value of the custom field. Only to be used for single-valued custom fields. If unset, the custom field will be unset. If the custom field is a select field, the value must be the select option slug, which you can find from the GET /custom-fields endpoint. If the custom field is a relationship field, the value must be the related object ID.","type":"string"},"values":{"description":"The values of the custom field. Only to be used for multi-valued custom fields (ex. multiselect). Replaces the full selection; it does not add to or remove from the existing values. If unset, the custom field will be unset. If the custom field is a multiselect field, the values must be the select option slugs which you can find from the GET /custom-fields endpoint.","items":{"type":"string"},"type":"array"}},"title":"CustomFieldValue","type":"object"},"UpdateIssueResponseBody":{"properties":{"data":{"$ref":"#/components/schemas/Issue"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"required":["data","request_id"],"type":"object"},"Issue":{"properties":{"account":{"allOf":[{"$ref":"#/components/schemas/MiniAccount"}],"nullable":true},"active_time_by_user":{"description":"Active time spent on the issue broken down per user, if any.","items":{"$ref":"#/components/schemas/ActiveTimeByUser"},"type":"array"},"active_time_seconds":{"description":"The total active time spent on the issue in seconds, if any. Equals the sum of the per-user active time.","format":"int64","type":"integer"},"assignee":{"allOf":[{"$ref":"#/components/schemas/MiniUser"}],"nullable":true},"attachment_urls":{"description":"The attachment URLs attached to this issue, if any. Signed download URLs. Fetch with a plain GET, no Authorization header.","items":{"type":"string"},"type":"array"},"author_unverified":{"description":"Whether any message on the issue has an unverified author identity. True if any message author's identity has NOT been verified (e.g., from public forms).","type":"boolean"},"body_html":{"description":"The body of the issue in HTML format.","type":"string"},"business_hours_active_time_seconds":{"description":"The total business-hours active time spent on the issue in seconds, if any. Equals the sum of the per-user business-hours active time.","format":"int64","type":"integer"},"business_hours_first_response_seconds":{"description":"The business hours time in seconds it took for the first response to the issue, if any.","format":"int64","type":"integer"},"business_hours_resolution_seconds":{"description":"The business hours time in seconds it took for the issue to be resolved, if any.","format":"int64","type":"integer"},"business_hours_time_in_status_seconds":{"additionalProperties":{"format":"int64","type":"integer"},"description":"A map of status slug to the business hours time in seconds the issue has spent in that status. Includes both base statuses (e.g. \"new\", \"waiting_on_you\") and custom statuses.","type":"object"},"chat_widget_info":{"$ref":"#/components/schemas/IssueChatWidgetInfo"},"child_issues":{"description":"The child issues in this group, if this issue is an issue group.","items":{"$ref":"#/components/schemas/MiniIssue"},"type":"array"},"created_at":{"description":"The time the issue was created.","format":"date-time","type":"string"},"csat_responses":{"description":"The CSAT responses of the issue, if any.","items":{"$ref":"#/components/schemas/CSATResponse"},"type":"array"},"custom_fields":{"additionalProperties":{"$ref":"#/components/schemas/CustomFieldValue"},"description":"Custom field values associated with the issue.","nullable":true,"type":"object"},"customer_portal_visible":{"description":"Whether the issue is visible in the customer portal.","type":"boolean"},"external_incidents":{"description":"Incidents from incident.io or Rootly linked to this issue.","items":{"$ref":"#/components/schemas/ExternalIncident"},"type":"array"},"external_issues":{"description":"The external issues associated with the issue, if any.","items":{"$ref":"#/components/schemas/ExternalIssue"},"type":"array"},"first_resolution_time":{"description":"The time of the first resolution of the issue, if any. Frozen at the issue's first resolution and never updated on reopen/re-resolve.","format":"date-time","nullable":true,"type":"string"},"first_response_breach_time":{"description":"The time by which the issue's first response SLA will breach, if any. Only present for issues with an active first response SLA.","format":"date-time","type":"string"},"first_response_seconds":{"description":"The time in seconds it took for the first response to the issue, if any.","format":"int64","type":"integer"},"first_response_time":{"description":"The time of the first response to the issue, if any.","format":"date-time","nullable":true,"type":"string"},"id":{"description":"The ID of the issue.","type":"string"},"is_issue_group":{"description":"Whether this issue is an issue group.","type":"boolean"},"latest_message_time":{"description":"The time of the latest message in the issue, if any.","format":"date-time","nullable":true,"type":"string"},"link":{"description":"The link to the issue in Pylon.","type":"string"},"number":{"description":"The number of the issue.","format":"int64","type":"integer"},"number_of_touches":{"description":"The number of times the issue has been touched.","format":"int64","type":"integer"},"parent_issue_group":{"$ref":"#/components/schemas/MiniIssue"},"requester":{"allOf":[{"$ref":"#/components/schemas/MiniContact"}],"nullable":true},"resolution_breach_time":{"description":"The time by which the issue's resolution SLA will breach, if any. Only present for open issues with an active resolution SLA.","format":"date-time","type":"string"},"resolution_seconds":{"description":"The time in seconds it took for the issue to be resolved, if any.","format":"int64","type":"integer"},"resolution_time":{"description":"The time of the resolution of the issue, if any.","format":"date-time","nullable":true,"type":"string"},"slack":{"$ref":"#/components/schemas/SlackInfo"},"snoozed_until_time":{"description":"The time the issue was snoozed until in RFC3339 format, if any.","format":"date-time","type":"string"},"source":{"description":"The source of the issue.\n\nKnown values: `slack`, `microsoft_teams`, `microsoft_teams_chat`, `chat_widget`, `customer_portal`, `email`, `manual`, `form`, `discord`, `google_chat`, `whatsapp`, `sms`, `telegram`, `phone`. This list is not exhaustive.","type":"string"},"state":{"description":"The state of the issue. Standard values are `new`, `waiting_on_you`, `waiting_on_customer`, `on_hold`, and `closed`; custom status slugs are also supported.","type":"string"},"tags":{"description":"Tags associated with the issue.","items":{"type":"string"},"nullable":true,"type":"array"},"team":{"allOf":[{"$ref":"#/components/schemas/MiniTeam"}],"nullable":true},"team_slas":{"description":"The team-scoped SLAs on the issue, if any. One entry per team, mirroring the issue-level first response and resolution SLA fields.","items":{"$ref":"#/components/schemas/TeamSLA"},"type":"array"},"time_in_status_seconds":{"additionalProperties":{"format":"int64","type":"integer"},"description":"A map of status slug to the time in seconds the issue has spent in that status. Includes both base statuses (e.g. \"new\", \"waiting_on_you\") and custom statuses.","type":"object"},"title":{"description":"The title of the issue.","type":"string"},"type":{"description":"The type of the issue.\n\nKnown values: `conversation`, `ticket`. This list is not exhaustive.","type":"string"},"updated_at":{"description":"The time the issue was last updated.","format":"date-time","type":"string"},"workspace_email":{"description":"The email address connected to the Pylon workspace through which the issue's email conversation is routed. For inbound issues, this is the address that received the original email.","type":"string"}},"required":["body_html","created_at","customer_portal_visible","id","is_issue_group","link","number","number_of_touches","source","state","title","type","updated_at"],"type":"object"},"MiniAccount":{"properties":{"external_ids":{"description":"External IDs associated with the account.","items":{"$ref":"#/components/schemas/ExternalID"},"nullable":true,"type":"array"},"id":{"description":"The ID of the account.","type":"string"}},"required":["id"],"type":"object"},"ExternalID":{"properties":{"external_id":{"description":"The external ID. Must be unique per object type (ex. account).","type":"string"},"label":{"description":"The label of the external ID. Must be unique per object.","type":"string"}},"type":"object"},"ActiveTimeByUser":{"properties":{"active_time_seconds":{"description":"The user's active time on the issue in seconds.","format":"int64","type":"integer"},"business_hours_active_time_seconds":{"description":"The user's business-hours active time on the issue in seconds.","format":"int64","type":"integer"},"user_id":{"description":"The ID of the user who spent the time.","type":"string"}},"required":["active_time_seconds","business_hours_active_time_seconds","user_id"],"type":"object"},"MiniUser":{"properties":{"email":{"description":"The email of the user.","type":"string"},"id":{"description":"The ID of the user.","type":"string"}},"required":["id"],"type":"object"},"IssueChatWidgetInfo":{"properties":{"page_url":{"description":"The URL of the page that the user was on when they started the chat widget issue.","type":"string"}},"required":["page_url"],"type":"object"},"MiniIssue":{"properties":{"id":{"description":"The ID of the issue.","type":"string"},"number":{"description":"The number of the issue.","format":"int64","type":"integer"},"title":{"description":"The title of the issue.","type":"string"}},"required":["id","number","title"],"type":"object"},"CSATResponse":{"properties":{"comment":{"description":"The comment of the CSAT response.","nullable":true,"type":"string"},"score":{"description":"The score of the CSAT response.","format":"int64","type":"integer"}},"required":["score"],"type":"object"},"ExternalIncident":{"properties":{"external_id":{"description":"The incident system's own ID for the incident, when known.","type":"string"},"link":{"description":"Link to the incident, when known.","type":"string"},"reference":{"description":"The incident's reference in the incident system, such as INC-123 or ROOT-123.","type":"string"},"source":{"description":"The incident system the incident belongs to.\n\nKnown values: `incident_io`, `rootly`. This list is not exhaustive.","type":"string"}},"required":["reference","source"],"type":"object"},"ExternalIssue":{"properties":{"external_id":{"description":"The external ID of the external issue.\nJira: ID of the issue (autoincrementing number from 10000).\nGitHub: Owner/Repo/IssueID.\nLinear: ID of the issue (UUID).\nAsana: ID of the task (Long number).","type":"string"},"link":{"description":"Link to the product issue.","type":"string"},"source":{"description":"The source of the external issue.","type":"string"}},"required":["external_id","link","source"],"type":"object"},"MiniContact":{"properties":{"email":{"description":"The email of the contact.","type":"string"},"id":{"description":"The ID of the contact.","type":"string"}},"required":["id"],"type":"object"},"SlackInfo":{"properties":{"channel_id":{"description":"The Slack channel ID associated with the issue.","type":"string"},"message_ts":{"description":"The root message ID of slack message that started issue.","type":"string"},"workspace_id":{"description":"The Slack workspace ID associated with the issue.","type":"string"}},"required":["channel_id","message_ts","workspace_id"],"type":"object"},"MiniTeam":{"properties":{"id":{"description":"The ID of the team.","type":"string"}},"required":["id"],"type":"object"},"TeamSLA":{"properties":{"first_resolution":{"$ref":"#/components/schemas/SLATimes"},"first_response":{"$ref":"#/components/schemas/SLATimes"},"resolution":{"$ref":"#/components/schemas/SLATimes"},"team_id":{"description":"The ID of the team these are scoped to.","type":"string"}},"required":["team_id"],"type":"object"},"SLATimes":{"properties":{"breach_time":{"description":"The time at which it breaches (or has breached), if any.","format":"date-time","type":"string"},"business_hours_seconds":{"description":"The elapsed business-hours time in seconds, if any.","format":"int64","type":"integer"},"seconds":{"description":"The elapsed time in seconds, if any.","format":"int64","type":"integer"},"time":{"description":"The time it was reached, if any.","format":"date-time","nullable":true,"type":"string"}},"type":"object"},"ErrorApiResponseBody":{"properties":{"code":{"description":"A stable machine-readable identifier for this failure, safe to branch on\ninstead of the message text. Omitted when the failure has no assigned code.\n\nKnown values: `recipients_suppressed`, `email_bounced`, `internal_issue_reply_not_allowed`, `duplicate_object`, `invalid_authorization_header`, `invalid_api_token`, `invalid_oauth_token`, `wrong_region_token`, `organization_deactivated`, `organization_suspended`, `permission_denied`, `oauth_not_permitted`, `rate_limited`, `not_found`, `method_not_allowed`, `payload_too_large`, `invalid_request_body`, `internal_error`, `invalid_webhook_credentials`, `organization_inactive`. This list is not exhaustive.","type":"string"},"errors":{"description":"The list of errors.","items":{"type":"string"},"type":"array"},"exists_id":{"description":"The ID of the object that already exists if this is a duplicate object error.","type":"string"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"required":["request_id"],"type":"object"}},"responses":{"UpdateIssueResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateIssueResponseBody"}}},"description":""},"BadRequestApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request was invalid or could not be completed."},"UnauthorizedApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request could not be authenticated for this API."},"ForbiddenApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The authenticated caller or organization is not allowed to access this endpoint or operation."},"ErrorApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":""},"TooManyRequestsApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request exceeded the applicable rate limit.","headers":{"Retry-After":{"description":"Seconds until the next request to this endpoint is permitted.","schema":{"format":"int64","type":"integer"}},"X-Retry-After":{"description":"Seconds until the full per-minute allowance is restored. Capacity returns gradually before then.","schema":{"format":"int64","type":"integer"}}}},"InternalServerErrorApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"An unexpected internal error occurred."}}},"paths":{"/issues/{id}":{"patch":{"description":"Updates an existing issue. Only provided fields are modified.\n\n**Rate limit:** 120 requests per minute","operationId":"UpdateIssue","parameters":[{"description":"The ID of the issue to update.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateIssueRequestBody"}}}},"responses":{"200":{"$ref":"#/components/responses/UpdateIssueResponse"},"400":{"$ref":"#/components/responses/BadRequestApiResponse"},"401":{"$ref":"#/components/responses/UnauthorizedApiResponse"},"403":{"$ref":"#/components/responses/ForbiddenApiResponse"},"404":{"$ref":"#/components/responses/ErrorApiResponse"},"429":{"$ref":"#/components/responses/TooManyRequestsApiResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorApiResponse"}},"summary":"Update an existing issue","tags":["issues"]}}}}
```

## Delete an existing issue

> Permanently deletes an issue by ID.\
> \
> \*\*Rate limit:\*\* 120 requests per minute

```json
{"openapi":"3.0.3","info":{"title":"Pylon API.","version":"1.0.0"},"tags":[],"servers":[{"description":"US region","url":"https://api.usepylon.com"},{"description":"EU region","url":"https://api.eu.usepylon.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"description":"Authorization: Bearer <token>","scheme":"bearer","type":"http"}},"responses":{"DeleteIssueResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteIssueResponseBody"}}},"description":""},"UnauthorizedApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request could not be authenticated for this API."},"ForbiddenApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The authenticated caller or organization is not allowed to access this endpoint or operation."},"TooManyRequestsApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request exceeded the applicable rate limit.","headers":{"Retry-After":{"description":"Seconds until the next request to this endpoint is permitted.","schema":{"format":"int64","type":"integer"}},"X-Retry-After":{"description":"Seconds until the full per-minute allowance is restored. Capacity returns gradually before then.","schema":{"format":"int64","type":"integer"}}}},"InternalServerErrorApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"An unexpected internal error occurred."}},"schemas":{"DeleteIssueResponseBody":{"properties":{"request_id":{"description":"The request ID for tracking.","type":"string"}},"required":["request_id"],"type":"object"},"ErrorApiResponseBody":{"properties":{"code":{"description":"A stable machine-readable identifier for this failure, safe to branch on\ninstead of the message text. Omitted when the failure has no assigned code.\n\nKnown values: `recipients_suppressed`, `email_bounced`, `internal_issue_reply_not_allowed`, `duplicate_object`, `invalid_authorization_header`, `invalid_api_token`, `invalid_oauth_token`, `wrong_region_token`, `organization_deactivated`, `organization_suspended`, `permission_denied`, `oauth_not_permitted`, `rate_limited`, `not_found`, `method_not_allowed`, `payload_too_large`, `invalid_request_body`, `internal_error`, `invalid_webhook_credentials`, `organization_inactive`. This list is not exhaustive.","type":"string"},"errors":{"description":"The list of errors.","items":{"type":"string"},"type":"array"},"exists_id":{"description":"The ID of the object that already exists if this is a duplicate object error.","type":"string"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"required":["request_id"],"type":"object"}}},"paths":{"/issues/{id}":{"delete":{"description":"Permanently deletes an issue by ID.\n\n**Rate limit:** 120 requests per minute","operationId":"DeleteIssue","parameters":[{"description":"The ID of the issue to delete.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/DeleteIssueResponse"},"401":{"$ref":"#/components/responses/UnauthorizedApiResponse"},"403":{"$ref":"#/components/responses/ForbiddenApiResponse"},"429":{"$ref":"#/components/responses/TooManyRequestsApiResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorApiResponse"}},"summary":"Delete an existing issue","tags":["issues"]}}}}
```

## Search for issues by a given filter

> Filterable fields and their allowed operators:\
> \
> &#x20;Field | Allowed operators |\
> &#x20;\--- | --- |\
> &#x20;\`created\_at\` | \`time\_is\_after\`, \`time\_is\_before\`, \`time\_range\` |\
> &#x20;\`account\_id\` | \`equals\`, \`in\`, \`not\_in\`, \`is\_set\`, \`is\_unset\` |\
> &#x20;\`customer\_portal\_visible\` | \`equals\`, \`in\`, \`not\_in\` |\
> &#x20;\`ticket\_form\_id\` | \`equals\`, \`in\`, \`not\_in\`, \`is\_set\`, \`is\_unset\` |\
> &#x20;\`requester\_id\` | \`equals\`, \`in\`, \`not\_in\`, \`is\_set\`, \`is\_unset\` |\
> &#x20;\`follower\_user\_id\` | \`equals\`, \`in\`, \`not\_in\` |\
> &#x20;\`follower\_contact\_id\` | \`equals\`, \`in\`, \`not\_in\` |\
> &#x20;\`state\` | \`equals\`, \`in\`, \`not\_in\` |\
> &#x20;\`tags\` | \`contains\`, \`does\_not\_contain\`, \`in\`, \`not\_in\` |\
> &#x20;\`title\` | \`string\_contains\`, \`string\_does\_not\_contain\` |\
> &#x20;\`body\_html\` | \`string\_contains\`, \`string\_does\_not\_contain\` |\
> &#x20;\`assignee\_id\` | \`equals\`, \`in\`, \`not\_in\`, \`is\_set\`, \`is\_unset\` |\
> &#x20;\`team\_id\` | \`equals\`, \`in\`, \`not\_in\` |\
> &#x20;\`issue\_type\` | \`equals\`, \`in\`, \`not\_in\`, \`is\_set\`, \`is\_unset\` |\
> &#x20;\`issue\_is\_issue\_group\` | \`equals\`, \`in\`, \`not\_in\` |\
> &#x20;\`resolved\_at\` | \`time\_is\_after\`, \`time\_is\_before\`, \`time\_range\` |\
> &#x20;\`latest\_message\_activity\_at\` | \`time\_is\_after\`, \`time\_is\_before\`, \`time\_range\` |\
> &#x20;\`updated\_at\` | \`time\_is\_after\`, \`time\_is\_before\`, \`time\_range\` |\
> &#x20;\`slack\_channel\_id\` | \`equals\`, \`in\`, \`not\_in\` |\
> &#x20;\`workspace\_email\` | \`equals\`, \`in\`, \`not\_in\`, \`is\_set\`, \`is\_unset\` |\
> &#x20;\`reopened\` | \`equals\`, \`in\`, \`not\_in\` |\
> \
> Timestamp values use RFC3339 format. Standard \`state\` values are \`new\`, \`waiting\_on\_you\`, \`waiting\_on\_customer\`, \`on\_hold\`, and \`closed\`; custom status slugs are also supported. \`issue\_type\` values are \`conversation\` and \`ticket\`.\
> \
> For tag filters, pass the tag name. For custom fields, pass the field slug as \`field\`. \`slack\_channel\_id\` identifies the Slack channel where the issue was created. \`workspace\_email\` identifies the email address connected to the Pylon workspace through which the issue's email conversation is routed. \`customer\_portal\_visible\` values are \`true\` and \`false\`; issue groups are never visible in the customer portal, so they always match \`false\`. \`reopened\` values are \`true\` and \`false\`; it is a sticky flag set the first time an issue is reopened after being resolved, and it records no timestamp.\
> \
> \*\*Rate limit:\*\* 120 requests per minute

```json
{"openapi":"3.0.3","info":{"title":"Pylon API.","version":"1.0.0"},"tags":[],"servers":[{"description":"US region","url":"https://api.usepylon.com"},{"description":"EU region","url":"https://api.eu.usepylon.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"description":"Authorization: Bearer <token>","scheme":"bearer","type":"http"}},"schemas":{"SearchIssuesRequest":{"properties":{"cursor":{"description":"The cursor to use for pagination.","type":"string"},"filter":{"$ref":"#/components/schemas/Filter"},"limit":{"description":"The number of issues to fetch. Defaults to 100. Must be between 1 and 1000.","format":"int64","type":"integer"},"search_text":{"description":"Fuzzy text search. Results are intersected with any provided filter.","type":"string"}},"type":"object"},"Filter":{"properties":{"field":{"description":"The field for this filter.  For allowed fields, see the documentation for\nthe specific endpoint you are using.\nFor non-compound filters (any operators other than \"and\" or \"or\"),\nfield must be set, along with either value or values, depending on the operator.","type":"string"},"operator":{"description":"The operator for this filter.","enum":["equals","not_equals","contains","does_not_contain","in","not_in","and","or","time_is_after","time_is_before","time_range","string_contains","string_does_not_contain","is_set","is_unset","greater_than","less_than","greater_than_or_equals","less_than_or_equals","includes_all_of","starts_with","ends_with"],"type":"string"},"subfilters":{"description":"Sub-filters for this filter.  Valid only when operator is \"and\" or \"or\".\nThe maximum allowed depth for a tree of filters is 3, counting the top-level filter.","items":{"$ref":"#/components/schemas/Filter"},"type":"array"},"value":{"description":"The value for this filter. Used by single-valued operators: \"equals\", \"not_equals\",\n\"contains\", \"does_not_contain\", \"string_contains\", \"string_does_not_contain\",\n\"starts_with\", \"ends_with\", \"time_is_after\", \"time_is_before\", \"greater_than\",\n\"less_than\", \"greater_than_or_equals\", and \"less_than_or_equals\".","type":"string"},"values":{"description":"The values for this filter. Used by multi-valued operators: \"in\", \"not_in\", and\n\"includes_all_of\". For \"time_range\", set to [start, end].","items":{"type":"string"},"type":"array"}},"required":["operator"],"type":"object"},"SearchIssuesResponseBody":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Issue"},"type":"array"},"pagination":{"$ref":"#/components/schemas/Pagination"},"request_id":{"type":"string"}},"required":["data","request_id"],"type":"object"},"Issue":{"properties":{"account":{"allOf":[{"$ref":"#/components/schemas/MiniAccount"}],"nullable":true},"active_time_by_user":{"description":"Active time spent on the issue broken down per user, if any.","items":{"$ref":"#/components/schemas/ActiveTimeByUser"},"type":"array"},"active_time_seconds":{"description":"The total active time spent on the issue in seconds, if any. Equals the sum of the per-user active time.","format":"int64","type":"integer"},"assignee":{"allOf":[{"$ref":"#/components/schemas/MiniUser"}],"nullable":true},"attachment_urls":{"description":"The attachment URLs attached to this issue, if any. Signed download URLs. Fetch with a plain GET, no Authorization header.","items":{"type":"string"},"type":"array"},"author_unverified":{"description":"Whether any message on the issue has an unverified author identity. True if any message author's identity has NOT been verified (e.g., from public forms).","type":"boolean"},"body_html":{"description":"The body of the issue in HTML format.","type":"string"},"business_hours_active_time_seconds":{"description":"The total business-hours active time spent on the issue in seconds, if any. Equals the sum of the per-user business-hours active time.","format":"int64","type":"integer"},"business_hours_first_response_seconds":{"description":"The business hours time in seconds it took for the first response to the issue, if any.","format":"int64","type":"integer"},"business_hours_resolution_seconds":{"description":"The business hours time in seconds it took for the issue to be resolved, if any.","format":"int64","type":"integer"},"business_hours_time_in_status_seconds":{"additionalProperties":{"format":"int64","type":"integer"},"description":"A map of status slug to the business hours time in seconds the issue has spent in that status. Includes both base statuses (e.g. \"new\", \"waiting_on_you\") and custom statuses.","type":"object"},"chat_widget_info":{"$ref":"#/components/schemas/IssueChatWidgetInfo"},"child_issues":{"description":"The child issues in this group, if this issue is an issue group.","items":{"$ref":"#/components/schemas/MiniIssue"},"type":"array"},"created_at":{"description":"The time the issue was created.","format":"date-time","type":"string"},"csat_responses":{"description":"The CSAT responses of the issue, if any.","items":{"$ref":"#/components/schemas/CSATResponse"},"type":"array"},"custom_fields":{"additionalProperties":{"$ref":"#/components/schemas/CustomFieldValue"},"description":"Custom field values associated with the issue.","nullable":true,"type":"object"},"customer_portal_visible":{"description":"Whether the issue is visible in the customer portal.","type":"boolean"},"external_incidents":{"description":"Incidents from incident.io or Rootly linked to this issue.","items":{"$ref":"#/components/schemas/ExternalIncident"},"type":"array"},"external_issues":{"description":"The external issues associated with the issue, if any.","items":{"$ref":"#/components/schemas/ExternalIssue"},"type":"array"},"first_resolution_time":{"description":"The time of the first resolution of the issue, if any. Frozen at the issue's first resolution and never updated on reopen/re-resolve.","format":"date-time","nullable":true,"type":"string"},"first_response_breach_time":{"description":"The time by which the issue's first response SLA will breach, if any. Only present for issues with an active first response SLA.","format":"date-time","type":"string"},"first_response_seconds":{"description":"The time in seconds it took for the first response to the issue, if any.","format":"int64","type":"integer"},"first_response_time":{"description":"The time of the first response to the issue, if any.","format":"date-time","nullable":true,"type":"string"},"id":{"description":"The ID of the issue.","type":"string"},"is_issue_group":{"description":"Whether this issue is an issue group.","type":"boolean"},"latest_message_time":{"description":"The time of the latest message in the issue, if any.","format":"date-time","nullable":true,"type":"string"},"link":{"description":"The link to the issue in Pylon.","type":"string"},"number":{"description":"The number of the issue.","format":"int64","type":"integer"},"number_of_touches":{"description":"The number of times the issue has been touched.","format":"int64","type":"integer"},"parent_issue_group":{"$ref":"#/components/schemas/MiniIssue"},"requester":{"allOf":[{"$ref":"#/components/schemas/MiniContact"}],"nullable":true},"resolution_breach_time":{"description":"The time by which the issue's resolution SLA will breach, if any. Only present for open issues with an active resolution SLA.","format":"date-time","type":"string"},"resolution_seconds":{"description":"The time in seconds it took for the issue to be resolved, if any.","format":"int64","type":"integer"},"resolution_time":{"description":"The time of the resolution of the issue, if any.","format":"date-time","nullable":true,"type":"string"},"slack":{"$ref":"#/components/schemas/SlackInfo"},"snoozed_until_time":{"description":"The time the issue was snoozed until in RFC3339 format, if any.","format":"date-time","type":"string"},"source":{"description":"The source of the issue.\n\nKnown values: `slack`, `microsoft_teams`, `microsoft_teams_chat`, `chat_widget`, `customer_portal`, `email`, `manual`, `form`, `discord`, `google_chat`, `whatsapp`, `sms`, `telegram`, `phone`. This list is not exhaustive.","type":"string"},"state":{"description":"The state of the issue. Standard values are `new`, `waiting_on_you`, `waiting_on_customer`, `on_hold`, and `closed`; custom status slugs are also supported.","type":"string"},"tags":{"description":"Tags associated with the issue.","items":{"type":"string"},"nullable":true,"type":"array"},"team":{"allOf":[{"$ref":"#/components/schemas/MiniTeam"}],"nullable":true},"team_slas":{"description":"The team-scoped SLAs on the issue, if any. One entry per team, mirroring the issue-level first response and resolution SLA fields.","items":{"$ref":"#/components/schemas/TeamSLA"},"type":"array"},"time_in_status_seconds":{"additionalProperties":{"format":"int64","type":"integer"},"description":"A map of status slug to the time in seconds the issue has spent in that status. Includes both base statuses (e.g. \"new\", \"waiting_on_you\") and custom statuses.","type":"object"},"title":{"description":"The title of the issue.","type":"string"},"type":{"description":"The type of the issue.\n\nKnown values: `conversation`, `ticket`. This list is not exhaustive.","type":"string"},"updated_at":{"description":"The time the issue was last updated.","format":"date-time","type":"string"},"workspace_email":{"description":"The email address connected to the Pylon workspace through which the issue's email conversation is routed. For inbound issues, this is the address that received the original email.","type":"string"}},"required":["body_html","created_at","customer_portal_visible","id","is_issue_group","link","number","number_of_touches","source","state","title","type","updated_at"],"type":"object"},"MiniAccount":{"properties":{"external_ids":{"description":"External IDs associated with the account.","items":{"$ref":"#/components/schemas/ExternalID"},"nullable":true,"type":"array"},"id":{"description":"The ID of the account.","type":"string"}},"required":["id"],"type":"object"},"ExternalID":{"properties":{"external_id":{"description":"The external ID. Must be unique per object type (ex. account).","type":"string"},"label":{"description":"The label of the external ID. Must be unique per object.","type":"string"}},"type":"object"},"ActiveTimeByUser":{"properties":{"active_time_seconds":{"description":"The user's active time on the issue in seconds.","format":"int64","type":"integer"},"business_hours_active_time_seconds":{"description":"The user's business-hours active time on the issue in seconds.","format":"int64","type":"integer"},"user_id":{"description":"The ID of the user who spent the time.","type":"string"}},"required":["active_time_seconds","business_hours_active_time_seconds","user_id"],"type":"object"},"MiniUser":{"properties":{"email":{"description":"The email of the user.","type":"string"},"id":{"description":"The ID of the user.","type":"string"}},"required":["id"],"type":"object"},"IssueChatWidgetInfo":{"properties":{"page_url":{"description":"The URL of the page that the user was on when they started the chat widget issue.","type":"string"}},"required":["page_url"],"type":"object"},"MiniIssue":{"properties":{"id":{"description":"The ID of the issue.","type":"string"},"number":{"description":"The number of the issue.","format":"int64","type":"integer"},"title":{"description":"The title of the issue.","type":"string"}},"required":["id","number","title"],"type":"object"},"CSATResponse":{"properties":{"comment":{"description":"The comment of the CSAT response.","nullable":true,"type":"string"},"score":{"description":"The score of the CSAT response.","format":"int64","type":"integer"}},"required":["score"],"type":"object"},"CustomFieldValue":{"description":"A custom field value to set. Custom fields not listed in a write request are left unchanged.","properties":{"slug":{"description":"The slug of the custom field.","type":"string"},"value":{"description":"The value of the custom field. Only to be used for single-valued custom fields. If unset, the custom field will be unset. If the custom field is a select field, the value must be the select option slug, which you can find from the GET /custom-fields endpoint. If the custom field is a relationship field, the value must be the related object ID.","type":"string"},"values":{"description":"The values of the custom field. Only to be used for multi-valued custom fields (ex. multiselect). Replaces the full selection; it does not add to or remove from the existing values. If unset, the custom field will be unset. If the custom field is a multiselect field, the values must be the select option slugs which you can find from the GET /custom-fields endpoint.","items":{"type":"string"},"type":"array"}},"title":"CustomFieldValue","type":"object"},"ExternalIncident":{"properties":{"external_id":{"description":"The incident system's own ID for the incident, when known.","type":"string"},"link":{"description":"Link to the incident, when known.","type":"string"},"reference":{"description":"The incident's reference in the incident system, such as INC-123 or ROOT-123.","type":"string"},"source":{"description":"The incident system the incident belongs to.\n\nKnown values: `incident_io`, `rootly`. This list is not exhaustive.","type":"string"}},"required":["reference","source"],"type":"object"},"ExternalIssue":{"properties":{"external_id":{"description":"The external ID of the external issue.\nJira: ID of the issue (autoincrementing number from 10000).\nGitHub: Owner/Repo/IssueID.\nLinear: ID of the issue (UUID).\nAsana: ID of the task (Long number).","type":"string"},"link":{"description":"Link to the product issue.","type":"string"},"source":{"description":"The source of the external issue.","type":"string"}},"required":["external_id","link","source"],"type":"object"},"MiniContact":{"properties":{"email":{"description":"The email of the contact.","type":"string"},"id":{"description":"The ID of the contact.","type":"string"}},"required":["id"],"type":"object"},"SlackInfo":{"properties":{"channel_id":{"description":"The Slack channel ID associated with the issue.","type":"string"},"message_ts":{"description":"The root message ID of slack message that started issue.","type":"string"},"workspace_id":{"description":"The Slack workspace ID associated with the issue.","type":"string"}},"required":["channel_id","message_ts","workspace_id"],"type":"object"},"MiniTeam":{"properties":{"id":{"description":"The ID of the team.","type":"string"}},"required":["id"],"type":"object"},"TeamSLA":{"properties":{"first_resolution":{"$ref":"#/components/schemas/SLATimes"},"first_response":{"$ref":"#/components/schemas/SLATimes"},"resolution":{"$ref":"#/components/schemas/SLATimes"},"team_id":{"description":"The ID of the team these are scoped to.","type":"string"}},"required":["team_id"],"type":"object"},"SLATimes":{"properties":{"breach_time":{"description":"The time at which it breaches (or has breached), if any.","format":"date-time","type":"string"},"business_hours_seconds":{"description":"The elapsed business-hours time in seconds, if any.","format":"int64","type":"integer"},"seconds":{"description":"The elapsed time in seconds, if any.","format":"int64","type":"integer"},"time":{"description":"The time it was reached, if any.","format":"date-time","nullable":true,"type":"string"}},"type":"object"},"Pagination":{"description":"Pagination information for list responses. Absent when there are no more results.","properties":{"cursor":{"description":"The cursor for the next page of results.","type":"string"},"has_next_page":{"description":"Indicates if there is a next page of results.","type":"boolean"}},"required":["cursor","has_next_page"],"title":"Pagination","type":"object"},"ErrorApiResponseBody":{"properties":{"code":{"description":"A stable machine-readable identifier for this failure, safe to branch on\ninstead of the message text. Omitted when the failure has no assigned code.\n\nKnown values: `recipients_suppressed`, `email_bounced`, `internal_issue_reply_not_allowed`, `duplicate_object`, `invalid_authorization_header`, `invalid_api_token`, `invalid_oauth_token`, `wrong_region_token`, `organization_deactivated`, `organization_suspended`, `permission_denied`, `oauth_not_permitted`, `rate_limited`, `not_found`, `method_not_allowed`, `payload_too_large`, `invalid_request_body`, `internal_error`, `invalid_webhook_credentials`, `organization_inactive`. This list is not exhaustive.","type":"string"},"errors":{"description":"The list of errors.","items":{"type":"string"},"type":"array"},"exists_id":{"description":"The ID of the object that already exists if this is a duplicate object error.","type":"string"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"required":["request_id"],"type":"object"}},"responses":{"SearchIssuesResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchIssuesResponseBody"}}},"description":""},"BadRequestApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request was invalid or could not be completed."},"UnauthorizedApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request could not be authenticated for this API."},"ForbiddenApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The authenticated caller or organization is not allowed to access this endpoint or operation."},"ErrorApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":""},"TooManyRequestsApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request exceeded the applicable rate limit.","headers":{"Retry-After":{"description":"Seconds until the next request to this endpoint is permitted.","schema":{"format":"int64","type":"integer"}},"X-Retry-After":{"description":"Seconds until the full per-minute allowance is restored. Capacity returns gradually before then.","schema":{"format":"int64","type":"integer"}}}},"InternalServerErrorApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"An unexpected internal error occurred."}}},"paths":{"/issues/search":{"post":{"description":"Filterable fields and their allowed operators:\n\n Field | Allowed operators |\n --- | --- |\n `created_at` | `time_is_after`, `time_is_before`, `time_range` |\n `account_id` | `equals`, `in`, `not_in`, `is_set`, `is_unset` |\n `customer_portal_visible` | `equals`, `in`, `not_in` |\n `ticket_form_id` | `equals`, `in`, `not_in`, `is_set`, `is_unset` |\n `requester_id` | `equals`, `in`, `not_in`, `is_set`, `is_unset` |\n `follower_user_id` | `equals`, `in`, `not_in` |\n `follower_contact_id` | `equals`, `in`, `not_in` |\n `state` | `equals`, `in`, `not_in` |\n `tags` | `contains`, `does_not_contain`, `in`, `not_in` |\n `title` | `string_contains`, `string_does_not_contain` |\n `body_html` | `string_contains`, `string_does_not_contain` |\n `assignee_id` | `equals`, `in`, `not_in`, `is_set`, `is_unset` |\n `team_id` | `equals`, `in`, `not_in` |\n `issue_type` | `equals`, `in`, `not_in`, `is_set`, `is_unset` |\n `issue_is_issue_group` | `equals`, `in`, `not_in` |\n `resolved_at` | `time_is_after`, `time_is_before`, `time_range` |\n `latest_message_activity_at` | `time_is_after`, `time_is_before`, `time_range` |\n `updated_at` | `time_is_after`, `time_is_before`, `time_range` |\n `slack_channel_id` | `equals`, `in`, `not_in` |\n `workspace_email` | `equals`, `in`, `not_in`, `is_set`, `is_unset` |\n `reopened` | `equals`, `in`, `not_in` |\n\nTimestamp values use RFC3339 format. Standard `state` values are `new`, `waiting_on_you`, `waiting_on_customer`, `on_hold`, and `closed`; custom status slugs are also supported. `issue_type` values are `conversation` and `ticket`.\n\nFor tag filters, pass the tag name. For custom fields, pass the field slug as `field`. `slack_channel_id` identifies the Slack channel where the issue was created. `workspace_email` identifies the email address connected to the Pylon workspace through which the issue's email conversation is routed. `customer_portal_visible` values are `true` and `false`; issue groups are never visible in the customer portal, so they always match `false`. `reopened` values are `true` and `false`; it is a sticky flag set the first time an issue is reopened after being resolved, and it records no timestamp.\n\n**Rate limit:** 120 requests per minute","operationId":"SearchIssues","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchIssuesRequest"}}}},"responses":{"200":{"$ref":"#/components/responses/SearchIssuesResponse"},"400":{"$ref":"#/components/responses/BadRequestApiResponse"},"401":{"$ref":"#/components/responses/UnauthorizedApiResponse"},"403":{"$ref":"#/components/responses/ForbiddenApiResponse"},"404":{"$ref":"#/components/responses/ErrorApiResponse"},"429":{"$ref":"#/components/responses/TooManyRequestsApiResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorApiResponse"}},"summary":"Search for issues by a given filter","tags":["issues"]}}}}
```

## Snooze an issue

> Snoozes an issue until the specified date and time.\
> \
> \*\*Rate limit:\*\* 120 requests per minute

```json
{"openapi":"3.0.3","info":{"title":"Pylon API.","version":"1.0.0"},"tags":[],"servers":[{"description":"US region","url":"https://api.usepylon.com"},{"description":"EU region","url":"https://api.eu.usepylon.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"description":"Authorization: Bearer <token>","scheme":"bearer","type":"http"}},"schemas":{"SnoozeIssueRequestBody":{"properties":{"snooze_until":{"description":"The date and time to snooze the issue until. (RFC3339)","format":"date-time","type":"string"}},"required":["snooze_until"],"type":"object"},"SnoozeIssueResponseBody":{"properties":{"data":{"$ref":"#/components/schemas/Issue"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"required":["data","request_id"],"type":"object"},"Issue":{"properties":{"account":{"allOf":[{"$ref":"#/components/schemas/MiniAccount"}],"nullable":true},"active_time_by_user":{"description":"Active time spent on the issue broken down per user, if any.","items":{"$ref":"#/components/schemas/ActiveTimeByUser"},"type":"array"},"active_time_seconds":{"description":"The total active time spent on the issue in seconds, if any. Equals the sum of the per-user active time.","format":"int64","type":"integer"},"assignee":{"allOf":[{"$ref":"#/components/schemas/MiniUser"}],"nullable":true},"attachment_urls":{"description":"The attachment URLs attached to this issue, if any. Signed download URLs. Fetch with a plain GET, no Authorization header.","items":{"type":"string"},"type":"array"},"author_unverified":{"description":"Whether any message on the issue has an unverified author identity. True if any message author's identity has NOT been verified (e.g., from public forms).","type":"boolean"},"body_html":{"description":"The body of the issue in HTML format.","type":"string"},"business_hours_active_time_seconds":{"description":"The total business-hours active time spent on the issue in seconds, if any. Equals the sum of the per-user business-hours active time.","format":"int64","type":"integer"},"business_hours_first_response_seconds":{"description":"The business hours time in seconds it took for the first response to the issue, if any.","format":"int64","type":"integer"},"business_hours_resolution_seconds":{"description":"The business hours time in seconds it took for the issue to be resolved, if any.","format":"int64","type":"integer"},"business_hours_time_in_status_seconds":{"additionalProperties":{"format":"int64","type":"integer"},"description":"A map of status slug to the business hours time in seconds the issue has spent in that status. Includes both base statuses (e.g. \"new\", \"waiting_on_you\") and custom statuses.","type":"object"},"chat_widget_info":{"$ref":"#/components/schemas/IssueChatWidgetInfo"},"child_issues":{"description":"The child issues in this group, if this issue is an issue group.","items":{"$ref":"#/components/schemas/MiniIssue"},"type":"array"},"created_at":{"description":"The time the issue was created.","format":"date-time","type":"string"},"csat_responses":{"description":"The CSAT responses of the issue, if any.","items":{"$ref":"#/components/schemas/CSATResponse"},"type":"array"},"custom_fields":{"additionalProperties":{"$ref":"#/components/schemas/CustomFieldValue"},"description":"Custom field values associated with the issue.","nullable":true,"type":"object"},"customer_portal_visible":{"description":"Whether the issue is visible in the customer portal.","type":"boolean"},"external_incidents":{"description":"Incidents from incident.io or Rootly linked to this issue.","items":{"$ref":"#/components/schemas/ExternalIncident"},"type":"array"},"external_issues":{"description":"The external issues associated with the issue, if any.","items":{"$ref":"#/components/schemas/ExternalIssue"},"type":"array"},"first_resolution_time":{"description":"The time of the first resolution of the issue, if any. Frozen at the issue's first resolution and never updated on reopen/re-resolve.","format":"date-time","nullable":true,"type":"string"},"first_response_breach_time":{"description":"The time by which the issue's first response SLA will breach, if any. Only present for issues with an active first response SLA.","format":"date-time","type":"string"},"first_response_seconds":{"description":"The time in seconds it took for the first response to the issue, if any.","format":"int64","type":"integer"},"first_response_time":{"description":"The time of the first response to the issue, if any.","format":"date-time","nullable":true,"type":"string"},"id":{"description":"The ID of the issue.","type":"string"},"is_issue_group":{"description":"Whether this issue is an issue group.","type":"boolean"},"latest_message_time":{"description":"The time of the latest message in the issue, if any.","format":"date-time","nullable":true,"type":"string"},"link":{"description":"The link to the issue in Pylon.","type":"string"},"number":{"description":"The number of the issue.","format":"int64","type":"integer"},"number_of_touches":{"description":"The number of times the issue has been touched.","format":"int64","type":"integer"},"parent_issue_group":{"$ref":"#/components/schemas/MiniIssue"},"requester":{"allOf":[{"$ref":"#/components/schemas/MiniContact"}],"nullable":true},"resolution_breach_time":{"description":"The time by which the issue's resolution SLA will breach, if any. Only present for open issues with an active resolution SLA.","format":"date-time","type":"string"},"resolution_seconds":{"description":"The time in seconds it took for the issue to be resolved, if any.","format":"int64","type":"integer"},"resolution_time":{"description":"The time of the resolution of the issue, if any.","format":"date-time","nullable":true,"type":"string"},"slack":{"$ref":"#/components/schemas/SlackInfo"},"snoozed_until_time":{"description":"The time the issue was snoozed until in RFC3339 format, if any.","format":"date-time","type":"string"},"source":{"description":"The source of the issue.\n\nKnown values: `slack`, `microsoft_teams`, `microsoft_teams_chat`, `chat_widget`, `customer_portal`, `email`, `manual`, `form`, `discord`, `google_chat`, `whatsapp`, `sms`, `telegram`, `phone`. This list is not exhaustive.","type":"string"},"state":{"description":"The state of the issue. Standard values are `new`, `waiting_on_you`, `waiting_on_customer`, `on_hold`, and `closed`; custom status slugs are also supported.","type":"string"},"tags":{"description":"Tags associated with the issue.","items":{"type":"string"},"nullable":true,"type":"array"},"team":{"allOf":[{"$ref":"#/components/schemas/MiniTeam"}],"nullable":true},"team_slas":{"description":"The team-scoped SLAs on the issue, if any. One entry per team, mirroring the issue-level first response and resolution SLA fields.","items":{"$ref":"#/components/schemas/TeamSLA"},"type":"array"},"time_in_status_seconds":{"additionalProperties":{"format":"int64","type":"integer"},"description":"A map of status slug to the time in seconds the issue has spent in that status. Includes both base statuses (e.g. \"new\", \"waiting_on_you\") and custom statuses.","type":"object"},"title":{"description":"The title of the issue.","type":"string"},"type":{"description":"The type of the issue.\n\nKnown values: `conversation`, `ticket`. This list is not exhaustive.","type":"string"},"updated_at":{"description":"The time the issue was last updated.","format":"date-time","type":"string"},"workspace_email":{"description":"The email address connected to the Pylon workspace through which the issue's email conversation is routed. For inbound issues, this is the address that received the original email.","type":"string"}},"required":["body_html","created_at","customer_portal_visible","id","is_issue_group","link","number","number_of_touches","source","state","title","type","updated_at"],"type":"object"},"MiniAccount":{"properties":{"external_ids":{"description":"External IDs associated with the account.","items":{"$ref":"#/components/schemas/ExternalID"},"nullable":true,"type":"array"},"id":{"description":"The ID of the account.","type":"string"}},"required":["id"],"type":"object"},"ExternalID":{"properties":{"external_id":{"description":"The external ID. Must be unique per object type (ex. account).","type":"string"},"label":{"description":"The label of the external ID. Must be unique per object.","type":"string"}},"type":"object"},"ActiveTimeByUser":{"properties":{"active_time_seconds":{"description":"The user's active time on the issue in seconds.","format":"int64","type":"integer"},"business_hours_active_time_seconds":{"description":"The user's business-hours active time on the issue in seconds.","format":"int64","type":"integer"},"user_id":{"description":"The ID of the user who spent the time.","type":"string"}},"required":["active_time_seconds","business_hours_active_time_seconds","user_id"],"type":"object"},"MiniUser":{"properties":{"email":{"description":"The email of the user.","type":"string"},"id":{"description":"The ID of the user.","type":"string"}},"required":["id"],"type":"object"},"IssueChatWidgetInfo":{"properties":{"page_url":{"description":"The URL of the page that the user was on when they started the chat widget issue.","type":"string"}},"required":["page_url"],"type":"object"},"MiniIssue":{"properties":{"id":{"description":"The ID of the issue.","type":"string"},"number":{"description":"The number of the issue.","format":"int64","type":"integer"},"title":{"description":"The title of the issue.","type":"string"}},"required":["id","number","title"],"type":"object"},"CSATResponse":{"properties":{"comment":{"description":"The comment of the CSAT response.","nullable":true,"type":"string"},"score":{"description":"The score of the CSAT response.","format":"int64","type":"integer"}},"required":["score"],"type":"object"},"CustomFieldValue":{"description":"A custom field value to set. Custom fields not listed in a write request are left unchanged.","properties":{"slug":{"description":"The slug of the custom field.","type":"string"},"value":{"description":"The value of the custom field. Only to be used for single-valued custom fields. If unset, the custom field will be unset. If the custom field is a select field, the value must be the select option slug, which you can find from the GET /custom-fields endpoint. If the custom field is a relationship field, the value must be the related object ID.","type":"string"},"values":{"description":"The values of the custom field. Only to be used for multi-valued custom fields (ex. multiselect). Replaces the full selection; it does not add to or remove from the existing values. If unset, the custom field will be unset. If the custom field is a multiselect field, the values must be the select option slugs which you can find from the GET /custom-fields endpoint.","items":{"type":"string"},"type":"array"}},"title":"CustomFieldValue","type":"object"},"ExternalIncident":{"properties":{"external_id":{"description":"The incident system's own ID for the incident, when known.","type":"string"},"link":{"description":"Link to the incident, when known.","type":"string"},"reference":{"description":"The incident's reference in the incident system, such as INC-123 or ROOT-123.","type":"string"},"source":{"description":"The incident system the incident belongs to.\n\nKnown values: `incident_io`, `rootly`. This list is not exhaustive.","type":"string"}},"required":["reference","source"],"type":"object"},"ExternalIssue":{"properties":{"external_id":{"description":"The external ID of the external issue.\nJira: ID of the issue (autoincrementing number from 10000).\nGitHub: Owner/Repo/IssueID.\nLinear: ID of the issue (UUID).\nAsana: ID of the task (Long number).","type":"string"},"link":{"description":"Link to the product issue.","type":"string"},"source":{"description":"The source of the external issue.","type":"string"}},"required":["external_id","link","source"],"type":"object"},"MiniContact":{"properties":{"email":{"description":"The email of the contact.","type":"string"},"id":{"description":"The ID of the contact.","type":"string"}},"required":["id"],"type":"object"},"SlackInfo":{"properties":{"channel_id":{"description":"The Slack channel ID associated with the issue.","type":"string"},"message_ts":{"description":"The root message ID of slack message that started issue.","type":"string"},"workspace_id":{"description":"The Slack workspace ID associated with the issue.","type":"string"}},"required":["channel_id","message_ts","workspace_id"],"type":"object"},"MiniTeam":{"properties":{"id":{"description":"The ID of the team.","type":"string"}},"required":["id"],"type":"object"},"TeamSLA":{"properties":{"first_resolution":{"$ref":"#/components/schemas/SLATimes"},"first_response":{"$ref":"#/components/schemas/SLATimes"},"resolution":{"$ref":"#/components/schemas/SLATimes"},"team_id":{"description":"The ID of the team these are scoped to.","type":"string"}},"required":["team_id"],"type":"object"},"SLATimes":{"properties":{"breach_time":{"description":"The time at which it breaches (or has breached), if any.","format":"date-time","type":"string"},"business_hours_seconds":{"description":"The elapsed business-hours time in seconds, if any.","format":"int64","type":"integer"},"seconds":{"description":"The elapsed time in seconds, if any.","format":"int64","type":"integer"},"time":{"description":"The time it was reached, if any.","format":"date-time","nullable":true,"type":"string"}},"type":"object"},"ErrorApiResponseBody":{"properties":{"code":{"description":"A stable machine-readable identifier for this failure, safe to branch on\ninstead of the message text. Omitted when the failure has no assigned code.\n\nKnown values: `recipients_suppressed`, `email_bounced`, `internal_issue_reply_not_allowed`, `duplicate_object`, `invalid_authorization_header`, `invalid_api_token`, `invalid_oauth_token`, `wrong_region_token`, `organization_deactivated`, `organization_suspended`, `permission_denied`, `oauth_not_permitted`, `rate_limited`, `not_found`, `method_not_allowed`, `payload_too_large`, `invalid_request_body`, `internal_error`, `invalid_webhook_credentials`, `organization_inactive`. This list is not exhaustive.","type":"string"},"errors":{"description":"The list of errors.","items":{"type":"string"},"type":"array"},"exists_id":{"description":"The ID of the object that already exists if this is a duplicate object error.","type":"string"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"required":["request_id"],"type":"object"}},"responses":{"SnoozeIssueResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnoozeIssueResponseBody"}}},"description":""},"BadRequestApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request was invalid or could not be completed."},"UnauthorizedApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request could not be authenticated for this API."},"ForbiddenApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The authenticated caller or organization is not allowed to access this endpoint or operation."},"ErrorApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":""},"TooManyRequestsApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request exceeded the applicable rate limit.","headers":{"Retry-After":{"description":"Seconds until the next request to this endpoint is permitted.","schema":{"format":"int64","type":"integer"}},"X-Retry-After":{"description":"Seconds until the full per-minute allowance is restored. Capacity returns gradually before then.","schema":{"format":"int64","type":"integer"}}}},"InternalServerErrorApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"An unexpected internal error occurred."}}},"paths":{"/issues/{id}/snooze":{"post":{"description":"Snoozes an issue until the specified date and time.\n\n**Rate limit:** 120 requests per minute","operationId":"SnoozeIssue","parameters":[{"description":"The ID or number of the issue to snooze.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnoozeIssueRequestBody"}}}},"responses":{"200":{"$ref":"#/components/responses/SnoozeIssueResponse"},"400":{"$ref":"#/components/responses/BadRequestApiResponse"},"401":{"$ref":"#/components/responses/UnauthorizedApiResponse"},"403":{"$ref":"#/components/responses/ForbiddenApiResponse"},"404":{"$ref":"#/components/responses/ErrorApiResponse"},"429":{"$ref":"#/components/responses/TooManyRequestsApiResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorApiResponse"}},"summary":"Snooze an issue","tags":["issues"]}}}}
```

## Get followers of an issue

> Returns the list of followers for the specified issue.\
> \
> \*\*Rate limit:\*\* 300 requests per minute

```json
{"openapi":"3.0.3","info":{"title":"Pylon API.","version":"1.0.0"},"tags":[],"servers":[{"description":"US region","url":"https://api.usepylon.com"},{"description":"EU region","url":"https://api.eu.usepylon.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"description":"Authorization: Bearer <token>","scheme":"bearer","type":"http"}},"responses":{"GetIssueFollowersResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetIssueFollowersResponseBody"}}},"description":""},"BadRequestApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request was invalid or could not be completed."},"UnauthorizedApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request could not be authenticated for this API."},"ForbiddenApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The authenticated caller or organization is not allowed to access this endpoint or operation."},"ErrorApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":""},"TooManyRequestsApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request exceeded the applicable rate limit.","headers":{"Retry-After":{"description":"Seconds until the next request to this endpoint is permitted.","schema":{"format":"int64","type":"integer"}},"X-Retry-After":{"description":"Seconds until the full per-minute allowance is restored. Capacity returns gradually before then.","schema":{"format":"int64","type":"integer"}}}},"InternalServerErrorApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"An unexpected internal error occurred."}},"schemas":{"GetIssueFollowersResponseBody":{"properties":{"data":{"description":"The data payload of the response.","items":{"$ref":"#/components/schemas/Follower"},"type":"array"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"required":["data","request_id"],"type":"object"},"Follower":{"properties":{"id":{"description":"The ID of the follower. Either a user or contact ID.","type":"string"},"type":{"description":"The type of follower. Either \"user\" or \"contact\".\n\nKnown values: `user`, `contact`. This list is not exhaustive.","type":"string"}},"required":["id","type"],"type":"object"},"ErrorApiResponseBody":{"properties":{"code":{"description":"A stable machine-readable identifier for this failure, safe to branch on\ninstead of the message text. Omitted when the failure has no assigned code.\n\nKnown values: `recipients_suppressed`, `email_bounced`, `internal_issue_reply_not_allowed`, `duplicate_object`, `invalid_authorization_header`, `invalid_api_token`, `invalid_oauth_token`, `wrong_region_token`, `organization_deactivated`, `organization_suspended`, `permission_denied`, `oauth_not_permitted`, `rate_limited`, `not_found`, `method_not_allowed`, `payload_too_large`, `invalid_request_body`, `internal_error`, `invalid_webhook_credentials`, `organization_inactive`. This list is not exhaustive.","type":"string"},"errors":{"description":"The list of errors.","items":{"type":"string"},"type":"array"},"exists_id":{"description":"The ID of the object that already exists if this is a duplicate object error.","type":"string"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"required":["request_id"],"type":"object"}}},"paths":{"/issues/{id}/followers":{"get":{"description":"Returns the list of followers for the specified issue.\n\n**Rate limit:** 300 requests per minute","operationId":"GetIssueFollowers","parameters":[{"description":"The ID or number of the issue to get followers for.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/GetIssueFollowersResponse"},"400":{"$ref":"#/components/responses/BadRequestApiResponse"},"401":{"$ref":"#/components/responses/UnauthorizedApiResponse"},"403":{"$ref":"#/components/responses/ForbiddenApiResponse"},"404":{"$ref":"#/components/responses/ErrorApiResponse"},"429":{"$ref":"#/components/responses/TooManyRequestsApiResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorApiResponse"}},"summary":"Get followers of an issue","tags":["issues"]}}}}
```

## Add or remove followers to/from an issue

> By default, adds followers. To remove followers, set the operation field to "remove".\
> \
> \*\*Rate limit:\*\* 120 requests per minute

```json
{"openapi":"3.0.3","info":{"title":"Pylon API.","version":"1.0.0"},"tags":[],"servers":[{"description":"US region","url":"https://api.usepylon.com"},{"description":"EU region","url":"https://api.eu.usepylon.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"description":"Authorization: Bearer <token>","scheme":"bearer","type":"http"}},"schemas":{"AddIssueFollowersRequestBody":{"properties":{"contact_ids":{"description":"The IDs of contacts to add as followers.","items":{"type":"string"},"type":"array"},"operation":{"description":"Operation to perform. Use \"add\" to add followers (default) or \"remove\" to remove followers.","type":"string"},"user_ids":{"description":"The IDs of users to add as followers.","items":{"type":"string"},"type":"array"}},"type":"object"},"AddIssueFollowersResponseBody":{"properties":{"data":{"description":"The data payload of the response.","items":{"$ref":"#/components/schemas/Follower"},"type":"array"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"required":["data","request_id"],"type":"object"},"Follower":{"properties":{"id":{"description":"The ID of the follower. Either a user or contact ID.","type":"string"},"type":{"description":"The type of follower. Either \"user\" or \"contact\".\n\nKnown values: `user`, `contact`. This list is not exhaustive.","type":"string"}},"required":["id","type"],"type":"object"},"ErrorApiResponseBody":{"properties":{"code":{"description":"A stable machine-readable identifier for this failure, safe to branch on\ninstead of the message text. Omitted when the failure has no assigned code.\n\nKnown values: `recipients_suppressed`, `email_bounced`, `internal_issue_reply_not_allowed`, `duplicate_object`, `invalid_authorization_header`, `invalid_api_token`, `invalid_oauth_token`, `wrong_region_token`, `organization_deactivated`, `organization_suspended`, `permission_denied`, `oauth_not_permitted`, `rate_limited`, `not_found`, `method_not_allowed`, `payload_too_large`, `invalid_request_body`, `internal_error`, `invalid_webhook_credentials`, `organization_inactive`. This list is not exhaustive.","type":"string"},"errors":{"description":"The list of errors.","items":{"type":"string"},"type":"array"},"exists_id":{"description":"The ID of the object that already exists if this is a duplicate object error.","type":"string"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"required":["request_id"],"type":"object"}},"responses":{"AddIssueFollowersResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddIssueFollowersResponseBody"}}},"description":""},"BadRequestApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request was invalid or could not be completed."},"UnauthorizedApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request could not be authenticated for this API."},"ForbiddenApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The authenticated caller or organization is not allowed to access this endpoint or operation."},"ErrorApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":""},"TooManyRequestsApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request exceeded the applicable rate limit.","headers":{"Retry-After":{"description":"Seconds until the next request to this endpoint is permitted.","schema":{"format":"int64","type":"integer"}},"X-Retry-After":{"description":"Seconds until the full per-minute allowance is restored. Capacity returns gradually before then.","schema":{"format":"int64","type":"integer"}}}},"InternalServerErrorApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"An unexpected internal error occurred."}}},"paths":{"/issues/{id}/followers":{"post":{"description":"By default, adds followers. To remove followers, set the operation field to \"remove\".\n\n**Rate limit:** 120 requests per minute","operationId":"AddIssueFollowers","parameters":[{"description":"The ID or number of the issue to add followers to.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddIssueFollowersRequestBody"}}}},"responses":{"200":{"$ref":"#/components/responses/AddIssueFollowersResponse"},"400":{"$ref":"#/components/responses/BadRequestApiResponse"},"401":{"$ref":"#/components/responses/UnauthorizedApiResponse"},"403":{"$ref":"#/components/responses/ForbiddenApiResponse"},"404":{"$ref":"#/components/responses/ErrorApiResponse"},"429":{"$ref":"#/components/responses/TooManyRequestsApiResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorApiResponse"}},"summary":"Add or remove followers to/from an issue","tags":["issues"]}}}}
```

## Link or unlink external issues to/from an issue

> By default, links external issues. To unlink issues, set the operation field to "unlink".\
> \
> \*\*Rate limit:\*\* 120 requests per minute

```json
{"openapi":"3.0.3","info":{"title":"Pylon API.","version":"1.0.0"},"tags":[],"servers":[{"description":"US region","url":"https://api.usepylon.com"},{"description":"EU region","url":"https://api.eu.usepylon.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"description":"Authorization: Bearer <token>","scheme":"bearer","type":"http"}},"schemas":{"LinkExternalIssueRequestBody":{"properties":{"external_issue_id":{"description":"The ID of the external issue in the source system.","type":"string"},"operation":{"description":"Operation to perform. Use \"link\" to link issues (default) or \"unlink\" to unlink issues.","type":"string"},"source":{"description":"The source system of the external issue (e.g., \"linear\", \"asana\", \"jira\", \"github\", \"shortcut\").","type":"string"}},"required":["source","external_issue_id"],"type":"object"},"LinkExternalIssueResponseBody":{"properties":{"data":{"$ref":"#/components/schemas/Issue"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"required":["data","request_id"],"type":"object"},"Issue":{"properties":{"account":{"allOf":[{"$ref":"#/components/schemas/MiniAccount"}],"nullable":true},"active_time_by_user":{"description":"Active time spent on the issue broken down per user, if any.","items":{"$ref":"#/components/schemas/ActiveTimeByUser"},"type":"array"},"active_time_seconds":{"description":"The total active time spent on the issue in seconds, if any. Equals the sum of the per-user active time.","format":"int64","type":"integer"},"assignee":{"allOf":[{"$ref":"#/components/schemas/MiniUser"}],"nullable":true},"attachment_urls":{"description":"The attachment URLs attached to this issue, if any. Signed download URLs. Fetch with a plain GET, no Authorization header.","items":{"type":"string"},"type":"array"},"author_unverified":{"description":"Whether any message on the issue has an unverified author identity. True if any message author's identity has NOT been verified (e.g., from public forms).","type":"boolean"},"body_html":{"description":"The body of the issue in HTML format.","type":"string"},"business_hours_active_time_seconds":{"description":"The total business-hours active time spent on the issue in seconds, if any. Equals the sum of the per-user business-hours active time.","format":"int64","type":"integer"},"business_hours_first_response_seconds":{"description":"The business hours time in seconds it took for the first response to the issue, if any.","format":"int64","type":"integer"},"business_hours_resolution_seconds":{"description":"The business hours time in seconds it took for the issue to be resolved, if any.","format":"int64","type":"integer"},"business_hours_time_in_status_seconds":{"additionalProperties":{"format":"int64","type":"integer"},"description":"A map of status slug to the business hours time in seconds the issue has spent in that status. Includes both base statuses (e.g. \"new\", \"waiting_on_you\") and custom statuses.","type":"object"},"chat_widget_info":{"$ref":"#/components/schemas/IssueChatWidgetInfo"},"child_issues":{"description":"The child issues in this group, if this issue is an issue group.","items":{"$ref":"#/components/schemas/MiniIssue"},"type":"array"},"created_at":{"description":"The time the issue was created.","format":"date-time","type":"string"},"csat_responses":{"description":"The CSAT responses of the issue, if any.","items":{"$ref":"#/components/schemas/CSATResponse"},"type":"array"},"custom_fields":{"additionalProperties":{"$ref":"#/components/schemas/CustomFieldValue"},"description":"Custom field values associated with the issue.","nullable":true,"type":"object"},"customer_portal_visible":{"description":"Whether the issue is visible in the customer portal.","type":"boolean"},"external_incidents":{"description":"Incidents from incident.io or Rootly linked to this issue.","items":{"$ref":"#/components/schemas/ExternalIncident"},"type":"array"},"external_issues":{"description":"The external issues associated with the issue, if any.","items":{"$ref":"#/components/schemas/ExternalIssue"},"type":"array"},"first_resolution_time":{"description":"The time of the first resolution of the issue, if any. Frozen at the issue's first resolution and never updated on reopen/re-resolve.","format":"date-time","nullable":true,"type":"string"},"first_response_breach_time":{"description":"The time by which the issue's first response SLA will breach, if any. Only present for issues with an active first response SLA.","format":"date-time","type":"string"},"first_response_seconds":{"description":"The time in seconds it took for the first response to the issue, if any.","format":"int64","type":"integer"},"first_response_time":{"description":"The time of the first response to the issue, if any.","format":"date-time","nullable":true,"type":"string"},"id":{"description":"The ID of the issue.","type":"string"},"is_issue_group":{"description":"Whether this issue is an issue group.","type":"boolean"},"latest_message_time":{"description":"The time of the latest message in the issue, if any.","format":"date-time","nullable":true,"type":"string"},"link":{"description":"The link to the issue in Pylon.","type":"string"},"number":{"description":"The number of the issue.","format":"int64","type":"integer"},"number_of_touches":{"description":"The number of times the issue has been touched.","format":"int64","type":"integer"},"parent_issue_group":{"$ref":"#/components/schemas/MiniIssue"},"requester":{"allOf":[{"$ref":"#/components/schemas/MiniContact"}],"nullable":true},"resolution_breach_time":{"description":"The time by which the issue's resolution SLA will breach, if any. Only present for open issues with an active resolution SLA.","format":"date-time","type":"string"},"resolution_seconds":{"description":"The time in seconds it took for the issue to be resolved, if any.","format":"int64","type":"integer"},"resolution_time":{"description":"The time of the resolution of the issue, if any.","format":"date-time","nullable":true,"type":"string"},"slack":{"$ref":"#/components/schemas/SlackInfo"},"snoozed_until_time":{"description":"The time the issue was snoozed until in RFC3339 format, if any.","format":"date-time","type":"string"},"source":{"description":"The source of the issue.\n\nKnown values: `slack`, `microsoft_teams`, `microsoft_teams_chat`, `chat_widget`, `customer_portal`, `email`, `manual`, `form`, `discord`, `google_chat`, `whatsapp`, `sms`, `telegram`, `phone`. This list is not exhaustive.","type":"string"},"state":{"description":"The state of the issue. Standard values are `new`, `waiting_on_you`, `waiting_on_customer`, `on_hold`, and `closed`; custom status slugs are also supported.","type":"string"},"tags":{"description":"Tags associated with the issue.","items":{"type":"string"},"nullable":true,"type":"array"},"team":{"allOf":[{"$ref":"#/components/schemas/MiniTeam"}],"nullable":true},"team_slas":{"description":"The team-scoped SLAs on the issue, if any. One entry per team, mirroring the issue-level first response and resolution SLA fields.","items":{"$ref":"#/components/schemas/TeamSLA"},"type":"array"},"time_in_status_seconds":{"additionalProperties":{"format":"int64","type":"integer"},"description":"A map of status slug to the time in seconds the issue has spent in that status. Includes both base statuses (e.g. \"new\", \"waiting_on_you\") and custom statuses.","type":"object"},"title":{"description":"The title of the issue.","type":"string"},"type":{"description":"The type of the issue.\n\nKnown values: `conversation`, `ticket`. This list is not exhaustive.","type":"string"},"updated_at":{"description":"The time the issue was last updated.","format":"date-time","type":"string"},"workspace_email":{"description":"The email address connected to the Pylon workspace through which the issue's email conversation is routed. For inbound issues, this is the address that received the original email.","type":"string"}},"required":["body_html","created_at","customer_portal_visible","id","is_issue_group","link","number","number_of_touches","source","state","title","type","updated_at"],"type":"object"},"MiniAccount":{"properties":{"external_ids":{"description":"External IDs associated with the account.","items":{"$ref":"#/components/schemas/ExternalID"},"nullable":true,"type":"array"},"id":{"description":"The ID of the account.","type":"string"}},"required":["id"],"type":"object"},"ExternalID":{"properties":{"external_id":{"description":"The external ID. Must be unique per object type (ex. account).","type":"string"},"label":{"description":"The label of the external ID. Must be unique per object.","type":"string"}},"type":"object"},"ActiveTimeByUser":{"properties":{"active_time_seconds":{"description":"The user's active time on the issue in seconds.","format":"int64","type":"integer"},"business_hours_active_time_seconds":{"description":"The user's business-hours active time on the issue in seconds.","format":"int64","type":"integer"},"user_id":{"description":"The ID of the user who spent the time.","type":"string"}},"required":["active_time_seconds","business_hours_active_time_seconds","user_id"],"type":"object"},"MiniUser":{"properties":{"email":{"description":"The email of the user.","type":"string"},"id":{"description":"The ID of the user.","type":"string"}},"required":["id"],"type":"object"},"IssueChatWidgetInfo":{"properties":{"page_url":{"description":"The URL of the page that the user was on when they started the chat widget issue.","type":"string"}},"required":["page_url"],"type":"object"},"MiniIssue":{"properties":{"id":{"description":"The ID of the issue.","type":"string"},"number":{"description":"The number of the issue.","format":"int64","type":"integer"},"title":{"description":"The title of the issue.","type":"string"}},"required":["id","number","title"],"type":"object"},"CSATResponse":{"properties":{"comment":{"description":"The comment of the CSAT response.","nullable":true,"type":"string"},"score":{"description":"The score of the CSAT response.","format":"int64","type":"integer"}},"required":["score"],"type":"object"},"CustomFieldValue":{"description":"A custom field value to set. Custom fields not listed in a write request are left unchanged.","properties":{"slug":{"description":"The slug of the custom field.","type":"string"},"value":{"description":"The value of the custom field. Only to be used for single-valued custom fields. If unset, the custom field will be unset. If the custom field is a select field, the value must be the select option slug, which you can find from the GET /custom-fields endpoint. If the custom field is a relationship field, the value must be the related object ID.","type":"string"},"values":{"description":"The values of the custom field. Only to be used for multi-valued custom fields (ex. multiselect). Replaces the full selection; it does not add to or remove from the existing values. If unset, the custom field will be unset. If the custom field is a multiselect field, the values must be the select option slugs which you can find from the GET /custom-fields endpoint.","items":{"type":"string"},"type":"array"}},"title":"CustomFieldValue","type":"object"},"ExternalIncident":{"properties":{"external_id":{"description":"The incident system's own ID for the incident, when known.","type":"string"},"link":{"description":"Link to the incident, when known.","type":"string"},"reference":{"description":"The incident's reference in the incident system, such as INC-123 or ROOT-123.","type":"string"},"source":{"description":"The incident system the incident belongs to.\n\nKnown values: `incident_io`, `rootly`. This list is not exhaustive.","type":"string"}},"required":["reference","source"],"type":"object"},"ExternalIssue":{"properties":{"external_id":{"description":"The external ID of the external issue.\nJira: ID of the issue (autoincrementing number from 10000).\nGitHub: Owner/Repo/IssueID.\nLinear: ID of the issue (UUID).\nAsana: ID of the task (Long number).","type":"string"},"link":{"description":"Link to the product issue.","type":"string"},"source":{"description":"The source of the external issue.","type":"string"}},"required":["external_id","link","source"],"type":"object"},"MiniContact":{"properties":{"email":{"description":"The email of the contact.","type":"string"},"id":{"description":"The ID of the contact.","type":"string"}},"required":["id"],"type":"object"},"SlackInfo":{"properties":{"channel_id":{"description":"The Slack channel ID associated with the issue.","type":"string"},"message_ts":{"description":"The root message ID of slack message that started issue.","type":"string"},"workspace_id":{"description":"The Slack workspace ID associated with the issue.","type":"string"}},"required":["channel_id","message_ts","workspace_id"],"type":"object"},"MiniTeam":{"properties":{"id":{"description":"The ID of the team.","type":"string"}},"required":["id"],"type":"object"},"TeamSLA":{"properties":{"first_resolution":{"$ref":"#/components/schemas/SLATimes"},"first_response":{"$ref":"#/components/schemas/SLATimes"},"resolution":{"$ref":"#/components/schemas/SLATimes"},"team_id":{"description":"The ID of the team these are scoped to.","type":"string"}},"required":["team_id"],"type":"object"},"SLATimes":{"properties":{"breach_time":{"description":"The time at which it breaches (or has breached), if any.","format":"date-time","type":"string"},"business_hours_seconds":{"description":"The elapsed business-hours time in seconds, if any.","format":"int64","type":"integer"},"seconds":{"description":"The elapsed time in seconds, if any.","format":"int64","type":"integer"},"time":{"description":"The time it was reached, if any.","format":"date-time","nullable":true,"type":"string"}},"type":"object"},"ErrorApiResponseBody":{"properties":{"code":{"description":"A stable machine-readable identifier for this failure, safe to branch on\ninstead of the message text. Omitted when the failure has no assigned code.\n\nKnown values: `recipients_suppressed`, `email_bounced`, `internal_issue_reply_not_allowed`, `duplicate_object`, `invalid_authorization_header`, `invalid_api_token`, `invalid_oauth_token`, `wrong_region_token`, `organization_deactivated`, `organization_suspended`, `permission_denied`, `oauth_not_permitted`, `rate_limited`, `not_found`, `method_not_allowed`, `payload_too_large`, `invalid_request_body`, `internal_error`, `invalid_webhook_credentials`, `organization_inactive`. This list is not exhaustive.","type":"string"},"errors":{"description":"The list of errors.","items":{"type":"string"},"type":"array"},"exists_id":{"description":"The ID of the object that already exists if this is a duplicate object error.","type":"string"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"required":["request_id"],"type":"object"}},"responses":{"LinkExternalIssueResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkExternalIssueResponseBody"}}},"description":""},"BadRequestApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request was invalid or could not be completed."},"UnauthorizedApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request could not be authenticated for this API."},"ForbiddenApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The authenticated caller or organization is not allowed to access this endpoint or operation."},"ErrorApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":""},"TooManyRequestsApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request exceeded the applicable rate limit.","headers":{"Retry-After":{"description":"Seconds until the next request to this endpoint is permitted.","schema":{"format":"int64","type":"integer"}},"X-Retry-After":{"description":"Seconds until the full per-minute allowance is restored. Capacity returns gradually before then.","schema":{"format":"int64","type":"integer"}}}},"InternalServerErrorApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"An unexpected internal error occurred."}}},"paths":{"/issues/{id}/external-issues":{"post":{"description":"By default, links external issues. To unlink issues, set the operation field to \"unlink\".\n\n**Rate limit:** 120 requests per minute","operationId":"LinkExternalIssue","parameters":[{"description":"The ID or number of the issue to link external issues to.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkExternalIssueRequestBody"}}}},"responses":{"200":{"$ref":"#/components/responses/LinkExternalIssueResponse"},"400":{"$ref":"#/components/responses/BadRequestApiResponse"},"401":{"$ref":"#/components/responses/UnauthorizedApiResponse"},"403":{"$ref":"#/components/responses/ForbiddenApiResponse"},"404":{"$ref":"#/components/responses/ErrorApiResponse"},"429":{"$ref":"#/components/responses/TooManyRequestsApiResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorApiResponse"}},"summary":"Link or unlink external issues to/from an issue","tags":["issues"]}}}}
```

{% hint style="info" %}
Note: Utilizing external issues endpoint will update the ticket status to whatever is set in the apps directory page, if the "automatically change issue status when linked" setting is enabled. Please see screenshot below.
{% endhint %}

<figure><img src="https://982123570-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9hXBoCTTNw5flARlUVJf%2Fuploads%2FVZcKH5F1VTBRdE4zGfqO%2Fimage.png?alt=media&amp;token=629bd10f-d74e-41d0-a4ac-ac5b3f057ba6" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.usepylon.com/pylon-docs/developer/api/api-reference/issues.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
