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

# POST /crm/allocations

`POST /crm/allocations`

API to create multiple allocations and assign to users based on common pool, workflow rule, or assignedTo number

## Query parameters

- `results` 'off' | 'all' | 'failed'

## Request body

- BulkAllocation — Schema for bulk add allocations request body
  - `processName` string, required — Process name in which these allocations should be created
  - `isCommonPool` boolean, nullable — When isCommonPool is true, all the allocations will be uploaded into common pool
  - `ruleName` string, nullable — Allocation rule name, based on which these allocations are being assigned
  - `assignedTo` string, nullable — Phone number of the user to which these allocations should be assigned. Phone number should have country code in it
  - `existingDataUpdateMethod` 'update' | 'override', nullable — Method to handle existing data updates. Either 'update' or 'override'
  - `allocations` object[], required — Array of allocations to be created. Minimum 1 and maximum 10 allocations per request
    - `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
    - `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
    - `whatsAppConsent` boolean, nullable — WhatsApp consent for this specific allocation

## Response `200`

If the auth token is valid.

- BulkAddAllocationsSuccess — Schema for bulk add allocations success response
  - `message` string
  - `statusCode` number
  - `data` object
    - `count` object
      - `success` number — Number of allocations that were successfully created
      - `failure` number — Number of allocations that failed to be created
    - `success` object[] — List of successfully created allocation rows
      - `name` string
      - `phone` string
      - `assignedTo` string, nullable — User to which the allocation was assigned
    - `failed` object[] — List of failed allocation rows
      - `name` string
      - `phone` string
      - `reason` string, nullable — Reason for failure

## 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)
