# Attio

> Attio CRM records, attributes, and search via the v2 REST API.

Lets an agent read and write CRM data in Attio (records, attributes,
search). Standard objects are `people`, `companies`, and `deals`; you
can also operate on any custom object you've added to your workspace.

## What it can do

| Method | What it does |
| --- | --- |
| `attio_self` | Returns the workspace + token info for the current API key. Useful for sanity checks. |
| `attio_list_objects` | List all objects (standard + custom) with their slugs and ids. |
| `attio_get_object` | Get one object's metadata by slug or id. |
| `attio_list_attributes` | List attributes for a given object (slug + type for each field). |
| `attio_query_records` | Page through records of an object with optional filters and sorts. |
| `attio_search_records` | Free-text search across records of an object. |
| `attio_get_record` | Read one record by id. |
| `attio_create_record` | Create a new record; field values use Attio's `values` payload format. |
| `attio_assert_record` | Upsert by `matching_attribute` - create if missing, update if matched. |
| `attio_update_record` | PATCH a record's attributes. |
| `attio_delete_record` | Delete a record by id. |

## How to get credentials

Attio supports a workspace-level access token (recommended for an
agent) or an OAuth bearer.

1. Open Attio → **Settings** → **Developers** → **API**.
2. Click **Generate token** (or **Create access token**).
3. Pick the scopes the agent needs - typically read + write on the
   objects you plan to manage (e.g. `record:read-write`,
   `object_configuration:read`).
4. Copy the token (starts with `attio_`).

## Fields to fill in FlyMyAI

| FlyMyAI field | Where it comes from |
| --- | --- |
| `ATTIO_API_KEY` | Settings → Developers → API → access token |

You can also override the key for a single call by passing
`attio_api_key` in the tool arguments.

## Troubleshooting

- **`401 Unauthorized`** - token is wrong, expired, or missing the
  required scope. Regenerate from Settings → Developers → API.
- **`Attribute not found`** - attribute slugs are case-sensitive. Use
  `attio_list_attributes` to look up the exact slug for the object.
- **Custom value formats** - Attio expects each attribute as an array
  of value objects (for example `[{ "value": "..." }]`). See the Attio
  attribute-types docs linked below for the exact shape per type.

## Links

- [Attio API overview](https://developers.attio.com/reference/get_v2-objects)
- [Attribute types and value payload formats](https://developers.attio.com/reference/attribute-types)
