---
title: "Create showback"
method: POST
path: "/v1/cost-allocation"
tags: ["Cost allocation"]
---

# Create showback

`POST /v1/cost-allocation`

## Request

- Base URL: `https://api.nops.io`
- URL: `https://api.nops.io/v1/cost-allocation`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/nops/apis/nops-public-api/docs/v1/cost-allocation/post.ts> (a function with typed inputs; its response is checked against the schema)

## Headers

- `Idempotency-Key` string, required: Unique key for safe retries on write requests (required, max 64 characters).

## Request body

- object
  - `name` string, required
  - `allocationTagType` 'tags' | 'labels' | 'cost_allocation_tags'
  - `valueDimension` string
  - `tagKeys` string[]
  - `extraValues` string[]
  - `baseFilters` object[]
    - `dimension` string, required
    - `mode` 'include' | 'exclude', required
    - `values` string[], required
    - `valueModes` object
    - `texts` object[]
      - `mode` 'include' | 'exclude', required
      - `text` string, required
    - `textCombinator` 'and' | 'or'
    - `keyCombinator` 'and' | 'or'
    - `tagKeyOnly` boolean
    - `includePreAttributionHistory` true
  - `category` 'ai_agents' | 'ai_seats' | 'ai', nullable
  - `valueSource` 'rules' | 'dimension' | 'tag_keys', required
  - `rules` object[]
    - `name` string, required
    - `showbackValue` string
    - `filters` object[]
      - `dimension` string, required
      - `mode` 'include' | 'exclude', required
      - `values` string[], required
      - `valueModes` object
      - `texts` object[]
        - `mode` 'include' | 'exclude', required
        - `text` string, required
      - `textCombinator` 'and' | 'or'
      - `keyCombinator` 'and' | 'or'
      - `tagKeyOnly` boolean
      - `includePreAttributionHistory` true
    - `distributionByPercent` boolean
    - `percentageAllocationType` 'BY_SPEND' | 'CUSTOM_PERCENT' | 'CUSTOM_BY_SPEND' | 'EVENLY'
    - `costDistribution` object
    - `dimensionFilters` object[]
      - `dimension` string, required
      - `mode` 'include' | 'exclude', required
      - `values` string[], required
      - `valueModes` object
      - `texts` object[]
        - `mode` 'include' | 'exclude', required
        - `text` string, required
      - `textCombinator` 'and' | 'or'
      - `keyCombinator` 'and' | 'or'
      - `tagKeyOnly` boolean
      - `includePreAttributionHistory` true
    - `clearDimensionFilter` boolean

## Response `200`

Create showback

- object
  - `data` object, required: JSON object

## Other responses

- `401`: Unauthorized — invalid or missing API key
- `403`: Forbidden — insufficient permissions or entitlement

---

[API](https://skmtc.dev/nops/apis/nops-public-api.md) - [All operations](https://skmtc.dev/nops/apis/nops-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nops/apis/nops-public-api/revisions/ac549fa495dd?raw)
