---
title: "Create an allocation template"
method: POST
path: "/demand/accounts/{account_id}/allocation-templates"
tags: ["Allocation Templates Admin"]
---

# Create an allocation template

`POST /demand/accounts/{account_id}/allocation-templates`

## Request

- Base URL: `https://api.cint.com/v1`
- URL: `https://api.cint.com/v1/demand/accounts/{account_id}/allocation-templates`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/cint/apis/demand-api/docs/demand/accounts/:account_id/allocation-templates/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a new allocation template for an account. You'll need to provide a template name and the allocation specifications, which define supplier blocks, distribution groups, and their respective percentages.

## Headers

- `idempotency-key` string, ulid, required: A unique ID that you can provide to safely retry requests without accidentally performing the same operation twice.

## Request body

- AllocationTemplateCreateRequest
  - `name` string, required: A descriptive name for the allocation template.
  - `supply_allocations` union[], required: A list of allocation objects. You must include a `type` field in each object (`blocked`, `group`, or `exchange`) to define its structure and purpose.
    - union
      - AllocationTemplateExchangeSupplier
        - `type` 'exchange', required: The type of supply allocation. For this object, the value is always `exchange`.
        - `percentage_max` integer, required: The inclusive maximum percentage of survey completes that can come from this allocation.
        - `percentage_min` integer, nullable, required: The inclusive minimum percentage of survey completes that can come from this allocation.
      - AllocationTemplateGroupSupplier
        - `type` 'group', required: The type of supply allocation. For this object, the value is always `group`.
        - `name` string, required: The name of the allocation group.
        - `percentage_max` integer, required: The inclusive maximum percentage of completes that can come from this allocation.
        - `percentage_min` integer, nullable, required: The inclusive minimum percentage of completes that can come from this allocation.
        - `suppliers` AllocationTemplateSupplier[], required
          - `supplier_id` integer, required: The ID of the supplier
      - AllocationTemplateBlockedSupplier
        - `type` 'blocked', required: The type of supply allocation. For this object, the value is always `blocked`.
        - `suppliers` AllocationTemplateSupplier[], required
          - `supplier_id` integer, required: The ID of the supplier

## Response `201`

The allocation template was created successfully. The Location header contains the URL for the new resource.

## Other responses

- `400`: A request is not valid and can't be processed.
- `401`: A request is unauthorized.
- `403`: A requested is forbidden.
- `404`: A requested resource isn't found.
- `500`: A request failed due to an internal error.

---

[API](https://skmtc.dev/cint/apis/demand-api.md) - [All operations](https://skmtc.dev/cint/apis/demand-api/llms.txt) - [OpenAPI document](https://skmtc.dev/cint/apis/demand-api/revisions/077a4bdda5cb?raw)
