LogoLogo
REST APIWebhooksHelp Center →
  • Introduction
  • JavaScript API
    • Overview
  • REST API
    • Overview
    • Campaigns
      • The campaign object
      • List campaigns
      • Create campaign
      • Retrieve campaign
      • Update campaign
    • Affiliates
      • The affiliate object
      • List affiliates
      • Create affiliate
      • Retrieve affiliate
      • Update affiliate
      • Magic Link (SSO)
    • Affiliate Links
      • The affiliate link object
      • List affiliate links
      • Create affiliate link
      • Retrieve affiliate link
      • Update affiliate link
    • Affiliate Coupons
      • The affiliate coupon object
      • List affiliate coupons
      • Create affiliate coupon
      • Retrieve affiliate coupon
    • Referrals
      • The referral object
      • List referrals
    • Commissions
      • The commission object
      • List commissions
      • Retrieve commission
      • Update commission
      • Delete commission
    • Payouts
      • The payout object
      • List payouts
      • Retrieve a payout
      • Mark a payout as paid
  • Webhooks
    • Overview
    • Endpoints
    • Requests
    • Event types
    • Signed webhooks
  • Links
    • Help Center
    • Sign up
    • Login
    • Learn more about Rewardful
Powered by GitBook
On this page
  • Request
  • Parameters
  • Example
  • Response

Was this helpful?

Export as PDF
  1. REST API
  2. Campaigns

Create campaign

Creates a new campaign in your account with the specified parameters.

This endpoint allows merchants to create new campaigns on demand by providing a set of the most common parameters used

Request

Method

URL

POST

https://api.getrewardful.com/v1/campaigns

Parameters

Parameter

Required?

Description

name

Yes

The campaign's name

url

Yes

The base URL that will be used to generate affiliate links for the campaign

private

No

true if the campaign should be invite-only, false if it should be open to the public. (Default: false)

reward_type

Yes

The type of reward associated with this campaign - percent or amount

commission_percent

Yes, if reward_type is percent

The commission percentage for this campaign

commission_amount_cents

Yes, if reward_type is amount

The amount of the fixed commission for this campaign in cents

commission_amount_currency

Yes, if reward_type is amount

ISO currency code in which the fixed commission for this campaign is denominated. Fixed commissions can be defined in any currency, but they will be converted to and displayed in your company's display currency when awarded.

minimum_payout_cents

No

The minimum amount of cumulative commissions required for an affiliate to receive a payout in cents denominated in your company's display currency. (Default: 0)

stripe_coupon_id

No

Example

curl --request POST \
  --url https://api.getrewardful.com/v1/campaigns \
  -u YOUR_API_SECRET: \
  -d "name=Special Friends of Rewardful" \
  -d url=https://rewardful.com \
  -d private=true \
  -d reward_type=percent \
  -d commission_percent=50.0 \
  -d minimum_payout_cents=5000

Response

Response code

Body

200

Invalid parameters

Response code

Body

422

JSON object describing validation errors.

{
  "error": "Could not create campaign.",
  "details": ["Name can't be blank"]
}

Authentication failure

Response code

Body

401

Description of the authentication failure.

{  "error": "Invalid API Secret." }
PreviousList campaignsNextRetrieve campaign

Last updated 6 months ago

Was this helpful?

The ID of the Stripe coupon associated with this campaign, used for . Since this feature is only enabled for customers on our Growth and Enterprise plans, attempts by other subscribers to set a value for this with result in an error.

A (JSON)

double-sided incentives
campaign object