URL | Verbs | Fields | Error Codes
Use this API to work with donation keywords.
https://app.mojotxt.com/api/v1/{phone_number}/donations/{verb}/{DonationID or Keyword}
| Verb | Description |
|---|---|
| list | List all donation keywords associated with this phone number. |
| get | Get a specific donation keyword by its ID or keyword. |
| add | Add a new donation keyword. |
| update | Update a donation keyword's settings. |
| delete | Delete a donation keyword. |
| export | Export the donations made using a specific donation keyword. |
| Field | Type (Limit) | Required | Notes |
|---|---|---|---|
| DonationID | Integer | N/A | Read-Only - A unique identifier for this donation object. |
| KeywordID | Integer | N/A | Read-Only - A unique identifier for this object's keyword. |
| Keyword | String (20) | Yes | A unique keyword for this donation object. Letters and numbers only. Returned in uppercase. |
| FundName | String | Yes | The name of the fund that the user is donating to. (Will be shown to the user.) |
| DefaultAmount | Number | No | Default amount of donation if user does not specify. If empty, user will be asked for an amount. |
| RecurringScheduleID | Integer | No | Default 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). |
| CCBFund | Integer | No | For CCB Users: If exporting donations to CCB, a fund number is required. See CCB API for a list of fund numbers. |
| AmountRequestMessage | String | No | Use this field to specify the message sent to the user when no amount is specified. |
| ThankYou | String | No | Use 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. |
| Listed | Integer | No | 1 = Listed (Default) 0 = Hidden |
| TotalAmountDonated | Number | N/A | Read-Only - Total amount donated using this keyword. |
| TotalDonations | Integer | N/A | Read-Only - Total number of donations using this keyword. |
| LastDonationTime | Integer | N/A | Read-Only - The last time a donation was made to this keyword (UNIX timestamp). |
| NumberOfDonors | Integer | N/A | Read-Only - The number of unique people who have donated using this keyword. |
| Error Code | Endpoint | Description | Notes |
|---|---|---|---|
| 1000-1099 | API Core | (Multiple) | See API Error Codes |
| 1100-1199 | Keywords | (Multiple) | See API Error Codes |
| 1200 | Donations | No Donation object specified. | A donation id is required for this request (i.e. /api/v1/+15555550100/donations/get/100) |
| 1201 | Donations | Donation 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.) |
| 1202 | Donations | No fund name specified. | A FundName is required for each donation object. It cannot be blank. |
| 1203 | Donations | Invalid default recurring schedule. | Possible options: 0 (one-time), 1 (weekly), 2 (biweekly), 3 (monthly), null (ask user) |