openapi: 3.1.0 info: title: Buttondown Coupons API version: 1.0.0 description: The Buttondown API lets you manage newsletters, subscribers, emails, and more. See [the documentation](https://docs.buttondown.com/api-introduction) for guides and examples. license: name: MIT url: https://opensource.org/licenses/MIT servers: - url: https://api.buttondown.com/v1 security: - ApiKeyAuth: [] tags: - name: Coupons paths: /coupons: get: operationId: list_coupons summary: List Coupons parameters: - in: query name: page required: false description: The page number of the paginated response. schema: type: integer title: Page description: The page number of the paginated response. default: 1 example: 1 responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/StripeCouponPage' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorMessage' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/ErrorMessage' '409': description: Conflict '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorMessage' '429': description: Too Many Requests headers: Retry-After: description: Seconds to wait before retrying. schema: type: integer X-RateLimit-Limit: description: Requests permitted per minute. schema: type: integer X-RateLimit-Remaining: description: Requests remaining in the current window. schema: type: integer X-RateLimit-Reset: description: Unix timestamp at which the window resets. schema: type: integer content: application/json: schema: $ref: '#/components/schemas/ErrorMessage' description: List all Stripe coupons tags: - Coupons security: - ApiKeyAuth: [] components: schemas: ErrorMessage: properties: code: description: The error code. title: Code type: string detail: description: A human-readable description of the error. title: Detail type: string metadata: additionalProperties: type: string default: {} description: Additional context about the error. When present, a `documentation_url` key links to docs explaining how to resolve it. title: Metadata type: object required: - detail title: ErrorMessage type: object StripeCoupon: description: 'Coupons let you offer discounts to subscribers who pay for your newsletter. Buttondown''s coupons are backed by Stripe, so each coupon maps to a coupon on your connected Stripe account. Use them to run promotions—for example, a percentage off a paid subscription.' properties: coupon_id: description: The Stripe coupon ID (e.g. `coupon_...`). title: Coupon Id type: string percent_off: anyOf: - type: string - type: 'null' description: The percentage discount applied by the coupon, if any. title: Percent Off amount_off: anyOf: - type: integer - type: 'null' description: The fixed amount discount applied by the coupon, in the smallest currency unit (e.g. cents), if any. title: Amount Off name: anyOf: - type: string - type: 'null' description: The display name of the coupon. title: Name required: - coupon_id title: StripeCoupon type: object StripeCouponPage: properties: results: description: The list of results for this page. items: $ref: '#/components/schemas/StripeCoupon' title: Results type: array next: anyOf: - type: string - type: 'null' description: The URL to the next page of results, if any. title: Next previous: anyOf: - type: string - type: 'null' description: The URL to the previous page of results, if any. title: Previous count: description: The total number of results across all pages. title: Count type: integer required: - results - count title: Page[StripeCoupon] type: object securitySchemes: ApiKeyAuth: type: apiKey in: header name: Authorization description: API key passed as 'Token ' in the Authorization header.