Webhooks
We currently support webhooks for HubSpot, Pipedrive, Procore, and QuickBooks Online.
To request other Source Systems, let us know at api-support@agaveapi.com.
API Endpoint
To learn more about requests that are supported, see Webhooks.
https://api.agaveapi.com/webhooks
Request Header
As with other API requests, you need to include an API-Version
, Client-Id
, Client-Secret
, and Account-Token
.
If you are creating a Project-level webhook, you will need to include Project-Id
as well. To learn more, see Headers.
Body Parameters
Key | Type | Description | Example | Required |
---|---|---|---|---|
callback_url | String | The URL to send events to. You can generate a callback URL from webhook.site for testing and change it to your own server's endpoint to receive events. | "https://webhook.site/58eb2c6a-2fce-4e61-88ad-c9a354819737" | Required |
authorization_header | String | If provided, all webhooks POST requests delivered by Agave will contain this Authorization information in the request header | "Bearer 9tk5GuTqqcOt7P0spZ7fJZoN8eqtYx" or "Basic S3CRET!" or empty | Optional |
event | String | The event to subscribe to. | "CREATE" , "UPDATE" , or "DELETE" | Required |
type | String | The type of data to subscribe to. | "file" , "folder" , "rfi" , "submittal" , "vendor" , etc. | Required |
Example Request
curl --request POST https://api.agaveapi.com/webhooks \
--header 'API-Version: 2021-11-21' \
--header 'Client-Id: your_client_id' \
--header 'Client-Secret: your_client_secret' \
--header 'Account-Token: procore_account_token' \
--header 'Include-Source-Data: true' \
--header 'Project-Id: your_optional_project_id' \
--header 'Content-Type: application/json' \
--data-raw '{
"callback_url": "https://your-website.com/webhook-callback",
"authorization_header": "Bearer 9tk5GuTqqcOt7P0spZ7fJZoN8eqtYx"
"event": "CREATE",
"type": "file"
}'
Response
Body Parameters
Key | Type | Description |
---|---|---|
source_id | String | The ID of the event in the Source System. |
callback_url | String | The URL you specified in the request to send events to. |
event | String | The event you specified in the request to subscribe to. |
project_id | String | The UUID of the Project assigned by Agave. This is only present for Project-level events. |
target | String | The ID that you can use to tie events back to what's in your system. This includes the webhook event type (e.g. "file" ), followed by either the Agave-generated UUID for a specific data object or a "*" for all data objects for the requested type. |
type | String | The type of data you specified in the request to subscribe to. |
Example Response
{
"id": "8c6309d7-4d44-517b-a5e0-42ff993d7b08",
"source_id": "198402",
"callback_url": "https://your-website.com/webhook-callback",
"event": "CREATE",
"project_id": "your_optional_project_id",
"target": "file:*",
"type": "file"
}
Example Webhook Event
This is an example webhook event that Agave will asynchronously send to your registered callback endpoint. Note that the project_id
and
target
fields have been converted to Agave UUIDs.
If you provided an authorization_header
header when creating the webhook, all events delivered by Agave will include it as the Authorization
header.
- Procore (Project-level)
- Procore (Company-level)
- HubSpot
- Pipedrive
- QuickBooks Online
{
"id": "117720fc-564e-55c8-8e80-8b4b908eb382",
"source_id": "14102824",
"callback_url": "https://your-website.com/webhook-callback",
"event": "CREATE",
"project_id": "503e77ad-4fd4-5595-909f-a78f78283e25",
"target": "2a7424aa-95c0-5d1e-8fa1-3a2d84b2774d",
"type": "vendor",
"source_data": {
"path": null,
"content_type": "application/json",
"data": {
"user_id": 8427555,
"ulid": "01GS489MVR50JM2C5PR2PX6FS2",
"timestamp": "2023-02-13T02:05:09.693059Z",
"resource_name": "Project Vendors",
"resource_id": 562949960304878,
"project_id": 562949953695377,
"metadata": {
"source_user_id": 8427555,
"source_project_id": 562949953695377,
"source_operation_id": null,
"source_company_id": 562949953442223,
"source_application_id": "d2d41975afd2f1505efd1c4c331c91d45e4967e38fe75368c2ae78498c3030ea"
},
"id": 7993510342,
"event_type": "create",
"company_id": 562949953442223,
"api_version": "v2"
}
}
}
{
"id": "83e87bf7-93e5-5838-aa4b-9f5abb8cb7b4",
"source_id": "15739630",
"callback_url": "https://your-website.com/webhook-callback",
"event": "UPDATE",
"project_id": null, // Note: this is empty to indicate this is a Company-level event
"target": "a6d3ba18-069e-53a0-991b-b0b20dd70b44",
"type": "project",
"source_data": {
"path": null,
"content_type": "application/json",
"data": {
"user_id": 8427555,
"ulid": "01GS48JK2NK29R7ZCEWM7CKG1P",
"timestamp": "2023-02-13T02:10:01.470514Z",
"resource_name": "Projects",
"resource_id": 562949954150157,
"project_id": 562949954150157,
"metadata": {
"source_user_id": 8427555,
"source_project_id": 562949954150157,
"source_operation_id": null,
"source_company_id": 562949953442223,
"source_application_id": null
},
"id": 7993534654,
"event_type": "update",
"company_id": 562949953442223,
"api_version": "v2"
}
}
}
{
"id": "71face73-60d4-5687-80f3-618ca35f5c2d",
"source_id": "5e8665d1-26ee-4ef1-94f9-8e363fb1ebbb",
"callback_url": "https://your-website.com/webhook-callback",
"event": "CREATE",
"project_id": null,
"target": "4b4791a6-941f-56cf-a12b-c466768f56de",
"type": "customer",
"source_data": {
"path": null,
"content_type": "application/json",
"data": {
"eventId": 3380164703,
"subscriptionId": 1852585,
"portalId": 23429609,
"appId": 1267952,
"occurredAt": 1676254128989,
"subscriptionType": "company.creation",
"attemptNumber": 0,
"objectId": 12922996782,
"changeFlag": "CREATED",
"changeSource": "INTEGRATION",
"sourceId": "1267952"
}
}
}
{
"id": "8907fd2a-e8b5-5c16-878d-83a512024238",
"source_id": "5373560",
"callback_url": "https://your-website.com/webhook-callback",
"event": "CREATE",
"project_id": null,
"target": "cda26868-0ae2-52dc-af4d-546a8f4eb357",
"type": "opportunity",
"source_data": {
"path": "",
"content_type": "application/json",
"data": {
"v": 1,
"matches_filters": {
"current": []
},
"meta": {
"action": "added",
"change_source": "app",
"company_id": 12577477,
"host": "agave-sandbox.pipedrive.com",
"id": 51,
"is_bulk_update": false,
"matches_filters": {
"current": []
},
"object": "deal",
"permitted_user_ids": [
17117394,
17244697,
17939182,
17958487
],
"pipedrive_service_name": false,
"timestamp": 1679545446,
"timestamp_micro": 1679545446664180,
"prepublish_timestamp": 1679545446913,
"trans_pending": false,
"user_id": 17244697,
"v": 1,
"webhook_id": "5392913"
},
"current": {
"email_messages_count": 0,
"cc_email": "agave-sandbox+deal51@pipedrivemail.com",
"products_count": 0,
"next_activity_date": null,
"next_activity_type": null,
"next_activity_duration": null,
"id": 51,
"person_id": 1,
"creator_user_id": 17244697,
"expected_close_date": null,
"owner_name": "Sandbox Agave",
"participants_count": 0,
"stage_id": 1,
"probability": null,
"undone_activities_count": 0,
"renewal_type": "one_time",
"active": true,
"person_name": "Jane Doe",
"last_activity_date": null,
"close_time": null,
"org_hidden": false,
"next_activity_id": null,
"weighted_value_currency": "USD",
"stage_order_nr": 0,
"next_activity_subject": null,
"rotten_time": null,
"user_id": 17244697,
"visible_to": "3",
"org_id": 1,
"notes_count": 0,
"next_activity_time": null,
"formatted_value": "$0",
"status": "open",
"formatted_weighted_value": "$0",
"first_won_time": null,
"last_outgoing_mail_time": null,
"title": "Webhooks deal",
"last_activity_id": null,
"update_time": "2023-03-23 04:24:06",
"activities_count": 0,
"pipeline_id": 1,
"lost_time": null,
"currency": "USD",
"weighted_value": 0,
"org_name": "Agave",
"value": 0,
"person_hidden": false,
"next_activity_note": null,
"files_count": 0,
"last_incoming_mail_time": null,
"label": null,
"lost_reason": null,
"deleted": false,
"won_time": null,
"followers_count": 0,
"stage_change_time": null,
"add_time": "2023-03-23 04:24:06",
"done_activities_count": 0
},
"previous": null,
"event": "added.deal",
"retry": 0
}
}
}
{
"id": "1056d719-6011-51de-a79a-af0bf9bcff79",
"source_id": "99149792-30a3-4408-a1f2-4d362381ca48",
"callback_url": "https://your-website.com/webhook-callback",
"event": "UPDATE",
"project_id": null,
"target": "6cb147b3-c2a3-5dc8-bafe-3b8cdca227c4",
"type": "customer",
"source_data": {
"path": "",
"content_type": "application/json",
"data": {
"name": "Customer",
"id": "1",
"operation": "Update",
"lastUpdated": "2023-03-22T19:04:25.000Z"
}
}
}