Bitrix24 REST API via curl. Use this skill to manage CRM (leads, deals, contacts), tasks, and users.
/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.
Use the Bitrix24 REST API via direct curl calls to manage CRM, tasks, and users in your Bitrix24 workspace.
Official docs:
https://apidocs.bitrix24.com/
Use this skill when you need to:
export BITRIX_WEBHOOK_URL="https://your-domain.bitrix24.com/rest/1/your-secret-code"
https://[domain]/rest/[user-id]/[secret-code]/[method].json
domain: Your Bitrix24 addressuser-id: Webhook creator's IDsecret-code: Authentication token (keep secure)method: API method nameImportant: 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 .
All examples assume BITRIX_WEBHOOK_URL is set to your webhook base URL.
Get information about the authenticated user:
bash -c 'curl -s -X GET "${BITRIX_WEBHOOK_URL}/user.current.json"' | jq .
Response:
{
"result": {
"ID": "1",
"NAME": "John",
"LAST_NAME": "Doe",
"EMAIL": "john@example.com"
}
}
Get a list of users in the workspace:
bash -c 'curl -s -X GET "${BITRIX_WEBHOOK_URL}/user.get.json"' | jq '.result[] | {ID, NAME, LAST_NAME, EMAIL}
bash -c 'curl -s -X POST "${BITRIX_WEBHOOK_URL}/crm.lead.add.json" --header "Content-Type: application/json" -d '"'"'{
"fields": {
"TITLE": "New Lead from API",
"NAME": "John",
"LAST_NAME": "Doe",
"PHONE": [{"VALUE": "+1234567890", "VALUE_TYPE": "WORK"}],
"EMAIL": [{"VALUE": "john@example.com", "VALUE_TYPE": "WORK"}]
}
}'"'"' | jq .'
Response:
{
"result": 123
}
LEAD_ID="123"
bash -c 'curl -s -X GET "${BITRIX_WEBHOOK_URL}/crm.lead.get.json?id=${LEAD_ID}"' | jq .
bash -c 'curl -s -X GET "${BITRIX_WEBHOOK_URL}/crm.lead.list.json"' | jq '.result[] | {ID, TITLE, STATUS_ID}
With filter:
bash -c 'curl -s -X POST "${BITRIX_WEBHOOK_URL}/crm.lead.list.json" --header "Content-Type: application/json" -d '"'"'{
"filter": {"STATUS_ID": "NEW"},
"select": ["ID", "TITLE", "NAME", "PHONE"]
}'"'"' | jq .'
LEAD_ID="123"
curl -s -X POST "${BITRIX_WEBHOOK_URL}/crm.lead.update.json" --header "Content-Type: application/json" -d "{
\"id\": ${LEAD_ID},
\"fields\": {
\"STATUS_ID\": \"IN_PROCESS\",
\"COMMENTS\": \"Updated via API\"
}
}" | jq .
LEAD_ID="123"
bash -c 'curl -s -X GET "${BITRIX_WEBHOOK_URL}/crm.lead.delete.json?id=${LEAD_ID}"' | jq .
bash -c 'curl -s -X POST "${BITRIX_WEBHOOK_URL}/crm.contact.add.json" --header "Content-Type: application/json" -d '"'"'{
"fields": {
"NAME": "Jane",
"LAST_NAME": "Smith",
"PHONE": [{"VALUE": "+1987654321", "VALUE_TYPE": "MOBILE"}],
"EMAIL": [{"VALUE": "jane@example.com", "VALUE_TYPE": "WORK"}]
}
}'"'"' | jq .'
bash -c 'curl -s -X GET "${BITRIX_WEBHOOK_URL}/crm.contact.list.json"' | jq '.result[] | {ID, NAME, LAST_NAME}
bash -c 'curl -s -X POST "${BITRIX_WEBHOOK_URL}/crm.deal.add.json" --header "Content-Type: application/json" -d '"'"'{
"fields": {
"TITLE": "New Deal from API",
"STAGE_ID": "NEW",
"OPPORTUNITY": 5000,
"CURRENCY_ID": "USD"
}
}'"'"' | jq .'
bash -c 'curl -s -X GET "${BITRIX_WEBHOOK_URL}/crm.deal.list.json"' | jq '.result[] | {ID, TITLE, STAGE_ID, OPPORTUNITY}
DEAL_ID="456"
curl -s -X POST "${BITRIX_WEBHOOK_URL}/crm.deal.update.json" --header "Content-Type: application/json" -d "{
\"id\": ${DEAL_ID},
\"fields\": {
\"STAGE_ID\": \"WON\"
}
}" | jq .
bash -c 'curl -s -X POST "${BITRIX_WEBHOOK_URL}/tasks.task.add.json" --header "Content-Type: application/json" -d '"'"'{
"fields": {
"TITLE": "New Task from API",
"DESCRIPTION": "Task description here",
"RESPONSIBLE_ID": 1,
"DEADLINE": "2025-12-31"
}
}'"'"' | jq .'
bash -c 'curl -s -X GET "${BITRIX_WEBHOOK_URL}/tasks.task.list.json"' | jq '.result.tasks[] | {id, title, status}
TASK_ID="789"
bash -c 'curl -s -X GET "${BITRIX_WEBHOOK_URL}/tasks.task.complete.json?taskId=${TASK_ID}"' | jq .
Get available fields for any entity:
# Lead fields
bash -c 'curl -s -X GET "${BITRIX_WEBHOOK_URL}/crm.lead.fields.json"' | jq .
# Contact fields
bash -c 'curl -s -X GET "${BITRIX_WEBHOOK_URL}/crm.contact.fields.json"' | jq .
# Deal fields
bash -c 'curl -s -X GET "${BITRIX_WEBHOOK_URL}/crm.deal.fields.json"' | jq .
| Parameter | Description |
|---|---|
filter | Filter results (e.g., {"STATUS_ID": "NEW"}) |
select | Fields to return (e.g., ["ID", "TITLE"]) |
order | Sort order (e.g., {"ID": "DESC"}) |
start | Pagination offset |
*.fields.json methods to get valid field namesstart parameter for large datasets