> ## Documentation Index
> Fetch the complete documentation index at: https://docs.priceos.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Bonus

> Create a one-time bonus amount for a customer feature.



## OpenAPI

````yaml POST /v1/bonuses
openapi: 3.1.0
info:
  title: PriceOS Public API
  version: 1.0.0
servers: []
security: []
paths:
  /v1/bonuses:
    post:
      summary: Create bonus
      description: Create a one-time bonus amount for a customer feature.
      parameters:
        - schema:
            type: string
            description: API key from your PriceOS dashboard.
          required: true
          description: API key from your PriceOS dashboard.
          name: x-api-key
          in: header
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                customerId:
                  type: string
                  description: Internal customer ID.
                featureKey:
                  type: string
                  description: Feature key to create bonus for.
                amount:
                  type: number
                  exclusiveMinimum: 0
                  description: Bonus amount to create.
                expiresAt:
                  type: integer
                  description: Optional Unix timestamp (ms) when the bonus expires.
                reason:
                  type:
                    - string
                    - 'null'
                  description: Optional reason for the bonus.
                metadata:
                  type: object
                  additionalProperties:
                    type: string
                  description: Optional metadata for the bonus (string key/value pairs).
              required:
                - customerId
                - featureKey
                - amount
      responses:
        '200':
          description: Bonus created
          content:
            application/json:
              schema:
                type: object
                properties:
                  bonusId:
                    type: string
                    format: uuid
                    description: Bonus ID.
                  remainingAmount:
                    type: number
                    description: Remaining amount for the newly created grant.
                  counterRemaining:
                    type: number
                    description: Total remaining bonus amount for this customer + feature.
                required:
                  - bonusId
                  - remainingAmount
                  - counterRemaining
                description: Bonus create result.
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message.
                required:
                  - error
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message.
                required:
                  - error
        '404':
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message.
                required:
                  - error
        '500':
          description: Server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message.
                required:
                  - error
      x-codeSamples:
        - lang: typescript
          label: Node.js
          source: >-
            import { PriceOS } from "priceos";

            import type { MyFeatures } from "./priceos.types";


            const priceos = new
            PriceOS<MyFeatures>(process.env.PRICEOS_API_KEY!);


            const bonus = await priceos.bonuses.create({
              customerId: "customer_123",
              featureKey: "api_calls",
              amount: 100,
              reason: "promotion",
            });
        - lang: bash
          label: cURL
          source: |-
            curl -X POST "https://api.priceos.com/v1/bonuses" \
              -H "x-api-key: PRICEOS_API_KEY" \
              -H "Content-Type: application/json" \
              -d '{
                "customerId": "customer_123",
                "featureKey": "api_calls",
                "amount": 100,
                "reason": "promotion"
              }'

````