Create Hook
Body·
required
application/json
- auth
Config required- tokenType: stringrequired
Bearer token
- Type: stringauth
Type requiredAuthentication type
- Type: stringendpoint
Url min length:1max length:2083Format: urirequiredTarget HTTPS API endpoint URL
- Type: enumentity
Type requiredEntity type this hook applies to
valuesdealscompaniespeopleleads - Type: Fieldmappingsfield
Mappings requiredProperties: 1Maps target API fields to source entity fields
- Type: stringnamemin length:1max length:255required
Display name for the event hook
- Type: stringdescriptionmax length:1024nullable
Optional description
- Type: HeadersnullableheadersProperties: 1
Optional HTTP headers
- enumhttp
Method const:POSTHTTP method (currently only POST)
valuesPOST - Type: integertimeout
Seconds min:1Request timeout in seconds
- Type: Valuemappingsnullablevalue
Mappings Properties: 1Maps CRM field values to API values
- additionalPropertyType: anythingproperty
Name
Responses
- application/json
- application/json
Request Example for post/event_hooks/
curl https://crm.dreamhub.ai/api/v1/settings/event_hooks/ \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"name": "",
"description": "",
"entityType": "deals",
"httpMethod": "POST",
"endpointUrl": "",
"timeoutSeconds": 10,
"headers": {
"additionalProperty": ""
},
"authType": "",
"authConfig": {
"token": ""
},
"fieldMappings": {
"additionalProperty": ""
},
"valueMappings": {
"additionalProperty": {
"additionalProperty": ""
}
},
"additionalProperty": "anything"
}'
{
"id": "string"
}
