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

# Create Promo

> Create a promo code for a coupon



## OpenAPI

````yaml https://api.getmeasure.com/api/v1/docs/api_spec.json post /companies/{company_id}/coupons/{id}/promo
openapi: 3.1.0
info:
  title: Measure API
  description: APIs to communicate with Measure
  version: 1.0.0
servers:
  - url: https://api.getmeasure.com/api/v1
security: []
paths:
  /companies/{company_id}/coupons/{id}/promo:
    post:
      tags:
        - Coupons
      summary: Create Promo
      description: Create a promo code for a coupon
      operationId: Create_Promo
      parameters:
        - name: company_id
          in: path
          description: 'The company ID with the prefix ''cmp_''. '
          required: true
          schema:
            description: 'The company ID with the prefix ''cmp_''. '
            type: string
        - name: id
          in: path
          description: The resource ID
          required: true
          schema:
            description: The resource ID
            type: string
        - name: Idempotency-Key
          in: header
          description: >-
            The idempotency key that will be used to ensure the request is only
            performed once
          schema:
            description: >-
              The idempotency key that will be used to ensure the request is
              only performed once
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RequestCreatePromoCodeRequest'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponsePromoCodeRepresentation'
      deprecated: false
      security:
        - apiKey:
            - ''
components:
  schemas:
    RequestCreatePromoCodeRequest:
      properties:
        code:
          description: The promo code customers enter to redeem the coupon
          type: string
        description:
          description: A description of the promo code
          type: string
        metadata:
          additionalProperties: true
          description: Arbitrary key-value metadata to store with the promo code
          type: object
      required:
        - code
      type: object
    ResponsePromoCodeRepresentation:
      properties:
        code:
          type: string
        coupon_id:
          type: string
        created_at:
          format: date-time
          type: string
        description:
          type: string
        expiration_date:
          format: date-time
          type:
            - 'null'
            - string
        id:
          type: string
        import_created_at_ref:
          format: date-time
          type:
            - 'null'
            - string
        import_ref:
          type:
            - 'null'
            - string
        imported_from:
          type:
            - 'null'
            - string
        max_redemptions:
          format: int64
          type: integer
        metadata:
          additionalProperties: true
          type: object
        num_redemptions:
          format: int64
          type: integer
        restrictions:
          additionalProperties: true
          type: object
        state:
          type: string
      type: object
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.