---
title: "createCampaignPromoCode"
method: POST
path: "/campaigns/{campaign}/promo-codes"
tags: ["Promo Code"]
---

# createCampaignPromoCode

`POST /campaigns/{campaign}/promo-codes`

## Request

- Base URL: `https://pro.gofundme.com/api/2.0`
- URL: `https://pro.gofundme.com/api/2.0/campaigns/{campaign}/promo-codes`
- Auth: OAuth 2
  - Password
  - Token URL: `/oauth2/auth`

Create Promo Code for the specified Campaign

## Path parameters

- `campaign` integer, required

## Request body

- PromoCodeFillable
  - `adjustment_amount` number, double: Value to configure price adjustment when applied against an item. Can reflect either a percentage or flat amount based on associated adjustment_type
  - `adjustment_type` 'percentage' | 'amount': Specification of how adjustment_amount is applied
  - `code` string: Value of the Promo Code to entered on checkout
  - `ends_at` string, date-time, nullable: Date/time when the Promo Code can no longer be applied to purchases
  - `is_active` boolean: Indicates whether Promo Code is active or not regardless of availability or date range
  - `is_general` boolean: Indicates whether Promo Code has a general designation, meaning it applies to all TicketTypes for its Campaign
  - `quantity` integer, nullable: Total number of items against which the Promo Code can be applied (null implies unlimited applications)
  - `starts_at` string, date-time, nullable: Date/time when record can start being applied to purchase

## Response `200`

Success

- object
  - `adjustment_amount` number, double: Value to configure price adjustment when applied against an Item. Can reflect either a percentage or flat amount based on associated adjustment_type
  - `adjustment_type` 'percentage' | 'amount': Specification of how adjustment_amount is applied
  - `applications_count` integer: Count of the number of times the promo code has been applied to Items still in a Cart or successfully transacted against
  - `code` string: Value of the Promo Code to entered on checkout
  - `ends_at` string, date-time, nullable: Date/time when the Promo Code can no longer be applied to purchases
  - `id` integer: Primary identifier of record
  - `is_active` boolean: Indicates whether Promo Code is active or not regardless of availability or date range
  - `is_general` boolean: Indicates whether Promo Code has a general designation, meaning it applies to all TicketTypes for its Campaign
  - `quantity` integer, nullable: Total number of Items against which the Promo Code can be applied (null implies unlimited applications)
  - `starts_at` string, date-time, nullable: Date/time when record can start being applied to purchase
  - `updated_at` string, date-time: Date/time of last record update
  - `campaign_id` integer

## Other responses

- `403`: Requester is not authorized to perform action
- `404`: Campaign not found

---

[API](https://skmtc.dev/gofundme/apis/gofundme-pro-api.md) - [All operations](https://skmtc.dev/gofundme/apis/gofundme-pro-api/llms.txt) - [OpenAPI document](https://skmtc.dev/gofundme/apis/gofundme-pro-api/revisions/094a1e510fe9?raw)
