> ## Documentation Index
> Fetch the complete documentation index at: https://deepline.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Use Affinity in Deepline

> Use the dated Affinity API V2 actions with the workspace’s own key. Includes SDK V2 guidance, input constraints, response fields, and Deepline credit cost.

[Human guide: work with your agent →](https://deepline.com/docs/human/providers/affinity/guide.md)
Inspect one Affinity action before starting provider-backed work. Your first result is a verified input and output contract.

## Provider-specific requirements

Use these actions only with the workspace's connected Affinity API key.

All actions target Affinity API V2 and pin version `2026-07-15`. Prefer reads
before writes when resolving IDs. List, person, company, opportunity, note, and
field IDs are provider identifiers, not display names.

Actions whose names or descriptions say create, update, merge, send, or delete
change the connected Affinity workspace. Confirm the intended resource and
payload before executing them. Affinity applies the connected user's resource
and endpoint permissions.

Pagination, filters, beta status, and required permissions come from the dated
official Affinity OpenAPI contract. Handle 429 responses with backoff because
Affinity limits each authenticated user and also applies account-level monthly
and concurrency limits.

## Find an applicable action

Confirm your effective workspace, then search the live catalog:

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline auth status --json
deepline search "Affinity" --type tools --json
```

Search returns candidates. Check the returned provider and operation rather than selecting a similar title automatically.

## Inspect the selected contract

Replace `<returned-tool-id>` with the identifier returned by discovery:

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline describe <returned-tool-id> --json
```

These commands do not execute the selected provider action. Read its required inputs, supported access mode, pricing unit, outputs, and limits.

A connection does not establish that every action supports BYOK. Follow the provider-specific requirements above and the live action contract.

## Prepare one reviewed input

Use one authorized record that matches the inspected schema. Preserve its source identity and define the result you will accept.

Open the action reference for its payload and response shape. Provider-backed execution can incur usage or external effects.

For reusable logic, follow [Write Plays](https://deepline.com/docs/sdk-v2/plays.md). For direct-call recovery, use [Tool execution recovery](https://deepline.com/docs/sdk-v2/tool-execution-recovery.md).

> [!TIP]
>
> Continue only when the workspace, provider, required fields, acceptance rule, and applicable price are understood. Keep unavailable access separate from no-result evidence.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.