Skip to main content

Overview

OneCLI connects AI agents to Attio through OAuth or a scoped API key. Agents can read and manage CRM data such as contacts, companies, deals, lists, notes, and tasks, with credentials injected into requests to the Attio API automatically. This is useful for agents that enrich records, move deals through a pipeline, or capture notes and tasks without manual CRM data entry.

How it works

OneCLI sits between your agent and Attio as a transparent proxy. When an agent calls the Attio API, the gateway matches the request, injects the stored credential, and forwards it to api.attio.com. Your agent never sees the token or API key. Because the gateway speaks the Attio REST API directly, agents use the same endpoints and request shapes as any Attio client. There is no SDK to install and no Attio-specific code in your agent. You connect Attio once, assign it to an agent, and the agent can read and write CRM data within the permissions you grant. OneCLI also handles the connection lifecycle. For OAuth connections it refreshes expiring access tokens for you. For API key connections it injects your key on every request. In both cases credentials are encrypted at rest and only decrypted inside the gateway at request time.

Setup

OAuth is the default connection method and requires no setup beyond authorizing OneCLI.
1

Go to Connections

Open the OneCLI dashboard and navigate to Connections > Attio.
2

Authorize

Click Connect to Attio. You’ll be redirected to Attio to sign in and authorize OneCLI. Review the requested permissions and click Allow.
OneCLI connect window for Attio on Cloud, showing the Connect to Attio button.

The Attio connect window on OneCLI Cloud.

3

Verify

After authorizing, you’ll return to the dashboard. The connection shows as Connected with your Attio workspace name.

Configure

OAuth works out of the box. If you want tighter control over what an agent can reach, connect Attio with your own API key instead and grant it only the scopes you need, rather than the full OAuth scope set. For example, create a read-only key, or one limited to specific objects.
1

Create a scoped API key in Attio

In Attio, create an API key and select only the scopes your agents require. Attio’s guide walks through this: Generating an API key.
2

Connect in OneCLI

In the OneCLI dashboard, open Connections > Attio, choose Use an API key instead, and paste your key. OneCLI injects it into requests the same way it does an OAuth token.
OneCLI connect dialog for Attio with an API key field and a Use OAuth instead option

Self-hosted: use your own Attio app

Skip this section on OneCLI Cloud. It’s only for self-hosted OneCLI without ATTIO_CLIENT_ID and ATTIO_CLIENT_SECRET set, or if you want your own company name on Attio’s consent screen. The API key option above works on self-hosted with no app at all.

1. Create the Attio app

Go to the Attio developer dashboard and create an app named OneCLI. Open its OAuth settings.
Attio New app dialog with the name OneCLI and the slug onecli, and the Create app button.

Create the app in Attio's developer dashboard.

Turn on the scopes your agents need. OneCLI can request all of these:
In OneCLI, open Connections > Attio > Custom credentials and copy the Redirect URI. In Attio, paste it into Redirect URIs, and save.
OneCLI Custom credentials card for Attio with the setup guide link, the Redirect URI and its copy button, and the client ID and secret fields.

Copy the Redirect URI from Custom credentials in OneCLI.

Attio app OAuth tab with OAuth enabled, the Client ID, a hidden Client Secret, and https://onecli.example.com/v1/apps/attio/callback under Redirect URIs.

The OAuth tab of your Attio app, with the OneCLI Redirect URI.

In Attio, copy the app’s Client ID and Client secret. Paste both into Connections > Attio > Custom credentials, select Save & Connect, and allow access in Attio.

Permissions

OAuth connections request the following scopes. With an API key, you choose the scopes when you create the key in Attio.

What agents can do

  • Search and manage contacts, companies, and deals
  • Create and update records, custom objects, and attributes
  • Organize lists and list entries
  • Add notes, tasks, and comments to records
  • Upload and read files attached to records
  • Read meeting details and call recording transcripts
  • Manage webhooks for real-time updates

Disconnecting

You can disconnect Attio at any time. OAuth connections
  • In OneCLI, open Connections > Attio and remove the connection.
  • In Attio, you can also revoke access by uninstalling OneCLI from the installed apps section of your workspace settings.
API key connections
  • In OneCLI, open Connections > Attio and remove the connection.
  • In Attio, revoke or delete the API key so it can no longer be used.

Controlling access

Access is per agent: grant the connection to each agent that needs it, choosing per tool what runs freely, what needs human approval, and what stays blocked — a read-only agent is a single grant. Organization rules add guardrails on top, like rate limits and blanket blocks. Everything is checked before credential injection, so a blocked request never reaches Attio.