Skip to content

EspoCRM API

Authentication

# Basic Auth
curl -X GET "https://crm.example.com/api/v1/Account" \
  -H "Authorization: Basic $(echo -n 'user:password' | base64)"

# API Key
curl -X GET "https://crm.example.com/api/v1/Account" \
  -H "X-Api-Key: {api-key}"

# OAuth 2.0
curl -X POST "https://crm.example.com/api/v1/Auth" \
  -d '{"grant_type": "client_credentials", "client_id": "...", "client_secret": "..."}'

CRUD operations

# GET - list
GET /api/v1/{entityType}?select=id,name&where[0][type]=equals&where[0][field]=status&where[0][value]=Active

# GET - detail
GET /api/v1/{entityType}/{id}

# POST - create
POST /api/v1/{entityType}
Content-Type: application/json
{"name": "Test", "status": "New"}

# PUT - update
PUT /api/v1/{entityType}/{id}
Content-Type: application/json
{"status": "Completed"}

# DELETE - delete
DELETE /api/v1/{entityType}/{id}

Metadata API

# All entities
GET /api/v1/Metadata

# Entity definition
GET /api/v1/Metadata/entityDefs/Account

# Entity fields
GET /api/v1/Metadata/entityDefs/Account/fields

# Layouts
GET /api/v1/Metadata/clientDefs/Account/layout/detail

➡️ Continue to Pohoda.