Skip to main content
POST
Create a campaign

Authorizations

Authorization
string
header
required

An API key from Settings, API keys. It starts with rc_live_.

Body

application/json
name
string
required

Cannot be blank.

slug
string | null

A short name for the campaign's address. No two of your campaigns may share one.

description
string | null
goal_amount_cents
integer
default:0

The goal, in whole cents.

Required range: x >= 0
status
enum<string>
default:draft
Available options:
draft,
active,
paused,
completed,
archived
start_date
string<date> | null
end_date
string<date> | null
campaign_kind
enum<string>
default:donation_form

Whether the campaign has a public page of its own. donation_form has none: gifts through your donate block or the widget are attributed to it. fundraising_page has a page at /c/ and the slug on your own site. event is the same page for an occasion, leading with the dates. A slug is required for the two that have a page.

Available options:
donation_form,
fundraising_page,
event
subtitle
string | null

One line under the title on the page.

Maximum string length: 200
theme_color
string | null

The donate button and the goal bar on the page, as a six-digit hex color such as #0f7a6b. Null uses the site color. An empty string clears it.

Pattern: ^#[0-9a-fA-F]{6}$
cover_file_id
string | null

The cover photo: the ID of a file uploaded with owner_type campaign. Only an image stored in Cloudflare Images is served publicly.

cover_video_url
string | null

A YouTube or Vimeo address, shown on the page instead of the cover photo. Any other host is refused, because the page renders it in a frame.

metadata
object

Anything else you want to keep with the campaign, as keys and values.

custom_fields
object

Values for your own campaign fields, by field key. A key that is not one of your fields is refused.

pages_open
boolean
default:false

Whether supporters may make fundraising pages of their own under this campaign, on your site. Only a campaign with a page, while it is active, takes them.

pages_need_approval
boolean
default:true

Whether a page a supporter makes waits for somebody at your rescue to approve it before it goes on your site. A page your team makes through the API is live at once either way.

animal_id
string | null

The animal this campaign is for, when it is one animal's own fundraiser: one of your animals that is not deleted. The campaign's public page shows the animal only when the animal is on your site anyway. An empty string or null takes it off.

milestone_posts
enum<string>
default:page

What happens when an active campaign with a goal passes 25, 50, 75 and 100% of it (the gifts and a sponsor's match together): page posts an update on its page, email also emails it to the people who gave, off posts nothing. Each milestone is posted once.

Available options:
page,
email,
off
match_sponsor
string | null

The sponsor matching gifts to this campaign. A match is a sponsor, a ratio and a cap together.

Maximum string length: 200
match_ratio_percent
integer | null

How many cents the sponsor gives for every 100 given: 100 is dollar for dollar, 200 is $2 for every $1. Null takes the whole match off.

Required range: 1 <= x <= 1000
match_cap_cents
integer | null

The most the sponsor will give, in whole cents.

Required range: 100 <= x <= 100000000
match_starts_on
string<date> | null

Gifts given on or after this day are matched. Left out when a match is first set, it is today in your organization's time zone.

department_id
string | null

The department each gift made to it takes, unless the gift names its own. Null takes it off.

fund_id
string | null

The fund each gift made to it takes when the giver chose none. Null takes it off.

Response

The campaign, as it was created.

name
string
required

Cannot be blank.

goal_amount_cents
integer
required

The goal, in whole cents: 1500000 is $15,000.00. 0 means no goal.

Required range: x >= 0
status
enum<string>
required
Available options:
draft,
active,
paused,
completed,
archived
id
string
required
total_raised_cents
integer
required

The sum of the completed gifts given to this campaign, in whole cents.

donation_count
integer
required

How many completed gifts.

donor_count
integer
required

How many different people gave them.

created_at
string<date-time>
required
updated_at
string<date-time>
required
slug
string | null

A short name for the campaign's address. No two of your campaigns may share one.

description
string | null
start_date
string<date> | null
end_date
string<date> | null
campaign_kind
enum<string>
default:donation_form

Whether the campaign has a public page of its own. donation_form has none: gifts through your donate block or the widget are attributed to it. fundraising_page has a page at /c/ and the slug on your own site. event is the same page for an occasion, leading with the dates. A slug is required for the two that have a page.

Available options:
donation_form,
fundraising_page,
event
subtitle
string | null

One line under the title on the page.

Maximum string length: 200
theme_color
string | null

The donate button and the goal bar on the page, as a six-digit hex color such as #0f7a6b. Null uses the site color. An empty string clears it.

Pattern: ^#[0-9a-fA-F]{6}$
cover_file_id
string | null

The cover photo: the ID of a file uploaded with owner_type campaign. Only an image stored in Cloudflare Images is served publicly.

cover_video_url
string | null

A YouTube or Vimeo address, shown on the page instead of the cover photo. Any other host is refused, because the page renders it in a frame.

metadata
object

Anything else you want to keep with the campaign, as keys and values.

custom_fields
object

Values for your own campaign fields, by field key. A key that is not one of your fields is refused.

pages_open
boolean
default:false

Whether supporters may make fundraising pages of their own under this campaign, on your site. Only a campaign with a page, while it is active, takes them.

pages_need_approval
boolean
default:true

Whether a page a supporter makes waits for somebody at your rescue to approve it before it goes on your site. A page your team makes through the API is live at once either way.

animal_id
string | null

The animal this campaign is for, when it is one animal's own fundraiser: one of your animals that is not deleted. The campaign's public page shows the animal only when the animal is on your site anyway. An empty string or null takes it off.

milestone_posts
enum<string>
default:page

What happens when an active campaign with a goal passes 25, 50, 75 and 100% of it (the gifts and a sponsor's match together): page posts an update on its page, email also emails it to the people who gave, off posts nothing. Each milestone is posted once.

Available options:
page,
email,
off
match_sponsor
string | null

The sponsor matching gifts to this campaign. A match is a sponsor, a ratio and a cap together.

Maximum string length: 200
match_ratio_percent
integer | null

How many cents the sponsor gives for every 100 given: 100 is dollar for dollar, 200 is $2 for every $1. Null takes the whole match off.

Required range: 1 <= x <= 1000
match_cap_cents
integer | null

The most the sponsor will give, in whole cents.

Required range: 100 <= x <= 100000000
match_starts_on
string<date> | null

Gifts given on or after this day are matched. Left out when a match is first set, it is today in your organization's time zone.

department_id
string | null

The department each gift made to it takes, unless the gift names its own. Null takes it off.

fund_id
string | null

The fund each gift made to it takes when the giver chose none. Null takes it off.

tenant_id
string

Your organization's ID.

progress_percent
integer | null

What has been raised as a percentage of the goal, rounded. It can pass 100. Null when there is no goal.

milestone_reached
enum<integer>

The highest milestone the campaign has passed.

Available options:
0,
25,
50,
75,
100
matched_cents
integer

What the sponsor's match comes to, worked out from the gifts. On one campaign, not the list. total_raised_cents stays the gifts alone.

match
object | null

The sponsor's match as it stands, or null when there is none. On one campaign, not the list.