Open-source CRM API for managing people, companies, notes, tasks and custom objects
/plugin marketplace add vm0-ai/api0/plugin install api0@api0This skill inherits all available tools. When active, it can use any tool Claude has access to.
Open-source modern CRM platform. Manage people, companies, opportunities, notes, and tasks via REST or GraphQL API.
Official docs: https://docs.twenty.com/developers/api-and-webhooks/api
Use this skill when you need to:
Set environment variables:
# For Twenty Cloud
export TWENTY_API_KEY="your-api-key"
export TWENTY_API_URL="https://api.twenty.com"
# For self-hosted instances
export TWENTY_API_URL="https://your-domain.com"
Important: When using
$VARin a command that pipes to another command, wrap the command containing$VARinbash -c '...'. Due to a Claude Code bug, environment variables are silently cleared when pipes are used directly.bash -c 'curl -s "https://api.example.com" -H "Authorization: Bearer $API_KEY"' | jq .
bash -c 'curl -s -X GET "${TWENTY_API_URL}/rest/companies" --header "Authorization: Bearer ${TWENTY_API_KEY}"' | jq '.data.companies[:3]
With pagination:
bash -c 'curl -s -X GET "${TWENTY_API_URL}/rest/companies?limit=10&offset=0" --header "Authorization: Bearer ${TWENTY_API_KEY}"' | jq .
bash -c 'curl -s -X POST "${TWENTY_API_URL}/rest/companies" --header "Authorization: Bearer ${TWENTY_API_KEY}" --header "Content-Type: application/json" -d '"'"'{
"name": "Acme Corp",
"domainName": "acme.com",
"address": "123 Main St, San Francisco, CA"
}'"'"' | jq .'
bash -c 'curl -s -X GET "${TWENTY_API_URL}/rest/people" --header "Authorization: Bearer ${TWENTY_API_KEY}"' | jq '.data.people[:3]
bash -c 'curl -s -X POST "${TWENTY_API_URL}/rest/people" --header "Authorization: Bearer ${TWENTY_API_KEY}" --header "Content-Type: application/json" -d '"'"'{
"name": {
"firstName": "John",
"lastName": "Doe"
},
"email": "john@example.com",
"phone": "+1234567890"
}'"'"' | jq .'
Note: Replace
{companyId}and{personId}with actual IDs obtained from the "List Companies" or "List People" endpoints above (look for theidfield in the response).
# Get company by ID
bash -c 'curl -s -X GET "${TWENTY_API_URL}/rest/companies/{companyId}" --header "Authorization: Bearer ${TWENTY_API_KEY}"' | jq .
# Get person by ID
bash -c 'curl -s -X GET "${TWENTY_API_URL}/rest/people/{personId}" --header "Authorization: Bearer ${TWENTY_API_KEY}"' | jq .
Note: Replace
{companyId}with an actual company ID from the "List Companies" endpoint above.
bash -c 'curl -s -X PATCH "${TWENTY_API_URL}/rest/companies/{companyId}" --header "Authorization: Bearer ${TWENTY_API_KEY}" --header "Content-Type: application/json" -d '"'"'{
"name": "Acme Corporation",
"employees": 500
}'"'"' | jq .'
Note: Replace
{companyId}with an actual company ID from the "List Companies" endpoint above.
curl -s -X DELETE "${TWENTY_API_URL}/rest/companies/{companyId}" --header "Authorization: Bearer ${TWENTY_API_KEY}"
bash -c 'curl -s -X GET "${TWENTY_API_URL}/rest/notes" --header "Authorization: Bearer ${TWENTY_API_KEY}"' | jq '.data.notes[:3]
bash -c 'curl -s -X POST "${TWENTY_API_URL}/rest/notes" --header "Authorization: Bearer ${TWENTY_API_KEY}" --header "Content-Type: application/json" -d '"'"'{
"title": "Meeting Notes",
"body": "Discussed Q1 roadmap and budget allocation."
}'"'"' | jq .'
bash -c 'curl -s -X GET "${TWENTY_API_URL}/rest/tasks" --header "Authorization: Bearer ${TWENTY_API_KEY}"' | jq '.data.tasks[:3]
bash -c 'curl -s -X POST "${TWENTY_API_URL}/rest/tasks" --header "Authorization: Bearer ${TWENTY_API_KEY}" --header "Content-Type: application/json" -d '"'"'{
"title": "Follow up with client",
"dueAt": "2025-01-15T10:00:00Z",
"status": "TODO"
}'"'"' | jq .'
List all object types and their fields:
bash -c 'curl -s -X GET "${TWENTY_API_URL}/rest/metadata/objects" --header "Authorization: Bearer ${TWENTY_API_KEY}"' | jq '.data.objects[] | {name: .nameSingular, fields: [.fields[].name]}
Get metadata for a specific object:
bash -c 'curl -s -X GET "${TWENTY_API_URL}/rest/metadata/objects/companies" --header "Authorization: Bearer ${TWENTY_API_KEY}"' | jq .
bash -c 'curl -s -X POST "${TWENTY_API_URL}/graphql" --header "Authorization: Bearer ${TWENTY_API_KEY}" --header "Content-Type: application/json" -d '"'"'{
"query": "query { companies(first: 5) { edges { node { id name domainName } } } }"
}'"'"' | jq '"'"'.data.companies.edges'"'"''
| Category | Endpoint | Description |
|---|---|---|
| Core Objects | /rest/companies | Manage companies |
/rest/people | Manage contacts | |
/rest/opportunities | Manage deals/opportunities | |
/rest/notes | Manage notes | |
/rest/tasks | Manage tasks | |
/rest/activities | Activity timeline | |
| Metadata | /rest/metadata/objects | List all object schemas |
/rest/metadata/objects/{name} | Get specific object schema | |
/rest/metadata/picklists | Get dropdown field options | |
| GraphQL | /graphql | GraphQL endpoint |
| Parameter | Description |
|---|---|
limit | Number of records to return (default: 20) |
offset | Number of records to skip |
filter | Filter conditions (JSON) |
orderBy | Sort order |
Example with filters:
bash -c 'curl -s -X GET "${TWENTY_API_URL}/rest/companies?filter={\"name\":{\"like\":\"%Acme%\"}}" --header "Authorization: Bearer ${TWENTY_API_KEY}"' | jq .
{
"data": {
"companies": [
{
"id": "uuid",
"name": "Company Name",
"domainName": "example.com",
"createdAt": "2025-01-01T00:00:00Z",
"updatedAt": "2025-01-01T00:00:00Z"
}
]
},
"pageInfo": {
"hasNextPage": true,
"endCursor": "cursor-string"
}
}