Skip to main content

Overview

OneCLI connects AI agents to Affinity using an API key. Agents can manage relationships, track deals, log interactions, and query your CRM data. The gateway injects the API key into requests to the Affinity API automatically. This is useful for agents that need to look up contacts, update deal pipelines, or log meeting notes without manual CRM data entry.

What you will set up

  • An Affinity API key stored in OneCLI
  • Automatic key injection on requests to the Affinity API
  • Per-agent, per-tool access to your CRM data

Setup

1

Create an API key in Affinity

Go to Settings > API in Affinity and create a new API key. Copy the key.
2

Connect in OneCLI

Open the OneCLI dashboard, go to Connections > Affinity, and paste your API key.
OneCLI connect window for Affinity, showing the setup guide link and the fields to fill in.

The Affinity connect window in OneCLI.

What agents can do

  • Search and view contacts, organizations, and opportunities
  • Create and update records in lists and deal pipelines
  • Log interactions such as emails, meetings, and notes
  • Query relationship data and field values
  • Manage list entries and custom fields

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 Affinity.

FAQ

Create a new key in Affinity under Settings > API, then paste it into Connections > Affinity in OneCLI. Agents pick up the new key automatically. Then delete the old key in Affinity.
Store it in OneCLI instead of an environment variable or prompt. The gateway injects it at the proxy, so the agent never holds the key. See How it works.
Yes. When you grant the connection, allow the read tools and block or require approval for writes. A read-only agent is a single grant.