Donations

URL | Verbs | Fields | Error Codes

Use this API to work with donation keywords.

URL Scheme

https://app.mojotxt.com/api/v1/{phone_number}/donations/{verb}/{DonationID or Keyword}

Available Verbs

VerbDescription
listList all donation keywords associated with this phone number.
getGet a specific donation keyword by its ID or keyword.
addAdd a new donation keyword.
updateUpdate a donation keyword's settings.
deleteDelete a donation keyword.
exportExport the donations made using a specific donation keyword.

Donation Object Fields

FieldType (Limit)RequiredNotes
DonationIDIntegerN/ARead-Only - A unique identifier for this donation object.
KeywordIDIntegerN/ARead-Only - A unique identifier for this object's keyword.
KeywordString (20)YesA unique keyword for this donation object. Letters and numbers only. Returned in uppercase.
FundNameStringYesThe name of the fund that the user is donating to. (Will be shown to the user.)
DefaultAmountNumberNoDefault amount of donation if user does not specify. If empty, user will be asked for an amount.
RecurringScheduleIDIntegerNoDefault recurring schedule for donation. Possible options:
Null = Ask User
0 = One Time
1 = Weekly
2 = Bi-Weekly
3 = Monthly
When adding a fund, leaving this out uses 0 (One Time). An empty value uses Null (Ask User).
CCBFundIntegerNoFor CCB Users: If exporting donations to CCB, a fund number is required. See CCB API for a list of fund numbers.
AmountRequestMessageStringNoUse this field to specify the message sent to the user when no amount is specified.
ThankYouStringNoUse this field to specify the "Thank You" message that is sent after a successful donation. If left empty when adding a keyword, a default message is used.
ListedIntegerNo1 = Listed (Default)
0 = Hidden
TotalAmountDonatedNumberN/ARead-Only - Total amount donated using this keyword.
TotalDonationsIntegerN/ARead-Only - Total number of donations using this keyword.
LastDonationTimeIntegerN/ARead-Only - The last time a donation was made to this keyword (UNIX timestamp).
NumberOfDonorsIntegerN/ARead-Only - The number of unique people who have donated using this keyword.

Error Codes

Error CodeEndpointDescriptionNotes
1000-1099API Core(Multiple)See API Error Codes
1100-1199Keywords(Multiple)See API Error Codes
1200DonationsNo Donation object specified.A donation id is required for this request (i.e. /api/v1/+15555550100/donations/get/100)
1201DonationsDonation object does not exist.The donation ID you specified doesn't exist, or belongs to a different phone number. (An unknown Keyword returns error 1105.)
1202DonationsNo fund name specified.A FundName is required for each donation object. It cannot be blank.
1203DonationsInvalid default recurring schedule.Possible options:
0 (one-time), 1 (weekly), 2 (biweekly), 3 (monthly), null (ask user)