Create a campaign for an organization
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.
oauth2 organization:{organizationId}:adminAuthorizationBearer <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
Idempotency-Key?stringClient-chosen unique key, for example a UUID. Kept for 24 hours.
^[\x21-\x7E]{1,255}$1 <= length <= 255application/json- body
title*string1 <= length <= 100tagline*stringOne line under the title.
1 <= length <= 255description?stringThe campaign story, as plain text.
goal*The fundraising goal.
category*CampaignCategory"food-water""mosque-community""education""women""orphans""refugee""emergency-relief""health""creative""qurbani""other"accountCountry*stringISO 3166-1 alpha-2 country of the organization account that receives the funds.
^[A-Z]{2}$impactCountry*stringISO 3166-1 alpha-2 country the campaign helps.
^[A-Z]{2}$imageUrl*stringCover image (https). Imported at creation.
^https://uriendDate?stringOmit for no end date.
date-timezakatVerificationRequested?booleanAsk for zakat verification.
zakatCategories?array<string>Zakat categories, when verification is requested.
items <= 20saveAsDraft?booleanCreate it as a draft instead of submitting it for review.
falseThe campaign was created.
application/json- response
id*stringThe campaign id: the 3.0 project id, as a string.
slug*stringURL-safe name.
url*stringThe campaign page on launchgood.com.
uriname*stringstatus*CampaignStatus"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*integer0 <= valuefundedPercentage*integerRaised over goal as a whole percent, rounded. 0 when there is no goal. Can pass 100.
0 <= valuedaysLeft*|Null when the campaign has no end date.
0 <= valuezakatEligible*booleanEligible to receive zakat.
zakatVerified*booleanVerified by a zakat reviewer.
country*|ISO 3166-1 alpha-2 country the campaign helps.
^[A-Z]{2}$location*string|nulllatitude*|-90 <= value <= 90longitude*|-180 <= value <= 180imageUrl*|The banner image.
uricreatorName*|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*|date-timeendDate*|date-timecreatedAt*|date-timetagline*|One line under the name.
description*|The campaign story, as plain text.
settlementCurrency*|ISO 4217 currency the campaign pays out in.
^[A-Z]{3}$3 <= length <= 3curl -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"}'{ "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"}Revoke a token POST
OAuth 2.0 token revocation (RFC 7009). Revoke an access or refresh token the client was issued, for example when an integration is uninstalled or a secret leaks. Answers 200 whether or not the token was valid, so a caller learns nothing about tokens it does not hold. Client credentials go in the form body, like `issueToken`. At most 10 requests a minute per `client_id` and 30 per address; past that, 429 with `Retry-After`.
Get a campaign by id GET
The id is the 3.0 project id, as a string of digits; a slug is a 400 here. To find a campaign by slug, use the `slug` filter of `listCampaigns`. A campaign that does not exist and one the public site does not list (a draft, hidden, archived or suspended one) are the same 404: the answer does not say which. Needs a valid token. Which scope public reads require is still open.