v1

latestOpenAPI 3.1.02026-07-1414757122.7 KB
items

Create CRM entity item

Creates a new CRM entity item (lead, deal, contact, or company). Example: POST /crm/v1/entities/leads

post/crm/v1/entities/{entity}

Request body

titlestring
ownerinteger
sourcestring
funnel_idinteger

Example request

{
  "title": "Lead example",
  "owner": 1,
  "source": "shop",
  "funnel_id": 5,
  "email": [
    {
      "id": "",
      "type": "main",
      "value": "stark@gmail.com",
      "main": true
    },
    {
      "id": "01gdnpddf5xgzxqvcn4x83mc2s",
      "type": "work",
      "value": "benner@gmail.com",
      "main": false
    }
  ],
  "phone": [
    {
      "id": "01gdnpddf5xgzxqvcn4x83mc2s",
      "type": "WORK",
      "value": "+380123456789",
      "code": "+380"
    }
  ],
  "messengers": [
    {
      "id": "01gdnpddf5xgzxqvcn4x83bn2s",
      "type": "facebook",
      "link": "https://www.facebook.com"
    }
  ]
}

Response

Created

titlestring
ownerinteger
created_byinteger
changed_byinteger
convertedboolean
first_namestring
last_namestring
patronymicstring
company_namestring
positionstring
utm_sourcestring
utm_mediumstring
utm_campaignstring
utm_contentstring
utm_termstring
kanban_statusstring
kanban_reason_idinteger
kanban_stage_idinteger
idinteger
created_atinteger
updated_atinteger

Example response

{
  "title": "Lead example",
  "owner": 1,
  "created_by": 1,
  "changed_by": 1,
  "first_name": "Johnny",
  "last_name": "Stark",
  "position": "Owner",
  "source": {
    "title": "Shop",
    "value": "shop",
    "color": "#6AD01F",
    "sort": 20,
    "selected": true
  },
  "email": [
    {
      "id": "",
      "type": "main",
      "value": "stark@gmail.com",
      "main": true
    },
    {
      "id": "01gdnpddf5xgzxqvcn4x83mc2s",
      "type": "work",
      "value": "benner@gmail.com",
      "main": false
    }
  ],
  "phone": [
    {
      "id": "01gdnpddf5xgzxqvcn4x83mc2s",
      "type": "WORK",
      "value": "+380123456789",
      "code": "+380"
    }
  ],
  "messengers": [
    {
      "id": "01gdnpddf5xgzxqvcn4x83bn2s",
      "type": "facebook",
      "link": "https://www.facebook.com"
    }
  ],
  "kanban_status": "IN_WORK",
  "kanban_reason_id": 11,
  "kanban_stage_id": 22,
  "id": 12,
  "created_at": 12156465,
  "updated_at": 12156465
}