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

# Create discount

> A discount with no code cannot be applied to an order. Create a discount code to hand it out on an event.



## OpenAPI

````yaml /openapi.json post /{company}/discounts/create
openapi: 3.1.0
info:
  title: Animo API
  version: 1.1.0
  description: >-
    Animo events platform API. Orchestrate setup and operations — never rebuild
    payments, VAT, invoicing, or form submission ingest. Read
    https://docs.animo.co/for-ai-agents before integrating.
  contact:
    name: Animo support
    email: support@animo.co
    url: https://docs.animo.co
servers:
  - url: https://app.animo.co/api/v1
    description: Production
security:
  - bearerAuth: []
tags:
  - name: User
    description: Authenticated user
  - name: Companies
    description: Company context
  - name: Events
    description: Event management
  - name: Ticket types
    description: Ticket types for organizing events
  - name: Discounts
    description: Discounts and the promo codes that hand them out
  - name: Schedule
    description: 'The event agenda: days, locations and activities'
  - name: Speakers
    description: Company-level speakers, billed on activities
  - name: Orders
    description: Registrations and orders
  - name: Forms
    description: Form definitions
  - name: Activations
    description: Lead-generation activations
  - name: Webhooks
    description: Outbound webhooks (Pro)
paths:
  /{company}/discounts/create:
    post:
      tags:
        - Discounts
      summary: Create discount
      description: >-
        A discount with no code cannot be applied to an order. Create a discount
        code to hand it out on an event.
      operationId: createDiscount
      parameters:
        - name: company
          in: path
          required: true
          schema:
            type: string
          description: Company sqid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - type
              properties:
                name:
                  type: string
                  maxLength: 255
                type:
                  type: string
                  enum:
                    - fixed_amount
                    - percentage
                    - bundle
                amount:
                  type: string
                  description: >-
                    Required unless type is bundle, where it is prohibited.
                    Major units on fixed_amount, the percentage on percentage
                    (max 100). Two decimals at most
                bundle_quantity:
                  type: integer
                  description: >-
                    type=bundle only. How many products the buyer gets. Greater
                    than free_quantity
                free_quantity:
                  type: integer
                  description: type=bundle only. How many of those are free. Greater than 0
                is_active:
                  type: boolean
                  default: true
      responses:
        '201':
          description: Created discount
        '422':
          description: Validation error
      security:
        - bearerAuth:
            - discounts:create
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: OAuth2 personal access token from User settings → API tokens

````

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