---
title: "POST /api/v4/leads/unsorted/forms"
method: POST
path: "/api/v4/leads/unsorted/forms"
---

# POST /api/v4/leads/unsorted/forms

`POST /api/v4/leads/unsorted/forms`

## Request body

- UnsortedFormCreateItem[]
  - `request_id` string — Your request id to match request items with response items
  - `source_uid` string, required — Your stable id of the source: site/form/widget/integration that sent the lead
  - `source_name` string, required — Human-readable source name shown in amoCRM (e.g. "Website form", "Landing page")
  - `pipeline_id` integer — Pipeline id to place the created lead into
  - `created_at` integer — Unix timestamp (seconds) when the form entry was created
  - `_embedded` UnsortedEmbeddedCreate
    - `leads` LeadCreate[] — Create related entities together with unsorted (lead/contact/company)
      - `request_id` string — Client-side request id
      - `name` string
      - `price` integer
      - `responsible_user_id` integer
      - `group_id` integer
      - `status_id` integer
      - `pipeline_id` integer
      - `loss_reason_id` integer
      - `created_by` integer
      - `updated_by` integer
      - `closed_at` integer
      - `created_at` integer
      - `updated_at` integer
      - `visitor_uid` string — Website visitor uid from tracking; links this lead to a site visit
      - `custom_fields_values` CustomFieldValue[] — Custom fields payload
        - `field_id` integer — Use either field_id or field_code (e.g. PHONE/EMAIL)
        - `field_code` string — Field code (e.g. PHONE/EMAIL)
        - `values` CustomFieldValueItem[], required — Values for the field (multiple values allowed)
          - `value` union, required
            - string
            - integer
            - boolean
          - `enum_id` integer — Option id for list/select custom fields (one of predefined options)
          - `enum_code` string — Option code for list/select custom fields (if you use code instead of id)
      - `tags_to_add` Tag[] — Tags to attach
        - `id` integer
        - `name` string
        - `color` string
      - `_embedded` LeadCreateEmbedded
        - `tags` Tag[]
          - `id` integer
          - `name` string
          - `color` string
        - `contacts` ContactCreate[]
          - `id` integer
          - `name` string
          - `first_name` string
          - `last_name` string
          - `custom_fields_values` CustomFieldValue[] — Custom fields payload (same as contact create API)
            - `field_id` integer — Use either field_id or field_code (e.g. PHONE/EMAIL)
            - `field_code` string — Field code (e.g. PHONE/EMAIL)
            - `values` CustomFieldValueItem[], required — Values for the field (multiple values allowed)
              - …
        - `companies` CompanyCreate[]
          - `id` integer
          - `name` string
        - `metadata` LeadUnsortedMetadata
          - `category` 'sip' | 'forms' | 'chats' | 'mail' — Unsorted category
          - `ip` string — IP address of the submitter
          - `form_id` union — Form id in your system (string or numeric)
            - string
            - integer
          - `form_sent_at` integer — Unix timestamp (seconds) when the form was submitted
          - `form_name` string — Form name (shown in amoCRM)
          - `form_page` string — Page URL where form lives
          - `referer` string — Referrer URL
          - `visitor_uid` string — Visitor uid from tracking, if you have it
          - `form_type` integer — Form type code from amoCRM, use only if you know it
        - `source` LeadSourceRef
          - `external_id` union — External id in your system
            - string
            - integer
            - boolean
          - `type` string — Source type
    - `contacts` ContactCreate[]
      - `id` integer
      - `name` string
      - `first_name` string
      - `last_name` string
      - `custom_fields_values` CustomFieldValue[] — Custom fields payload (same as contact create API)
        - `field_id` integer — Use either field_id or field_code (e.g. PHONE/EMAIL)
        - `field_code` string — Field code (e.g. PHONE/EMAIL)
        - `values` CustomFieldValueItem[], required — Values for the field (multiple values allowed)
          - `value` union, required
            - string
            - integer
            - boolean
          - `enum_id` integer — Option id for list/select custom fields (one of predefined options)
          - `enum_code` string — Option code for list/select custom fields (if you use code instead of id)
    - `companies` CompanyCreate[]
      - `id` integer
      - `name` string
  - `metadata` FormMetadata, required
    - `ip` string — IP address of the submitter
    - `form_id` union — Form id in your system (string or numeric)
      - string
      - integer
    - `form_sent_at` integer — Unix timestamp (seconds) when the form was submitted
    - `form_name` string — Form name (shown in amoCRM)
    - `form_page` string — Page URL where form lives
    - `referer` string — Referrer URL
    - `visitor_uid` string — Visitor uid from tracking, if you have it
    - `form_type` integer — Form type code from amoCRM, use only if you know it

## Response `200`

The request has succeeded.

- union
  - UnsortedCreateResponse
    - `_total_items` integer
    - `_embedded` object
      - `unsorted` UnsortedCreatedItem[]
        - `uid` string
        - `account_id` integer
        - `request_id` string — Echoed request id
        - `_links` object
        - `_embedded` UnsortedCreatedEmbedded
          - `leads` RefEntity[]
            - `id` integer
            - `_links` object
          - `contacts` RefEntity[]
            - `id` integer
            - `_links` object
          - `companies` RefEntity[]
            - `id` integer
            - `_links` object
  - Problem
    - `title` string
    - `status` integer
    - `detail` string
    - `type` string

## Changes

- **2026-02-02** `1e3996435299` — 2 breaking, 1 warning, 14 info
  - added `#/components/schemas/LeadCreateEmbedded` to the `items/_embedded/allOf[#/components/schemas/UnsortedEmbeddedCreate]/leads/items/_embedded` request property `allOf` list
  - the `items/_embedded/allOf[#/components/schemas/UnsortedEmbeddedCreate]/leads/items/_embedded` request property type/format changed from `object`/`` to ``/``
  - removed the request property `items/_embedded/allOf[#/components/schemas/UnsortedEmbeddedCreate]/leads/items/_embedded/tags`
  - added the new optional request property `items/_embedded/allOf[#/components/schemas/UnsortedEmbeddedCreate]/companies/items/id`
  - …13 more
- **2026-01-28** `39c245825cb9` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/hexlet/apis/amocrm-api/changes/api/v4/leads/unsorted/forms/post.md)

---

[API](https://skmtc.dev/hexlet/apis/amocrm-api.md) · [All operations](https://skmtc.dev/hexlet/apis/amocrm-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/hexlet/amocrm-api/revisions/800f4ed7083b/schema)
