API reference · Campaigns
Update a campaign
PATCH/v1/campaigns/{campaignId}
Update your campaign.
Requires a Bearer access token.
Parameters
This field has no description in the spec.
campaignId#stringin pathrequired
Body
UpdateCampaignDto1 of 25 fields has no description in the spec.
name#string2 to 100 charactersName of your campaign. Only use for display in your dashboard.
slug#string2 to 100 charactersSlug of your campaign. Will be use in your generated page url.
startDate#string (date)Defaults to today
endDate#string (date)Required for time limited campaigns.
donationValidityPeriod#stringA valid time interval matching the format 'X days' | 'X weeks' | 'X months' | 'X years'. Maximum 1 year. Define the validity period for donations. Upon creation, a donation's expiry date will be computed by adding this duration to the latest date between startDate and now. If endDate is set, the expiry date will be the earliest between the computed date and endDate.
title#string2 to 100 charactersWill be displayed in the campaign page
description#string2 to 1000 charactersWill be displayed in the campaign page.
titleColor#stringhex colorCustomize the color of titles in the campaign page
accentColor#stringhex colorCustomize the color of buttons in the campaign page
logoUrl#stringURLLogo that will be displayed in the campaign page's header
faviconUrl#stringURLImage that will be used as favicon for the campaign page
message#string1 to 600 charactersSlack campaigns only. Message posted to each participant with their donation. Supports the {{firstName}}, {{lastName}}, {{company}} and {{amount}} variables.
reminderMessage#string1 to 600 charactersSlack campaigns only. Message posted to remind the participants who have not chosen a charity yet. Supports the {{firstName}}, {{lastName}}, {{company}} and {{amount}} variables.
emailSenderName#string1 to 100 charactersEmail campaigns only. Name of the sender of the donation emails.
emailSenderPictureUrl#stringURLEmail campaigns only. Picture of the sender displayed in the donation emails.
emailSubject#string1 to 100 charactersEmail campaigns only. Subject of the donation emails.
emailTemplate#string1 to 1000 charactersEmail campaigns only. HTML body of the donation emails. Supports the {{firstName}}, {{lastName}}, {{company}} and {{amount}} variables.
emailReplyTo#stringemail addressEmail campaigns only. Address the participants reply to.
emailDisplayCard#booleanEmail campaigns only. Whether the donation emails show the donation card. Defaults to true.
leadCollectionOptions#objectFields to be collected from the donor: any of the keys below, at least one. custom is your own question, or false.
5 child fields
fullnamebooleancompanyNamebooleanemailbooleanphonebooleancustomstring | false
fiscalReceiptSendingMode#stringRestricted to B2C use cases. Set to EMAIL to let Charitips email their fiscal receipt to the donors who paid their donation (hasBeenCharged). With MANUAL, you send them yourself.
MANUALEMAILwithFiscalReceipts#booleanRestricted to B2C use cases. Default value of withFiscalReceipt for the donations of this campaign. Set to false when no fiscal receipt should be issued for them.
givingTarget#integer (int64)Only used for fundraising campaigns. It represents the target amount to be raised.
postDonationWidgets#string[]Blocks shown after a donation on Charitips pages and widgets: social sharing, a top-up paid by the beneficiary and the charity newsletter subscription. All of them by default.
SOCIAL_SHARINGDONATION_MATCHINGCHARITY_NEWSLETTER_SUBSCRIPTIONcharitiesSelectionId#stringUUID
Response
200 · CampaignNo field is described in the spec.
campaignId#stringalways returnedname#stringalways returnedtype#CampaignTypeTIME_BASEDPERMANENTamountType#CampaignAmountTypeFIXED_AMOUNTFREE_AMOUNTaudienceType#CampaignAudienceTypePRIVATEPUBLICdonationType#CampaignDonationTypeFACE_VALUEDISTRIBUTIONgivingType#GivingTypealways returnedFINANCIALPAYROLLPAID_TIME_OFFrecurringType#RecurringTypealways returnedNONEFREQUENCYMANUALstartDate#string (date-time)always returnedendDate#string (date-time)budget#integer (int64)sendingMode#CampaignSendingModeMANUALEMAILPHYSICALSLACKPOSTALstatus#CampaignStatusDRAFTPENDINGACTIVECOMPLETECANCELEDslug#stringpublicKey#stringalways returnedwithFiscalReceipts#booleanalways returnedlanguage#Languagefrenfrequency#stringbudgetFrequency#stringbillingStatus#BillingStatusalways returnedPENDINGBILLEDPAIDdefaultHideAmount#booleanwithHideAmountCustomization#booleanwithGiftCards#booleanwithLeadCollection#booleanwithoutCustomization#booleanalways returnedmomentType#MomentTypeOCCASIONKEY_MOMENTEDITIONmomentSlug#stringleadCollectionOptions#objectdonationsBilledOn#DonationBilledOnalways returnedCREATIONCLAIMwithDonationsValidation#booleanalways returnedfiscalReceiptType#FiscalReceiptTypealways returnedYEARLYSINGLE_DONATIONfiscalReceiptSendingMode#FiscalReceiptSendingModealways returnedMANUALEMAILdefaultHasBeenCharged#booleanalways returneddefaultFeeType#FeeTypealways returnedEXCLUDEDINCLUDEDdonationValidityPeriod#stringalways returnedtemplate#stringphysicalFormat#PhysicalFormatCUSTOMPRINTPARCELwithEmailWall#booleanpostDonationWidgets#PostDonationWidget[]always returnedtitle#stringdescription#stringlogoUrl#stringfaviconUrl#stringtitleColor#stringaccentColor#stringgivingTarget#integer (int64)message#stringreminderMessage#stringemailSenderName#stringemailSenderPictureUrl#stringemailSubject#stringemailTemplate#stringemailReplyTo#stringemailDisplayCard#booleanlastCustomerReminderId#stringcharitiesSelectionId#stringaccountId#stringalways returnedcampaignTemplateId#stringdonorPlatformId#stringcreatedAt#string (date-time)always returnedupdatedAt#string (date-time)always returned
Errors
400Invalid charitiesSelectionId
{ "statusCode": 400, "message": "Invalid charitiesSelectionId", "error": "Bad Request" }400A field is missing, has the wrong type, or is not part of the request schema.
Every request with a body or query is validated.
{ "statusCode": 400, "message": [ "amount must not be less than 1", "property foo should not exist" ], "error": "Bad Request" }401Unauthorized
Missing, expired or invalid access token.
{ "statusCode": 401, "message": "Unauthorized" }403The charities of this campaign cannot be customized
{ "statusCode": 403, "message": "The charities of this campaign cannot be customized", "error": "Forbidden" }403Account closed
{ "message": "Account closed", "code": "ACCOUNT_CLOSED" }403Forbidden
Your credentials cannot perform this action on this resource. An id from another account answers 404 in the path, 400 in the body or the query.
{ "statusCode": 403, "message": "Forbidden" }404Not Found
No resource with this id on your account: the API answers as if it did not exist.
{ "statusCode": 404, "message": "Not Found" }409Slug already used
{ "message": "Slug already used", "code": "slug_already_used" }
curl -X PATCH https://api.sandbox.charitips.com/v1/campaigns/<campaignId> \ -H "Authorization: Bearer $CHARITIPS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "Checkout donations" }'Request bodies are written for this docs and checked against the API's validation; ids in angle brackets are placeholders. Response values are placeholders built from the schema.