Skip to Content
Developers @ LaunchGood
Campaigns

Create a campaign for an organization

POST
/campaigns

The organization is the one the token scope names (organization:{organizationId}:admin, proposed): the body carries no organization id. Send Idempotency-Key to make a retry safe: the same key with the same body returns the campaign that was created, and the same key with a different body is a 409.

Required scope: organization:{organizationId}:admin.

Authorization

oauth2 organization:{organizationId}:admin
headerAuthorizationBearer <token>

OAuth 2.0 client-credentials grant. Scopes follow the ReBAC grammar {type}:{id}:...:{role}; a {placeholder} stands for an id.

Scope: organization:{organizationId}:admin

Header Parameters

Idempotency-Key?string

Client-chosen unique key, for example a UUID. Kept for 24 hours.

Match^[\x21-\x7E]{1,255}$
Length1 <= length <= 255

Request Body

application/json
  1. body
title*string
Length1 <= length <= 100
tagline*string

One line under the title.

Length1 <= length <= 255
description?string

The campaign story, as plain text.

goal*

The fundraising goal.

category*CampaignCategory
Value in"food-water""mosque-community""education""women""orphans""refugee""emergency-relief""health""creative""qurbani""other"
accountCountry*string

ISO 3166-1 alpha-2 country of the organization account that receives the funds.

Match^[A-Z]{2}$
impactCountry*string

ISO 3166-1 alpha-2 country the campaign helps.

Match^[A-Z]{2}$
imageUrl*string

Cover image (https). Imported at creation.

Match^https://
Formaturi
endDate?string

Omit for no end date.

Formatdate-time
zakatVerificationRequested?boolean

Ask for zakat verification.

zakatCategories?array<string>

Zakat categories, when verification is requested.

Itemsitems <= 20
saveAsDraft?boolean

Create it as a draft instead of submitting it for review.

Defaultfalse

Response Body

The campaign was created.

application/json
  1. response
id*string

The campaign id: the 3.0 project id, as a string.

slug*string

URL-safe name.

url*string

The campaign page on launchgood.com.

Formaturi
name*string
status*CampaignStatus
Value in"not_submitted""pending_approval""suspended""active""completed""failed""approved""in_review""died""rejected""complete_unpaid"
categories*array<>
goal*||

Null when the campaign has no goal.

raised*

Raised so far, in the campaign currency.

donationCount*integer
Range0 <= value
fundedPercentage*integer

Raised over goal as a whole percent, rounded. 0 when there is no goal. Can pass 100.

Range0 <= value
daysLeft*|

Null when the campaign has no end date.

Range0 <= value
zakatEligible*boolean

Eligible to receive zakat.

zakatVerified*boolean

Verified by a zakat reviewer.

country*|

ISO 3166-1 alpha-2 country the campaign helps.

Match^[A-Z]{2}$
location*string|null
latitude*|
Range-90 <= value <= 90
longitude*|
Range-180 <= value <= 180
imageUrl*|

The banner image.

Formaturi
creatorName*|

Display name of the person who created the campaign.

organization*||

The public organization that owns the campaign, or that owns the account it pays into. Null when it has none.

startDate*|
Formatdate-time
endDate*|
Formatdate-time
createdAt*|
Formatdate-time
tagline*|

One line under the name.

description*|

The campaign story, as plain text.

settlementCurrency*|

ISO 4217 currency the campaign pays out in.

Match^[A-Z]{3}$
Length3 <= length <= 3
Example Request
curl -X POST 'https://api2.launchgood.com/campaigns' \  -H 'Authorization: Bearer ' \  -H 'Content-Type: application/json' \  -d '{  "title": "Clean water for Sana'\''a",  "tagline": "A well for 400 families",  "goal": {    "amountMinor": 500000,    "currency": "USD"  },  "category": "food-water",  "accountCountry": "US",  "impactCountry": "YE",  "imageUrl": "http://example.com"}'
Example Response
{  "id": "48213",  "slug": "clean-water-for-sana-a",  "url": "http://example.com",  "name": "Clean water for Sana'a",  "status": "not_submitted",  "categories": [    "food-water"  ],  "goal": {    "amountMinor": 2500,    "currency": "USD"  },  "raised": {    "amountMinor": 2500,    "currency": "USD"  },  "donationCount": 312,  "fundedPercentage": 64,  "daysLeft": 0,  "zakatEligible": true,  "zakatVerified": true,  "country": "YE",  "location": "Sana'a, Yemen",  "latitude": -90,  "longitude": -180,  "imageUrl": "http://example.com",  "creatorName": "string",  "organization": {    "id": "clx9k2m4p0000abcd1234efgh",    "name": "Hope Relief Foundation"  },  "startDate": "2019-08-24T14:15:22Z",  "endDate": "2019-08-24T14:15:22Z",  "createdAt": "2019-08-24T14:15:22Z",  "tagline": "string",  "description": "string",  "settlementCurrency": "str"}