# Pylon

> Manage Pylon support issues, customer accounts, contacts, teams and tags.

App · 25 actions. Web page: https://docs.lodol.com/docs/integrations/pylon

## Actions

### Create account

Create a new account. Uses the connected account's permissions.

**Inputs**

- Account type (`account_type`, text): The type of the account. Must be one of "customer", "internal", "community", or "partner". Defaults to "customer" if not specified. One of: `customer`, `internal`, `community`, `partner`.
- Channels (`channels`, list): An array of channels to be linked to this account.
- Custom fields (`custom_fields`, list): An array of custom fields to be used on this account.
- Domains (`domains`, list): The domains of the account, without any leading scheme, for example stripe.com. Must specify one domain as primary.
- External IDS (`external_ids`, list): An array of external IDs to be used on this account. If provided, the account's external IDs will be updated to the given external IDs.
- Logo URL (`logo_url`, text): The logo URL of the account. Must be a square .png, .jpg or .jpeg.
- Name (`name`, text, required): The name of the account.
- Owner (`owner_id`, text): The ID of the owner of the account.
- Primary domain (`primary_domain`, text): Must be in the list of domains. If there are any domains, there must be exactly one primary domain.
- Subaccount IDS (`subaccount_ids`, list): An array of account IDs to be added as subaccounts to this account. For normal accounts, these represent subaccounts. For partner accounts, these represent associated accounts.
- Tags (`tags`, list): An array of strings to use as tags on this account. If provided, the accounts tags will be updated to the given tags.

**Outputs**

- `data` (object): Data.
- `request_id` (text): The request ID for tracking.

**Example output**

```json
{
  "data": {
    "associated_account_ids": [],
    "channels": [],
    "created_at": "example",
    "crm_settings": {
      "details": []
    },
    "custom_fields": {},
    "domain": "example",
    "domains": [],
    "external_ids": [],
    "id": "example",
    "is_disabled": true,
    "latest_customer_activity_time": "example",
    "latest_vendor_activity_time": "example",
    "logo_url": "example",
    "name": "example",
    "owner": {
      "email": "example",
      "id": "example"
    },
    "parent_account_id": "example",
    "primary_domain": "example",
    "subaccount_ids": [],
    "tags": [],
    "type": "example",
    "updated_at": "example"
  },
  "request_id": "example"
}
```

### Create contact

Create a new contact. Uses the connected account's permissions.

**Inputs**

- Account external ID (`account_external_id`, text): The external ID of the account that this contact belongs to. Cannot be used together with account_id.
- Account (`account_id`, text): The account that this contact belongs to.
- Avatar URL (`avatar_url`, text): The avatar URL of the contact. Must be a square .png, .jpg or .jpeg.
- Custom fields (`custom_fields`, list): An array of custom fields to be applied to this contact.
- Email (`email`, text): The email of the contact.
- External IDS (`external_ids`, list): An array of external IDs to be used on this contact.
- Name (`name`, text, required): The name of the contact.
- Phone numbers (`phone_numbers`, list): The phone numbers of the contact. Must contain only digits 0-9, optionally preceded by + (E.164, e.g. +4365446231), and be 15 digits or less. Include the + and country code for non-US numbers; a 10-digit number without + is treated as US.
- Portal role (`portal_role`, text): The portal role to assign to the contact. If not provided uses the default portal role from the portal settings. One of: `no_access` (No access), `member`, `admin`.
- Portal role ID (`portal_role_id`, text): The ID of the custom portal role to assign to the contact. Takes precedence over portal_role if provided.
- Primary phone number (`primary_phone_number`, text): The primary phone number. Must be in the list of phone_numbers. If there are any phone_numbers and this is not specified, the first phone number will be primary.

**Outputs**

- `data` (object): Data.
- `request_id` (text): The request ID for tracking.

**Example output**

```json
{
  "data": {
    "account": {
      "external_ids": [],
      "id": "example"
    },
    "avatar_url": "example",
    "custom_fields": {},
    "email": "example",
    "emails": [],
    "external_ids": [],
    "id": "example",
    "integration_user_ids": [],
    "name": "example",
    "phone_numbers": [],
    "portal_role": "example",
    "portal_role_id": "example",
    "primary_phone_number": "example"
  },
  "request_id": "example"
}
```

### Create issue

Create a new issue. Uses the connected account's permissions.

**Inputs**

- Account (`account_id`, text): 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.
- Assignee (`assignee_id`, text): The user the issue should be assigned to.
- Attachment URLS (`attachment_urls`, list): URLs of files to attach to the issue's first message.
- Author unverified (`author_unverified`, true/false): Whether the requester's identity has NOT been verified. Defaults to false (verified).
- Body HTML (`body_html`, text, required): The HTML content of the body of the issue.
- Contact (`contact_id`, text): 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.
- Created at (`created_at`, date and time): Timestamp of when the issue was created. If not specified, the current time will be used. (RFC3339)
- Custom fields (`custom_fields`, list): An array of custom fields to be used on this issue.
- Custom issue source ID (`custom_issue_source_id`, text): The ID of a custom issue source (created in the App Directory under Chat > Add Custom Chat App). Sets the issue source to the custom source's slug. Use this for channels Pylon doesn't natively support (e.g. WeChat). Cannot be combined with destination_metadata.
- Customer portal visible (`customer_portal_visible`, true/false): Whether the issue should be visible in the customer portal. When destination is "customer_portal", this is set to true and cannot be false.
- Destination metadata (`destination_metadata`, object): The destination metadata.
- Priority (`priority`, text): The priority of the issue. Can be one of: urgent, high, medium, or low. One of: `urgent`, `high`, `medium`, `low`.
- Requester avatar URL (`requester_avatar_url`, text): The URL of an avatar of the requester.
- Requester email (`requester_email`, text): 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.
- Requester (`requester_id`, text): 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.
- Requester name (`requester_name`, text): The optional full name of the requester. Used when creating a new contact via requester_email.
- Requester phone number (`requester_phone_number`, text): 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.
- Tags (`tags`, list): An array of strings to use as tags on this issue. If provided, the issue tags will be updated to the given tags.
- API team (`api_team_id`, text): The ID of the team this issue should be assigned to.
- Title (`title`, text, required): The title of the issue.
- API user (`api_user_id`, text): 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.

**Outputs**

- `data` (object): Data.
- `request_id` (text): The request ID for tracking.

**Example output**

```json
{
  "data": {
    "account": {
      "external_ids": [],
      "id": "example"
    },
    "active_time_by_user": [],
    "active_time_seconds": 1,
    "assignee": {
      "email": "example",
      "id": "example"
    },
    "attachment_urls": [],
    "author_unverified": true,
    "body_html": "example",
    "business_hours_active_time_seconds": 1,
    "business_hours_first_response_seconds": 1,
    "business_hours_resolution_seconds": 1,
    "business_hours_time_in_status_seconds": {},
    "chat_widget_info": {
      "page_url": "example"
    },
    "child_issues": [],
    "created_at": "example",
    "csat_responses": [],
    "custom_fields": {},
    "customer_portal_visible": true,
    "external_incidents": [],
    "external_issues": [],
    "first_resolution_time": "example",
    "first_response_assignee_id_at_breach": "example",
    "first_response_breach_time": "example",
    "first_response_resolving_user_id": "example",
    "first_response_seconds": 1,
    "first_response_time": "example",
    "follow_up": {
      "assignee_id_at_breach": "example",
      "breach_time": "example",
      "business_hours_seconds": 1,
      "resolving_user_id": "example",
      "seconds": 1,
      "time": "example"
    },
    "id": "example",
    "is_issue_group": true,
    "latest_message_time": "example",
    "link": "example",
    "next_reply": {
      "assignee_id_at_breach": "example",
      "breach_time": "example",
      "business_hours_seconds": 1,
      "resolving_user_id": "example",
      "seconds": 1,
      "time": "example"
    },
    "number": 1,
    "number_of_touches": 1,
    "parent_issue_group": {
      "id": "example",
      "number": 1,
      "title": "example"
    },
    "requester": {
      "email": "example",
      "id": "example"
    },
    "resolution_assignee_id_at_breach": "example",
    "resolution_breach_time": "example",
    "resolution_resolving_user_id": "example",
    "resolution_seconds": 1,
    "resolution_time": "example",
    "slack": {
      "channel_id": "example",
      "message_ts": "example",
      "workspace_id": "example"
    },
    "snoozed_until_time": "example",
    "source": "example",
    "state": "example",
    "tags": [],
    "team": {
      "id": "example"
    },
    "team_slas": [],
    "time_in_status_seconds": {},
    "title": "example",
    "type": "example",
    "updated_at": "example",
    "workspace_email": "example",
    "workspace_phone_number": "example"
  },
  "request_id": "example"
}
```

### Create tag

Create a new tag. Uses the connected account's permissions.

**Inputs**

- Hex color (`hex_color`, text): The hex code of the tag's color.
- Object type (`object_type`, text, required): The object type of the associated object. Can be "account", "article", or "issue". One of: `account`, `article`, `issue`.
- Value (`value`, text, required): The tag value.

**Outputs**

- `data` (object): Data.
- `request_id` (text): The request ID for tracking.

**Example output**

```json
{
  "data": {
    "hex_color": "example",
    "id": "example",
    "object_type": "example",
    "value": "example"
  },
  "request_id": "example"
}
```

### Delete account

Delete an existing account. Uses the connected account's permissions.

**Inputs**

- ID (`id`, text, required): The ID or external ID of the account to delete.

**Outputs**

- `request_id` (text): The request ID for tracking.

**Example output**

```json
{
  "request_id": "example"
}
```

### Delete contact

Delete a contact by its ID or external ID. Uses the connected account's permissions.

**Inputs**

- ID (`id`, text, required): The ID or external ID of the contact to delete.

**Outputs**

- `request_id` (text): The request ID for tracking.

**Example output**

```json
{
  "request_id": "example"
}
```

### Delete issue

Delete an existing issue. Uses the connected account's permissions.

**Inputs**

- ID (`id`, text, required): The ID of the issue to delete.

**Outputs**

- `request_id` (text): The request ID for tracking.

**Example output**

```json
{
  "request_id": "example"
}
```

### Delete tag

Delete an existing tag. Uses the connected account's permissions.

**Inputs**

- ID (`id`, text, required): The ID of the tag to update.

**Outputs**

- `request_id` (text): The request ID for tracking.

**Example output**

```json
{
  "request_id": "example"
}
```

### Get account

Get an account by its ID or external ID. Uses the connected account's permissions.

**Inputs**

- ID (`id`, text, required): The ID or external ID of the account to fetch.

**Outputs**

- `data` (object): Data.
- `request_id` (text): The request ID for tracking.

**Example output**

```json
{
  "data": {
    "associated_account_ids": [],
    "channels": [],
    "created_at": "example",
    "crm_settings": {
      "details": []
    },
    "custom_fields": {},
    "domain": "example",
    "domains": [],
    "external_ids": [],
    "id": "example",
    "is_disabled": true,
    "latest_customer_activity_time": "example",
    "latest_vendor_activity_time": "example",
    "logo_url": "example",
    "name": "example",
    "owner": {
      "email": "example",
      "id": "example"
    },
    "parent_account_id": "example",
    "primary_domain": "example",
    "subaccount_ids": [],
    "tags": [],
    "type": "example",
    "updated_at": "example"
  },
  "request_id": "example"
}
```

### Get contact

Get a contact by its ID or external ID. Uses the connected account's permissions.

**Inputs**

- ID (`id`, text, required): The ID or external ID of the contact.

**Outputs**

- `data` (object): Data.
- `request_id` (text): The request ID for tracking.

**Example output**

```json
{
  "data": {
    "account": {
      "external_ids": [],
      "id": "example"
    },
    "avatar_url": "example",
    "custom_fields": {},
    "email": "example",
    "emails": [],
    "external_ids": [],
    "id": "example",
    "integration_user_ids": [],
    "name": "example",
    "phone_numbers": [],
    "portal_role": "example",
    "portal_role_id": "example",
    "primary_phone_number": "example"
  },
  "request_id": "example"
}
```

### Get issue

Get an issue by its ID/number. Uses the connected account's permissions.

**Inputs**

- ID (`id`, text, required): The ID or number of the issue to fetch.

**Outputs**

- `data` (object): Data.
- `request_id` (text): The request ID for tracking.

**Example output**

```json
{
  "data": {
    "account": {
      "external_ids": [],
      "id": "example"
    },
    "active_time_by_user": [],
    "active_time_seconds": 1,
    "assignee": {
      "email": "example",
      "id": "example"
    },
    "attachment_urls": [],
    "author_unverified": true,
    "body_html": "example",
    "business_hours_active_time_seconds": 1,
    "business_hours_first_response_seconds": 1,
    "business_hours_resolution_seconds": 1,
    "business_hours_time_in_status_seconds": {},
    "chat_widget_info": {
      "page_url": "example"
    },
    "child_issues": [],
    "created_at": "example",
    "csat_responses": [],
    "custom_fields": {},
    "customer_portal_visible": true,
    "external_incidents": [],
    "external_issues": [],
    "first_resolution_time": "example",
    "first_response_assignee_id_at_breach": "example",
    "first_response_breach_time": "example",
    "first_response_resolving_user_id": "example",
    "first_response_seconds": 1,
    "first_response_time": "example",
    "follow_up": {
      "assignee_id_at_breach": "example",
      "breach_time": "example",
      "business_hours_seconds": 1,
      "resolving_user_id": "example",
      "seconds": 1,
      "time": "example"
    },
    "id": "example",
    "is_issue_group": true,
    "latest_message_time": "example",
    "link": "example",
    "next_reply": {
      "assignee_id_at_breach": "example",
      "breach_time": "example",
      "business_hours_seconds": 1,
      "resolving_user_id": "example",
      "seconds": 1,
      "time": "example"
    },
    "number": 1,
    "number_of_touches": 1,
    "parent_issue_group": {
      "id": "example",
      "number": 1,
      "title": "example"
    },
    "requester": {
      "email": "example",
      "id": "example"
    },
    "resolution_assignee_id_at_breach": "example",
    "resolution_breach_time": "example",
    "resolution_resolving_user_id": "example",
    "resolution_seconds": 1,
    "resolution_time": "example",
    "slack": {
      "channel_id": "example",
      "message_ts": "example",
      "workspace_id": "example"
    },
    "snoozed_until_time": "example",
    "source": "example",
    "state": "example",
    "tags": [],
    "team": {
      "id": "example"
    },
    "team_slas": [],
    "time_in_status_seconds": {},
    "title": "example",
    "type": "example",
    "updated_at": "example",
    "workspace_email": "example",
    "workspace_phone_number": "example"
  },
  "request_id": "example"
}
```

### Get me

Get details of the authenticated organization and user. Uses the connected account's permissions.

**Inputs**: None.

**Outputs**

- `data` (object): Data.
- `request_id` (text): The request ID for tracking.

**Example output**

```json
{
  "data": {
    "id": "example",
    "name": "example",
    "user": {
      "email": "example",
      "id": "example"
    }
  },
  "request_id": "example"
}
```

### List accounts

Get a list of accounts. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Cursor (`cursor`, text): The cursor to use for pagination.
- Limit (`limit`, number): The number of accounts to fetch. Defaults to 100. Must be greater than 0 and less than 1000. From 1 to 1000.

**Outputs**

- `data` (list): The data payload of the response.
- `pagination` (object): Pagination.
- `request_id` (text): The request ID for tracking.

**Example output**

```json
{
  "data": [],
  "pagination": {
    "cursor": "example",
    "has_next_page": true
  },
  "request_id": "example"
}
```

### List contacts

Get all contacts. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Cursor (`cursor`, text): The cursor to use for pagination.
- Limit (`limit`, number): The number of contacts to fetch. Defaults to 100. Must be greater than 0 and less than 1000. From 1 to 1000.

**Outputs**

- `data` (list): The data payload of the response.
- `pagination` (object): Pagination.
- `request_id` (text): The request ID for tracking.

**Example output**

```json
{
  "data": [],
  "pagination": {
    "cursor": "example",
    "has_next_page": true
  },
  "request_id": "example"
}
```

### List issue statuses

Get all issue statuses. Uses the connected account's permissions.

**Inputs**: None.

**Outputs**

- `data` (list): The data payload of the response.
- `pagination` (object): Pagination.
- `request_id` (text): The request ID for tracking.

**Example output**

```json
{
  "data": [],
  "pagination": {
    "cursor": "example",
    "has_next_page": true
  },
  "request_id": "example"
}
```

### List issues

Get a list of issues. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Start time (`start_time`, date and time, required): 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.
- End time (`end_time`, date and time, required): 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.
- Cursor (`cursor`, text): The cursor to use for pagination.
- Limit (`limit`, number): The number of issues to fetch. Defaults to 20000. Set to 0 or omit to use the default. Must be between 0 and 20000. From 0 to 20000.

**Outputs**

- `data` (list): The data payload of the response.
- `pagination` (object): Pagination.
- `request_id` (text): The request ID for tracking.

**Example output**

```json
{
  "data": [],
  "pagination": {
    "cursor": "example",
    "has_next_page": true
  },
  "request_id": "example"
}
```

### List tags

Get all tags. Uses the connected account's permissions.

**Inputs**: None.

**Outputs**

- `data` (list): The data payload of the response.
- `pagination` (object): Pagination.
- `request_id` (text): The request ID for tracking.

**Example output**

```json
{
  "data": [],
  "pagination": {
    "cursor": "example",
    "has_next_page": true
  },
  "request_id": "example"
}
```

### List teams

Get a list of teams. Uses the connected account's permissions.

**Inputs**: None.

**Outputs**

- `data` (list): The data payload of the response.
- `pagination` (object): Pagination.
- `request_id` (text): The request ID for tracking.

**Example output**

```json
{
  "data": [],
  "pagination": {
    "cursor": "example",
    "has_next_page": true
  },
  "request_id": "example"
}
```

### List users

Get a list of users. Uses the connected account's permissions.

**Inputs**

- Include deactivated (`include_deactivated`, true/false): Whether to include deactivated users. Defaults to false.

**Outputs**

- `data` (list): The data payload of the response.
- `pagination` (object): Pagination.
- `request_id` (text): The request ID for tracking.

**Example output**

```json
{
  "data": [],
  "pagination": {
    "cursor": "example",
    "has_next_page": true
  },
  "request_id": "example"
}
```

### Search accounts

Search for accounts by a given filter. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Cursor (`cursor`, text): The cursor to use for pagination.
- Filter (`filter`, object): The filter.
- Limit (`limit`, number): The number of accounts to fetch. Defaults to 100. Must be between 1 and 1000. From 1 to 1000.
- Search text (`search_text`, text): Fuzzy text search. Results are intersected with any provided filter.

**Outputs**

- `data` (list): The data payload of the response.
- `pagination` (object): Pagination.
- `request_id` (text): The request ID for tracking.

**Example output**

```json
{
  "data": [],
  "pagination": {
    "cursor": "example",
    "has_next_page": true
  },
  "request_id": "example"
}
```

### Search contacts

Search for contacts by a given filter. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Cursor (`cursor`, text): The cursor to use for pagination.
- Filter (`filter`, object): The filter.
- Limit (`limit`, number): The number of contacts to fetch. Defaults to 100. Must be between 1 and 1000. From 1 to 1000.
- Search text (`search_text`, text): Text search across contact name, primary email, secondary emails, primary phone number, and secondary phone numbers. Results are intersected with any provided filter.

**Outputs**

- `data` (list): The data payload of the response.
- `pagination` (object): Pagination.
- `request_id` (text): The request ID for tracking.

**Example output**

```json
{
  "data": [],
  "pagination": {
    "cursor": "example",
    "has_next_page": true
  },
  "request_id": "example"
}
```

### Search issues

Search for issues by a given filter. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Cursor (`cursor`, text): The cursor to use for pagination.
- Filter (`filter`, object): The filter.
- Limit (`limit`, number): The number of issues to fetch. Defaults to 100. Must be between 1 and 1000. From 1 to 1000.
- Search text (`search_text`, text): Fuzzy text search. Results are intersected with any provided filter.

**Outputs**

- `data` (list): Data.
- `pagination` (object): Pagination.
- `request_id` (text): Request id.

**Example output**

```json
{
  "data": [],
  "pagination": {
    "cursor": "example",
    "has_next_page": true
  },
  "request_id": "example"
}
```

### Update account

Update an existing account. Uses the connected account's permissions.

**Inputs**

- ID (`id`, text, required): The ID or external ID of the account to update.
- Account type (`account_type`, text): The type of the account. Can only be changed to "customer" or "partner". One of: `customer`, `partner`.
- Channels (`channels`, list): An array of channels to be linked to this account. If provided, replaces the account's linked channels; channels you leave out are unlinked.
- Custom fields (`custom_fields`, list): An array of custom fields to be used on this account.
- Domains (`domains`, list): Domains of the account. Replaces the account's domains. Must specify one domain as primary.
- External IDS (`external_ids`, list): An array of external IDs to be used on this account. If provided, the account's external IDs will be updated to the given external IDs.
- Is disabled (`is_disabled`, true/false): Whether the account is disabled.
- Logo URL (`logo_url`, text): Logo URL of the account.
- Name (`name`, text): The name of the account.
- Owner (`owner_id`, text): The ID of the owner of the account. If empty string is passed in, the owner will be removed.
- Primary domain (`primary_domain`, text): Must be in the list of domains. If there are any domains, there must be exactly one primary domain.
- Subaccount IDS (`subaccount_ids`, list): An array of account IDs to set as this account's subaccounts. If provided, the account's subaccounts become exactly this list; accounts you leave out are detached.
- Tags (`tags`, list): An array of strings to use as tags on this account. If provided, the accounts tags will be updated to the given tags.

**Outputs**

- `data` (object): Data.
- `request_id` (text): The request ID for tracking.

**Example output**

```json
{
  "data": {
    "associated_account_ids": [],
    "channels": [],
    "created_at": "example",
    "crm_settings": {
      "details": []
    },
    "custom_fields": {},
    "domain": "example",
    "domains": [],
    "external_ids": [],
    "id": "example",
    "is_disabled": true,
    "latest_customer_activity_time": "example",
    "latest_vendor_activity_time": "example",
    "logo_url": "example",
    "name": "example",
    "owner": {
      "email": "example",
      "id": "example"
    },
    "parent_account_id": "example",
    "primary_domain": "example",
    "subaccount_ids": [],
    "tags": [],
    "type": "example",
    "updated_at": "example"
  },
  "request_id": "example"
}
```

### Update contact

Update a contact by its ID or external ID. Uses the connected account's permissions.

**Inputs**

- ID (`id`, text, required): The ID or external ID of the contact to update.
- Account external ID (`account_external_id`, text): The external ID of the account to move the contact to. Cannot be used together with account_id.
- Account (`account_id`, text): The account to move the contact to. If empty string is passed in, the contact will be removed from its account.
- Avatar URL (`avatar_url`, text): The avatar URL of the contact. Must be a square .png, .jpg or .jpeg.
- Custom fields (`custom_fields`, list): An array of custom fields to be applied to this contact.
- Email (`email`, text): The email of the contact. Replaces all of the contact's emails with this single email. Cannot be used together with the `emails` array field.
- Emails (`emails`, list): The emails of the contact as an array. Cannot be used together with the singular `email` field. Each entry must include an `email` string and an optional `is_primary` boolean. If no email is marked as primary, the first email becomes the primary.
- External IDS (`external_ids`, list): An array of external IDs to be used on this contact. If provided, the contact's external IDs will be updated to the given external IDs.
- Name (`name`, text): in: body The name of the contact.
- Phone numbers (`phone_numbers`, list): The phone numbers of the contact. Must contain only digits 0-9, optionally preceded by + (E.164, e.g. +4365446231), and be 15 digits or less. Include the + and country code for non-US numbers; a 10-digit number without + is treated as US.
- Portal role (`portal_role`, text): The portal role to assign to the contact. Can be one of `no_access`, `member`, or `admin`, or a custom role slug. One of: `no_access` (No access), `member`, `admin`.
- Portal role ID (`portal_role_id`, text): The ID of the custom portal role to assign to the contact. Takes precedence over portal_role if provided.
- Primary phone number (`primary_phone_number`, text): The primary phone number. Must be in the list of phone_numbers. If there are any phone_numbers and this is not specified, the first phone number will be primary.

**Outputs**

- `data` (object): Data.
- `request_id` (text): The request ID for tracking.

**Example output**

```json
{
  "data": {
    "account": {
      "external_ids": [],
      "id": "example"
    },
    "avatar_url": "example",
    "custom_fields": {},
    "email": "example",
    "emails": [],
    "external_ids": [],
    "id": "example",
    "integration_user_ids": [],
    "name": "example",
    "phone_numbers": [],
    "portal_role": "example",
    "portal_role_id": "example",
    "primary_phone_number": "example"
  },
  "request_id": "example"
}
```

### Update issue

Update an existing issue. Uses the connected account's permissions.

**Inputs**

- ID (`id`, text, required): The ID of the issue to update.
- Account (`account_id`, text): 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.
- Assignee (`assignee_id`, text): The ID of the user who should be assigned to this issue. If empty string is passed in, the issue assignee will be removed.
- Custom fields (`custom_fields`, list): An array of custom fields to be used on this issue. Only passed in fields will be modified.
- Customer portal visible (`customer_portal_visible`, true/false): Whether the issue should be visible in the customer portal.
- Requester (`requester_id`, text): 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.
- State (`state`, text): 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.
- Tags (`tags`, list): 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.
- API team (`api_team_id`, text): The ID of the team this issue should be assigned to. If empty string is passed in, any assigned team will be removed.
- Title (`title`, text): The title of the issue.
- Type (`type`, text): The type of the issue. Set to "ticket" to upgrade a conversation to a support ticket. Cannot be downgraded from "ticket" to "conversation". One of: `conversation`, `ticket`.

**Outputs**

- `data` (object): Data.
- `request_id` (text): The request ID for tracking.

**Example output**

```json
{
  "data": {
    "account": {
      "external_ids": [],
      "id": "example"
    },
    "active_time_by_user": [],
    "active_time_seconds": 1,
    "assignee": {
      "email": "example",
      "id": "example"
    },
    "attachment_urls": [],
    "author_unverified": true,
    "body_html": "example",
    "business_hours_active_time_seconds": 1,
    "business_hours_first_response_seconds": 1,
    "business_hours_resolution_seconds": 1,
    "business_hours_time_in_status_seconds": {},
    "chat_widget_info": {
      "page_url": "example"
    },
    "child_issues": [],
    "created_at": "example",
    "csat_responses": [],
    "custom_fields": {},
    "customer_portal_visible": true,
    "external_incidents": [],
    "external_issues": [],
    "first_resolution_time": "example",
    "first_response_assignee_id_at_breach": "example",
    "first_response_breach_time": "example",
    "first_response_resolving_user_id": "example",
    "first_response_seconds": 1,
    "first_response_time": "example",
    "follow_up": {
      "assignee_id_at_breach": "example",
      "breach_time": "example",
      "business_hours_seconds": 1,
      "resolving_user_id": "example",
      "seconds": 1,
      "time": "example"
    },
    "id": "example",
    "is_issue_group": true,
    "latest_message_time": "example",
    "link": "example",
    "next_reply": {
      "assignee_id_at_breach": "example",
      "breach_time": "example",
      "business_hours_seconds": 1,
      "resolving_user_id": "example",
      "seconds": 1,
      "time": "example"
    },
    "number": 1,
    "number_of_touches": 1,
    "parent_issue_group": {
      "id": "example",
      "number": 1,
      "title": "example"
    },
    "requester": {
      "email": "example",
      "id": "example"
    },
    "resolution_assignee_id_at_breach": "example",
    "resolution_breach_time": "example",
    "resolution_resolving_user_id": "example",
    "resolution_seconds": 1,
    "resolution_time": "example",
    "slack": {
      "channel_id": "example",
      "message_ts": "example",
      "workspace_id": "example"
    },
    "snoozed_until_time": "example",
    "source": "example",
    "state": "example",
    "tags": [],
    "team": {
      "id": "example"
    },
    "team_slas": [],
    "time_in_status_seconds": {},
    "title": "example",
    "type": "example",
    "updated_at": "example",
    "workspace_email": "example",
    "workspace_phone_number": "example"
  },
  "request_id": "example"
}
```
