# Pylon

> Manage Pylon B2B support - issues, accounts, contacts, users, teams, tags and knowledge-base articles - via the REST API.

Lets an agent work with Pylon, a B2B customer-support and ticketing platform: list and update issues, look up accounts and contacts, list users and teams, read tags, and browse knowledge-base articles.

## What it can do

| Method | What it does |
| --- | --- |
| `pylon_issues_list` | List issues in a time window (requires start_time / end_time). |
| `pylon_issue_get` | Get one issue by id. |
| `pylon_issue_create` | Create an issue (title, body, account, requester, assignee). |
| `pylon_issue_update` | Update an issue's title, state, assignee, team or tags. |
| `pylon_accounts_list` | List accounts (companies). |
| `pylon_account_get` | Get one account by id. |
| `pylon_contacts_list` | List contacts (end users). |
| `pylon_contact_get` | Get one contact by id. |
| `pylon_users_list` | List support agents (users). |
| `pylon_teams_list` | List teams. |
| `pylon_tags_list` | List tags available for issues. |
| `pylon_articles_list` | List knowledge-base articles. |
| `pylon_request` | Generic passthrough to any endpoint for full coverage. |

## How to get your key

The API authenticates with an `Authorization: Bearer <key>` header.

1. Sign in at [Pylon](https://app.usepylon.com/).
2. Open **Settings -> API** ([app.usepylon.com/settings/api](https://app.usepylon.com/settings/api)).
3. Create or copy an API key.
4. Paste it into FlyMyAI.

## Fields to fill in FlyMyAI

| FlyMyAI field | Where it comes from |
| --- | --- |
| `PYLON_API_KEY` | Pylon -> Settings -> API |

## Troubleshooting

- **`401 Unauthorized`** - the key is wrong or rotated. Generate a new key in Settings -> API.
- **`403 Forbidden`** - the key lacks permission for that resource. Check the key's scope with your Pylon admin.
- **`400` on listing issues** - `pylon_issues_list` needs both `start_time` and `end_time` in RFC3339 (e.g. `2024-01-01T00:00:00Z`).
- **`429 Too Many Requests`** - you hit the rate limit. Slow the calls down.

## Links

- [Pylon API settings / key](https://app.usepylon.com/settings/api)
- [Pylon API documentation](https://docs.usepylon.com/)
