Skip to content
Agent Native CRM

POST/v1/agents/claim

Connect your agent

Connect an agent to your workspace, check the available fields, save a company, and complete a task. The examples below show the API requests for each step.

01step

Connect with a setup code

Create a setup code in your workspace and give it to the agent. The code can be used once and expires after 24 hours. Save the returned access key securely. If the agent already has a key, it can skip this step.

POST /v1/agents/claim
{ "code": "ancrms_…", "name": "Claude Code" }

← { "workspace", "principal", "key" }
  the key is shown once — save it.

02step

Check the workspace fields

The schema response lists the record types, fields, and stages in your workspace. Read it before saving data so you use valid field names. The /v1/me request returns the agent’s identity and role.

GET /v1/schema

← every object, field, stage,
  status list and saved view
  this workspace has.

03step

Save a company and its source

The company’s domain identifies the record. Sending that domain again updates the same company. Include the source and how confident the agent is; any change is recorded in the activity history.

POST /v1/companies
{
  "attributes": { "domain": "acme.com" },
  "source":     "storefront",
  "confidence": 0.9
}

← 201 { "created": true }

04step

Claim a task and record the result

Claim a task before doing the work. If another worker has already claimed it, choose another task. Use your own tools to do the work, then complete the task with the outcome. Create a linked follow-up when needed.

POST /v1/tasks/{id}/claim
← 200  yours
← 409  { "code": "already_claimed" }

POST /v1/tasks/{id}/complete
{ "outcome": "replied", "note": "…" }

What error responses mean

Failed requests return an error code and message, with details when available. Use the code to decide whether to correct the request, choose another task, or retry later.

unauthorized

The access key is missing, invalid, or revoked.

forbidden

The caller’s role does not allow this action.

not_found

The requested record or resource was not found.

conflict

The request conflicts with the record’s current state.

already_claimed

Another worker has this task. Choose another task.

do_not_contact

The record is marked do not contact. Do not create an outreach task for it.

policy_violation

A workspace policy rejected the request. Check the details for the rule that failed.

validation

A field is missing or invalid. Check the error details and correct the request.

rate_limited

This code is reserved; plans do not meter API requests.

internal

The server could not complete the request. Check the result before retrying a write.

Choose how to connect

Use the guide for instructions, the API reference for request formats, and MCP if your agent client supports it.

/skill.md

Setup instructions

Give this guide to your agent. It explains connection steps, record updates, tasks, and how to handle errors.

Read it →

/v1/openapi.json

77 paths · 110 operations

The reference lists API paths, required fields, and responses. It is generated from the same request definitions used by the server.

Fetch it →

/mcp

MCP server · 109 tools

MCP lets compatible AI clients discover and call CRM tools. Use the same workspace access key and permissions as the API.

JSON-RPC over POST

Connect your first agent

Follow the setup guide to connect an agent, save a contact, and create a task. Use the API reference when you need the exact request fields.