---
title: "POST /crm/allocation"
method: POST
path: "/crm/allocation"
tags: ["CRM"]
---

# POST /crm/allocation

`POST /crm/allocation`

Api to create an allocation to a user or common pool

## Query parameters

- `isCommonPool` boolean

## Request body

- Allocation — Schema for add allocation Body
  - `customer` object, required — Customer details
    - `name` string, required — Name of the customer
    - `phoneNumber` string, required — Phone number of the customer with country code
    - `email` string, nullable — Email of the customer
    - `company` object, nullable — Company details of the customer
      - `name` string, nullable — Name of the company
      - `address` object, nullable — Address of the company
        - `street` string, nullable — Street name
        - `city` string, nullable — City name
        - `state` string, nullable — State name
        - `country` string, nullable — Country name
        - `pincode` number, nullable — Pincode
      - `kdm` object, nullable — Key decision maker details of the company
        - `name` string, nullable — Kdm name
        - `phoneNumber` string, nullable — Phone number of the kdm
  - `priority` 3 | 2 | 1 | -1, nullable — Priority of the customer. 3 -> HIGH, 2 -> MEDIUM, 1 -> LOW, -1 -> NOT MENTIONED
  - `notes` string, nullable — Remarks given by the user
  - `processName` string, nullable — Process name in which this lead should be assigned
  - `ruleName` string, nullable — Allocation rule name based on which this lead is being assigned
  - `userFields` object[], nullable — User defined crm fields for the customer
    - `name` string, required — Name of the crm field. Should be same as the one defined in the excel template/crm fields in the admin panel
    - `value` union, required — Value of the crm field. For date field, provide epoch value in seconds
      - string
      - number
  - `assignedTo` string, required — Phone number of the user to which this allocation should be assigned. Phone number should have country code in it

## Response `200`

If the auth token is valid.

- AddAllocationSuccess — Schema for success response
  - `message` string
  - `statusCode` number

## Other responses

- `403` — UnAuthorized.

---

[API](https://skmtc.dev/runo/apis/api-documentation.md) · [All operations](https://skmtc.dev/runo/apis/api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/runo/api-documentation/revisions/19460dffac44/schema)
