Documentation

CrowdfundHQ API

The HTML and data API's lets you read and write data from your site's database via HTTP. Use it for import, export, custom scripts, or with javascript on your site.

Check out this gist for an example on how to use the API from within your site.
Back to top

HTML API

Access the HTML API by adding .json after the discover and campaign URLs on your site, or use your sitemap and RSS feeds to publish content.

Sitemap HTML

Get the sitemap for your site. Use this to tell search engines about your site to increase SEO. The sitemap updates automatically and pings Google and Bing when a campaign changes.

get   /sitemap.xml
http://www.yoursite.com/sitemap.xml
Back to top

Badge HTML

Get a JSON object with all the data you need to build a campaign badge. The campaign_link is the same as for the campaigns on your site.

get   /campaigns/campaign_link.json
http://www.yoursite.com/campaigns/mycampaign.json
Check out our embedding badges guide for an example on how to use the API to embed badges anywhere on your site.
Back to top

Embed HTML

Get a campaign badge as an iframe. Use it to embed badges on your site.

get   /campaigns/campaign_link.embed
http://www.yoursite.com/campaigns/mycampaign.embed
Back to top

Category HTML

Get a list of campaigns by category. The category_link is the same as in the discover links on your site, and the category list in Manage Site > Configuration > Categories.

get   /discover/category_link.json
http://www.yoursite.com/discover/featured.json
Back to top

Feed HTML

Get a RSS feed of your campaigns for a category. People can subscribe to it using an RSS reader.

get   /discover/category_link.rss
http://www.yoursite.com/discover/featured.rss
Back to top

Data API

The data API requires an API key. Include the api_key in the headers or as a parameter to your API requests. The content returned is JSON data.

NOTE: The data API is currently only for paying users, send us an email if you need access.

The response contains the HTTP status code and the JSON data:

{"code"=>200, "data"=>{"name"=>"My Campaign"}}

If there is an error, the JSON data will include the errors:

{"code"=>422, "errors"=>{"user"=>["is invalid"]}}

Code Description
200 Request was successful, no errors.
403 Authorization failed. The API Key is missing or invalid.
422 Request is missing required fields, see errors.
429 Too many requests, max is 60 per minute.
500 Server error, please notify support.

The following parameters can be sent with list requests only:

Parameter Description
sort Sort by this key (example: sort=name)
order Ascending (asc or 1) or descending (desc or -1)
limit Limit the number of results (max is 20)
page Go to this results page (default is 1)
per_page Results per page (max is 20)
total Total entries for this list (response only)

Campaign Data

Key Type Description
id string Unique id
link string Campaign link
name string Campaign name
goal float Campaign goal
pledged float Amount contributed so far
percent float Goal percentage
duration integer Campaign duration in days
expires_at time Campaign expiry date
approved_at time Campaign approval date
closed_at time Campaign closed date
about string Raw text about field
about_html string HTML about field
headline string Campaign headline
video_url string Campaign video URL
video_image string Campaign image
notes string Campaign notes
location string Campaign location
location_data hash Campaign location data
reminders_sent boolean Reminders sent?
successful_notified boolean Sucess email sent?
url string Campaign URL
short_url string Campaign short URL
fixed_amount float Fixed amount
paypal_account string Paypal account
wepay_payment_account string Wepay account
wepay_payment_token string Wepay payment token
wepay_user_id string Wepay user id
stripe_payment_account string Stripe payment account
stripe_payment_token string Stripe payment token
dwolla_account string Dwolla account id
dwolla_token string Dwolla token
dwolla_refresh_token string Dwolla refresh token
dwolla_expires_in time Dwolla session expiry
mangopay_user_id string Mangopay user id
mangopay_wallet_id string Mangopay wallet id
mangopay_bank_id string Mangopay bank id
submitted boolean Campaign submitted?
archived boolean Campaign archived?
visible boolean Campaign visible?
active boolean Campaign active?
approved boolean Campaign approved?
featured boolean Campaign featured?
deleted boolean Campaign deleted?
key string Access key for private campaigns
category string Category link
category_link string Category link
category_name string Category name
campaign_duration string Campaign duration type
campaign_strategy string Campaign strategy
contribution_amount string Contribution amount hidden?
notifications array Email notification
custom_fields hash Custom fields
created_at time Created at
updated_at time Updated at
contributions_count integer Contributions count
contributions_active_count integer Confirmed non-refunded contributions count
comments_count integer Comments count
commitments_count integer Commitments count
pledges_count integer Pledges count
rewards_count integer Rewards count
updates_count integer Updates count
votes_count integer Votes count
user_id string User id
site_id string Site id
group_id string Group id
Requires   user
Create a campaign.
POST   /campaign/create
curl -H "Api-key: API_KEY" --data "user_id=USER_ID" http://www.yoursite.com/api/v1/campaign/create
Requires   campaign
Delete a campaign.
POST   /campaign/delete
curl -H "Api-key: API_KEY" --data "campaign_id=CAMPAIGN_ID" http://www.yoursite.com/api/v1/campaign/delete
Requires   campaign
Update a campaign.
POST   /campaign/update
curl -H "Api-key: API_KEY" --data "campaign_id=CAMPAIGN_ID" http://www.yoursite.com/api/v1/campaign/update
Get the list of campaigns.
GET   /campaign/list
curl -H "Api-key: API_KEY" http://www.yoursite.com/api/v1/campaign/list
Requires   campaign
Get a campaign.
GET   /campaign/show
curl -H "Api-key: API_KEY" http://www.yoursite.com/api/v1/campaign/show?campaign_id=CAMPAIGN_ID
Back to top

Comment Data

Key Type Description
id string Unique id
raw string Raw text comment
html string HTML comment
anonymous boolean Comment anonymous?
created_at time Created at
updated_at time Updated at
user_id string User id
campaign_id string Campaign id
Requires   user, campaign
Create a comment.
POST   /comment/create
curl -H "Api-key: API_KEY" --data "user_id=USER_ID&campaign_id=CAMPAIGN_ID" http://www.yoursite.com/api/v1/comment/create
Requires   campaign, comment
Delete a comment.
POST   /comment/delete
curl -H "Api-key: API_KEY" --data "campaign_id=CAMPAIGN_ID&comment_id=COMMENT_ID" http://www.yoursite.com/api/v1/comment/delete
Requires   campaign, comment
Update a comment.
POST   /comment/update
curl -H "Api-key: API_KEY" --data "campaign_id=CAMPAIGN_ID&comment_id=COMMENT_ID" http://www.yoursite.com/api/v1/comment/update
Requires   campaign
Get the list of comments.
GET   /comment/list
curl -H "Api-key: API_KEY" http://www.yoursite.com/api/v1/comment/list?campaign_id=CAMPAIGN_ID
Requires   campaign, comment
Get a comment.
GET   /comment/show
curl -H "Api-key: API_KEY" http://www.yoursite.com/api/v1/comment/show?campaign_id=CAMPAIGN_ID&comment_id=COMMENT_ID
Back to top

Commitment Data

Key Type Description
id string Unique id
image_url string Commitment image URL
name string Commitment name
max integer Max number of pledges
description string Raw text description
description_html string HTML description
visible boolean Commitment visible?
images_enabled boolean Images enabled?
images_required boolean Images required?
custom_fields hash Custom fields
created_at time Created at
updated_at time Updated at
campaign_id string Campaign id
site_id string Site id
Requires   campaign
Create a commitment.
POST   /commitment/create
curl -H "Api-key: API_KEY" --data "campaign_id=CAMPAIGN_ID" http://www.yoursite.com/api/v1/commitment/create
Requires   campaign, commitment
Delete a commitment.
POST   /commitment/delete
curl -H "Api-key: API_KEY" --data "campaign_id=CAMPAIGN_ID&commitment_id=COMMITMENT_ID" http://www.yoursite.com/api/v1/commitment/delete
Requires   campaign, commitment
Update a commitment.
POST   /commitment/update
curl -H "Api-key: API_KEY" --data "campaign_id=CAMPAIGN_ID&commitment_id=COMMITMENT_ID" http://www.yoursite.com/api/v1/commitment/update
Requires   campaign
Get the list of commitments.
GET   /commitment/list
curl -H "Api-key: API_KEY" http://www.yoursite.com/api/v1/commitment/list?campaign_id=CAMPAIGN_ID
Requires   campaign, commitment
Get a commitment.
GET   /commitment/show
curl -H "Api-key: API_KEY" http://www.yoursite.com/api/v1/commitment/show?campaign_id=CAMPAIGN_ID&commitment_id=COMMITMENT_ID
Back to top

Contribution Data

Key Type Description
id string Unique id
amount float Contribution amount
payment_amount float Payment amount
platform_amount float Platform amount
total float Contribution total
anonymous boolean Contribution anonymous?
confirmed boolean Contribution confirmed?
refunded boolean Contribution refunded?
refund_manual boolean Refund manual?
deleted boolean Contribution deleted
authorized boolean Contribution authorized?
captured boolean Contribution captured?
live_payment boolean Live payment?
payment_token string Payment token
payment_type string Payment type
transaction_id string Transaction id
payment_method string Payment method
currency string Contribution currency
ip string Contributor ip address
email string Contributor email
name string Contributor name
location hash Contributor location
manual boolean Manual contribution?
contributor_pays_fees boolean Contributor pays fees?
name_override string Contributor name override
subscription boolean Contribution subscription?
unsubscribed_at time Contribution unsubscribed at
stripe_subscription_id string Stripe subscription id
stripe_customer_id string Stripe customer id
mangopay_user_id string Mangopay user id
mangopay_card_id string Mangopay card id
mangopay_wallet_id string Mangopay wallet id
mangopay_payin_id string Mangopay pay-in id
custom_fields hash Custom fields
created_at time Created at
updated_at time Updated at
reward_id string Reward id
user_id string User id
campaign_id string Campaign id
site_id string Site id
cost_id string Cost id
fee_id string Fee id
Requires   user, campaign
Create a contribution.
POST   /contribution/create
curl -H "Api-key: API_KEY" --data "user_id=USER_ID&campaign_id=CAMPAIGN_ID" http://www.yoursite.com/api/v1/contribution/create
Requires   campaign, contribution
Delete a contribution.
POST   /contribution/delete
curl -H "Api-key: API_KEY" --data "campaign_id=CAMPAIGN_ID&contribution_id=CONTRIBUTION_ID" http://www.yoursite.com/api/v1/contribution/delete
Requires   campaign, contribution
Update a contribution.
POST   /contribution/update
curl -H "Api-key: API_KEY" --data "campaign_id=CAMPAIGN_ID&contribution_id=CONTRIBUTION_ID" http://www.yoursite.com/api/v1/contribution/update
Requires   campaign
Get the list of contributions.
GET   /contribution/list
curl -H "Api-key: API_KEY" http://www.yoursite.com/api/v1/contribution/list?campaign_id=CAMPAIGN_ID
Requires   campaign, contribution
Get a contribution.
GET   /contribution/show
curl -H "Api-key: API_KEY" http://www.yoursite.com/api/v1/contribution/show?campaign_id=CAMPAIGN_ID&contribution_id=CONTRIBUTION_ID
Back to top

Conversation Data

Key Type Description
id string Unique id
listener string Conversation partner link
deletors array Users that deleted conversation
subject string Subject of conversation
created_at time Created at
updated_at time Updated at
site_id string Site id
user_id string User id
Requires   user
Create a conversation.
POST   /conversation/create
curl -H "Api-key: API_KEY" --data "user_id=USER_ID" http://www.yoursite.com/api/v1/conversation/create
Requires   conversation
Delete a conversation.
POST   /conversation/delete
curl -H "Api-key: API_KEY" --data "conversation_id=CONVERSATION_ID" http://www.yoursite.com/api/v1/conversation/delete
Requires   conversation
Update a conversation.
POST   /conversation/update
curl -H "Api-key: API_KEY" --data "conversation_id=CONVERSATION_ID" http://www.yoursite.com/api/v1/conversation/update
Get the list of conversations.
GET   /conversation/list
curl -H "Api-key: API_KEY" http://www.yoursite.com/api/v1/conversation/list
Requires   conversation
Get a conversation.
GET   /conversation/show
curl -H "Api-key: API_KEY" http://www.yoursite.com/api/v1/conversation/show?conversation_id=CONVERSATION_ID
Back to top

Group Data

Key Type Description
id string Unique id
image string Group image
secure_image string Group secure image
name string Group name
link string Group link
owner string Group owner email
bio string Raw text bio
bio_html string HTML bio
url string Group URL
hidden boolean Group hidden?
created_at time Created at
updated_at time Updated at
site_id string Site id
user_id string User id
Create a group.
POST   /group/create
curl -H "Api-key: API_KEY" --data "" http://www.yoursite.com/api/v1/group/create
Requires   group
Delete a group.
POST   /group/delete
curl -H "Api-key: API_KEY" --data "group_id=GROUP_ID" http://www.yoursite.com/api/v1/group/delete
Requires   group
Update a group.
POST   /group/update
curl -H "Api-key: API_KEY" --data "group_id=GROUP_ID" http://www.yoursite.com/api/v1/group/update
Get the list of groups.
GET   /group/list
curl -H "Api-key: API_KEY" http://www.yoursite.com/api/v1/group/list
Requires   group
Get a group.
GET   /group/show
curl -H "Api-key: API_KEY" http://www.yoursite.com/api/v1/group/show?group_id=GROUP_ID
Back to top

Membership Data

Key Type Description
id string Unique id
created_at time Created at
updated_at time Updated at
user_id string User id
group_id string Group id
site_id string Site id
Requires   group, user
Create a membership.
POST   /membership/create
curl -H "Api-key: API_KEY" --data "group_id=GROUP_ID&user_id=USER_ID" http://www.yoursite.com/api/v1/membership/create
Requires   group, membership
Delete a membership.
POST   /membership/delete
curl -H "Api-key: API_KEY" --data "group_id=GROUP_ID&membership_id=MEMBERSHIP_ID" http://www.yoursite.com/api/v1/membership/delete
Requires   group, membership
Update a membership.
POST   /membership/update
curl -H "Api-key: API_KEY" --data "group_id=GROUP_ID&membership_id=MEMBERSHIP_ID" http://www.yoursite.com/api/v1/membership/update
Requires   group
Get the list of memberships.
GET   /membership/list
curl -H "Api-key: API_KEY" http://www.yoursite.com/api/v1/membership/list?group_id=GROUP_ID
Requires   group, membership
Get a membership.
GET   /membership/show
curl -H "Api-key: API_KEY" http://www.yoursite.com/api/v1/membership/show?group_id=GROUP_ID&membership_id=MEMBERSHIP_ID
Back to top

Message Data

Key Type Description
id string Unique id
content string Raw text content
content_html string HTML content
created_at time Created at
updated_at time Updated at
user_id string User id
conversation_id string Conversation id
Requires   conversation, user
Create a message.
POST   /message/create
curl -H "Api-key: API_KEY" --data "conversation_id=CONVERSATION_ID&user_id=USER_ID" http://www.yoursite.com/api/v1/message/create
Requires   conversation, message
Delete a message.
POST   /message/delete
curl -H "Api-key: API_KEY" --data "conversation_id=CONVERSATION_ID&message_id=MESSAGE_ID" http://www.yoursite.com/api/v1/message/delete
Requires   conversation, message
Update a message.
POST   /message/update
curl -H "Api-key: API_KEY" --data "conversation_id=CONVERSATION_ID&message_id=MESSAGE_ID" http://www.yoursite.com/api/v1/message/update
Requires   conversation
Get the list of messages.
GET   /message/list
curl -H "Api-key: API_KEY" http://www.yoursite.com/api/v1/message/list?conversation_id=CONVERSATION_ID
Requires   conversation, message
Get a message.
GET   /message/show
curl -H "Api-key: API_KEY" http://www.yoursite.com/api/v1/message/show?conversation_id=CONVERSATION_ID&message_id=MESSAGE_ID
Back to top

Page Data

Key Type Description
id string Unique id
title string Page title
subtitle string Page subtitle
link string Page link
raw string Raw text page
html string HTML page
meta_description string Meta description
type string Page type
homepage boolean Page homepage?
termspage boolean Page termspage?
hidden boolean Page hidden
autoconvert boolean Autoconvert links
created_at time Created at
updated_at time Updated at
site_id string Site id
Create a page.
POST   /page/create
curl -H "Api-key: API_KEY" --data "" http://www.yoursite.com/api/v1/page/create
Requires   page
Delete a page.
POST   /page/delete
curl -H "Api-key: API_KEY" --data "page_id=PAGE_ID" http://www.yoursite.com/api/v1/page/delete
Requires   page
Update a page.
POST   /page/update
curl -H "Api-key: API_KEY" --data "page_id=PAGE_ID" http://www.yoursite.com/api/v1/page/update
Get the list of pages.
GET   /page/list
curl -H "Api-key: API_KEY" http://www.yoursite.com/api/v1/page/list
Requires   page
Get a page.
GET   /page/show
curl -H "Api-key: API_KEY" http://www.yoursite.com/api/v1/page/show?page_id=PAGE_ID
Back to top

Update Data

Key Type Description
id string Unique id
raw string Raw text update
html string HTML update
published boolean Update published?
emails_sent boolean Update emails sent?
created_at time Created at
updated_at time Updated at
user_id string User id
campaign_id string Campaign id
Requires   user, campaign
Create a update.
POST   /update/create
curl -H "Api-key: API_KEY" --data "user_id=USER_ID&campaign_id=CAMPAIGN_ID" http://www.yoursite.com/api/v1/update/create
Requires   campaign, update
Delete a update.
POST   /update/delete
curl -H "Api-key: API_KEY" --data "campaign_id=CAMPAIGN_ID&update_id=UPDATE_ID" http://www.yoursite.com/api/v1/update/delete
Requires   campaign, update
Update a update.
POST   /update/update
curl -H "Api-key: API_KEY" --data "campaign_id=CAMPAIGN_ID&update_id=UPDATE_ID" http://www.yoursite.com/api/v1/update/update
Requires   campaign
Get the list of updates.
GET   /update/list
curl -H "Api-key: API_KEY" http://www.yoursite.com/api/v1/update/list?campaign_id=CAMPAIGN_ID
Requires   campaign, update
Get a update.
GET   /update/show
curl -H "Api-key: API_KEY" http://www.yoursite.com/api/v1/update/show?campaign_id=CAMPAIGN_ID&update_id=UPDATE_ID
Back to top

User Data

Key Type Description
id string Unique id
name string User name
link string User link
email string User email
bio string Raw text bio
bio_html string HTML bio
token string User token
avatar string User avatar image URL
avatar_upload string User avatar file URL
avatar_type string Avatar type
payment_info string User payment info
website string User web site URL
address string User address
author boolean User can create campaigns?
blog_admin boolean User is blog admin?
pwhs string Password hash
salt string Password salt
last_login_at time Last login at
reset_token string Reset password token
reset_at time Password reset at
auth_token string User auth token
update_emails boolean Receive update emails?
deleted boolean User deleted?
approved boolean User approved?
pending_approval boolean User pending approval?
incomplete boolean User incomplete?
confirmation_token string Confirmation token
pending_confirmation boolean Pending confirmation?
custom_fields hash Custom fields
created_at time Created at
updated_at time Updated at
site_id string Site id
Create a user.
POST   /user/create
curl -H "Api-key: API_KEY" --data "" http://www.yoursite.com/api/v1/user/create
Requires   user
Delete a user.
POST   /user/delete
curl -H "Api-key: API_KEY" --data "user_id=USER_ID" http://www.yoursite.com/api/v1/user/delete
Requires   user
Update a user.
POST   /user/update
curl -H "Api-key: API_KEY" --data "user_id=USER_ID" http://www.yoursite.com/api/v1/user/update
Get the list of users.
GET   /user/list
curl -H "Api-key: API_KEY" http://www.yoursite.com/api/v1/user/list
Requires   user
Get a user.
GET   /user/show
curl -H "Api-key: API_KEY" http://www.yoursite.com/api/v1/user/show?user_id=USER_ID
Back to top

Reward Data

Key Type Description
id string Unique id
image_url string Reward image URL
amount float Reward amount
max integer Reward max users
description string Raw text description
description_html string HTML description
visible boolean Reward visible?
images_enabled boolean Reward images enabled?
images_required boolean Reward images required?
created_at time Created at
updated_at time Updated at
campaign_id string Campaign id
Requires   campaign
Create a reward.
POST   /reward/create
curl -H "Api-key: API_KEY" --data "campaign_id=CAMPAIGN_ID" http://www.yoursite.com/api/v1/reward/create
Requires   campaign, reward
Delete a reward.
POST   /reward/delete
curl -H "Api-key: API_KEY" --data "campaign_id=CAMPAIGN_ID&reward_id=REWARD_ID" http://www.yoursite.com/api/v1/reward/delete
Requires   campaign, reward
Update a reward.
POST   /reward/update
curl -H "Api-key: API_KEY" --data "campaign_id=CAMPAIGN_ID&reward_id=REWARD_ID" http://www.yoursite.com/api/v1/reward/update
Requires   campaign
Get the list of rewards.
GET   /reward/list
curl -H "Api-key: API_KEY" http://www.yoursite.com/api/v1/reward/list?campaign_id=CAMPAIGN_ID
Requires   campaign, reward
Get a reward.
GET   /reward/show
curl -H "Api-key: API_KEY" http://www.yoursite.com/api/v1/reward/show?campaign_id=CAMPAIGN_ID&reward_id=REWARD_ID
Back to top

Menu