Webhooks
Limited Support
We currently support Webhooks for:
- Source Systems: Procore
- Data Models: Files, Folders, Drawings, and RFIs
- Events: Create, Update, and Delete
To request other Webhooks, reach out to us at api-support@agaveapi.com.
API Endpoint​
https://api.agaveapi.com/construction/projects/{procore_id}/webhooks
Request Header​
As with other API requests, you need to include an API-Version
, Client-Id
, Client-Secret
, and Account-Token
. 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 |
event | String | The event to subscribe to. | "CREATE" , "UPDATE" , or "DELETE" | Required |
type | String | The type of data to subscribe to. | "file" , "folder" , or "rfi" | Required |
Example Request​
curl --request POST https://api.agaveapi.com/construction/projects/{procore_id}/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 'Content-Type: application/json' \
--data-raw '{
"callback_url": "https://webhook.site/#!/58eb2c6a-2fce-4e61-88ad-c9a354819737",
"event": "CREATE",
"type": "file"
}'
Example Response​
{
"id": "04b38725-31ea-5682-adfe-ac1ac38f5713",
"source_id": "198396",
"callback_url": "https://webhook.site/58eb2c6a-2fce-4e61-88ad-c9a354819737",
"event": "CREATE",
"project_id": "2c20934e-98c0-522b-a730-80571d02f8be",
"target": "bdc00643-a562-5bcf-9c85-daf58bda3012",
"type": "file",
"source_data": {
"path": "",
"content_type": "application/json",
"data": {
"user_id": 77742,
"ulid": "01FXRACPEGBXAPKN9B58CBGK7A",
"timestamp": "2022-03-09T21:47:03.193658Z",
"resource_name": "Project Files",
"resource_id": 9741901,
"project_id": 66736,
"metadata": {
"source_user_id": 77742,
"source_project_id": 66736,
"source_operation_id": null,
"source_company_id": 31936,
"source_application_id": null
},
"id": 277215374,
"event_type": "create",
"company_id": 31936,
"api_version": "v2"
}
}
}