Creates a new webhook subscription.
Endpoint
https://api.neoncrm.com/neonws/services/api/webhook/createWebhook
Request
https://api.neoncrm.com/neonws/services/api/webhook/createWebhook?webhook.webhookName=My%20Test%20Webhook&webhook.notifyUrl=https://myapp.app/webhook&webhook.eventTrigger=CREATE_ACCOUNT&webhook.contentType=application/x-www-form-urlencoded&webhook.userName=[example username]&webhook.password=[example password]&webhook.parameters.nameValuePair.name=CustomParameterName&webhook.parameters.nameValuePair.value=CustomParameterValue
Response
{
"createWebhookResponse": {
"operationResult": "SUCCESS",
"responseDateTime": "2017-06-30T19:27:36.559+0000",
"id": 27
}
}
Request Parameters
Parameter |
Required |
Description |
webhook.webhookName |
Yes |
The internal name for this webhook. |
webhook.notifyUrl |
Yes |
The URL to which the webhook POST will be sent. |
webhook.eventTrigger |
Yes |
The event in NeonCRM that triggers the sending of the webhook POST. Possible values: CREATE_ACCOUNT, UPDATE_ACCOUNT, DELETE_ACCOUNT, CREATE_DONATION, UPDATE_DONATION, DELETE_DONATION, CREATE_MEMBERSHIP, UPDATE_MEMBERSHIP, DELETE_MEMBERSHIP, CREATE_ACTIVITY, UPDATE_ACTIVITY, DELETE_ACTIVITY. |
webhook.contentType |
Yes |
Possible values: application/x-www-form-urlencoded, application/json. If application/x-www-form-urlencoded, the data will be sent as a JSON string in a form parameter called “payload”. |
webhook.userName |
|
If your webhook uses HTTP basic authentication, provide a user name here. |
webhook.password |
|
If your webhook uses HTTP basic authentication, provide a password here. |
webhook.parameters.nameValuePair.name |
|
Provide the name for a custom parameter to be included with all webhook POSTs. This field is repeatable. |
webhook.parameters.nameValuePair.value |
|
Provide the value for a custom parameter to be included with all webhook POSTs. This field is repeatable. |
Response Parameters
Parameter |
Description |
id |
The ID of the webhook that was created. |
Error Codes
Code |
Text |
Description |
17001 |
WEBHOOK_NAME_IS_REQUIRED |
Webhook name is required. |
17002 |
NOTIFY_URL_IS_REQUIRED |
Notify URL is required. |
17003 |
EVENT_TRIGGER_IS_REQUIRED |
Event trigger is required. |
17004 |
CONTENT_TYPE_IS_REQUIRED |
Content type is required. |
17005 |
NOTIFY_URL_IS_INVALID |
Notify URL is invalid. |
17006 |
CONTENT_TYPE_IS_INVALID |
Content type is invalid. |