Webhook Callback | DataGrail Documentation
Webhook Callback
PUT https://www.example.com/api/v2/webhooks/callback
Webhook Callback
Request
Header Parameters
authorization stringrequired
Example: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9
application/json
Body
opt_out
access
deletion
readiness_check
Body required
status stringrequired
The state of the integration.
OptOut request possible values: error, complete.
Access request possible values: ignored, completed.
Deletion request possible values: ignored, completed.
Not applicable for readiness_check request type.
request_type stringrequired
Type of the webhook callback
Possible values: [opt_out, access, deletion, readiness_check]
webhook_request_id string
The unique identifier of the webhook (UUID)
Example: 46093148-5087-423d-81b5-88c22701c642
integration_id string
The unique identifier of the integration (UUID).
(Optional) This field is required for access, deletion, and readiness_check request types.
Example: 7efa58a8-9b7d-4faf-8082-5f7f7f407db7
privacy_request_id string
The unique identifier of the privacy request (UUID).
(Optional) This field is required for access, deletion, and readiness_check request types.
Example: 80edbafc-4ec6-45a0-b341-73080457890e
opt_out_request_id string
The unique identifier of the opt out request (UUID).
(Optional) This field is required for opt_out request type.
Example: ef3145eb-a189-4519-adc6-8101477d8484
integration_state_id string
The unique identifier of the opt out integration state.
(Optional) This field is required for opt_out request type.
Example: 42
answer string
The answer to the readiness check question.
(Optional) This field is required for readiness_check request type.
The value must match one of the configured answer options (case-insensitive).
Example: Yes
results object
List of local or remote files to upload.
This field can be used only with access request type.
Possible to use files/file_refs fields both separately and together.
files object
List of files to upload to the integration.
Structure: key=filename, value=base64(file).
Example: {"file1.txt":"dGVzdAo=", "file2.txt":"dGVzdAo="}
file_refs array
List of remote files to upload to the integration.
Supported storages: AWS S3, Azure Blob Storage, Google Cloud Storage.
The files must be located in the special bucket at the following path:
api_integration_files_sync/{privacy_request.uuid}/{integration.uuid}/*
Example: ["api_integration_files_sync/80edbafc-4ec6-45a0-b341-73080457890e/7efa58a8-9b7d-4faf-8082-5f7f7f407db7/file.txt"]
Opt-Out callback
{
"request_type": "opt_out",
"webhook_request_id": "9bfacff3-c454-4212-9417-88e246e1798f",
"opt_out_request_id": "206356d2-80de-492c-bd34-b0093b6f5d25",
"integration_state_id": "123456789",
"status": "complete"
}
Access (Privacy Request) callback
{
"request_type": "access",
"webhook_request_id": "3aa32ca6-e60d-4b71-981a-d1ba258fd712",
"privacy_request_id": "4b7a02e2-361e-4957-9d69-b381e3f47758",
"integration_id": "4b7a02e2-361e-4957-9d69-b381e3f47758",
"status": "completed",
"results": {
"files": {
"contacts_data.txt": "cHJpdmFjeSBkYXRhIGZvciBzb21lIHVzZXI="
}
}
}
Deletion (Privacy Request) callback
{
"request_type": "deletion",
"webhook_request_id": "8cf283d3-b9d3-4f93-8195-55948c43d625",
"privacy_request_id": "9b8d61c7-8432-4e7a-bc2d-7ae17232979c",
"integration_id": "716cde3d-3136-407a-bb32-dba2b4dcf1d9",
"status": "completed"
}
Readiness Check callback
{
"request_type": "readiness_check",
"webhook_request_id": "46093148-5087-423d-81b5-88c22701c642",
"privacy_request_id": "80edbafc-4ec6-45a0-b341-73080457890e",
"integration_id": "7efa58a8-9b7d-4faf-8082-5f7f7f407db7",
"answer": "Yes"
}
Responses
- 200
- 400
- 401
- 403
- 404
- 409
- 422
OK
Bad Request
Unauthorized
Forbidden
Not Found
Conflict - Integration already processed or readiness check expired
Unprocessable Entity
curl
go
java
nodejs
php
python
ruby
rust
swift
CURL
curl -L -X PUT 'https://www.example.com/api/v2/webhooks/callback' \
-H 'Content-Type: application/json' \
-d '{
"status": "string",
"request_type": "opt_out",
"webhook_request_id": "46093148-5087-423d-81b5-88c22701c642",
"integration_id": "7efa58a8-9b7d-4faf-8082-5f7f7f407db7",
"privacy_request_id": "80edbafc-4ec6-45a0-b341-73080457890e",
"opt_out_request_id": "ef3145eb-a189-4519-adc6-8101477d8484",
"integration_state_id": "42",
"answer": "Yes",
"results": {
"files": {
"file1.txt": "dGVzdAo=",
"file2.txt": "dGVzdAo="
},
"file_refs": [\
"api_integration_files_sync/80edbafc-4ec6-45a0-b341-73080457890e/7efa58a8-9b7d-4faf-8082-5f7f7f407db7/file.txt"\
]
}
}'
Base URL
Edit
Parameters
authorization — headerrequired
Body required
- opt_out
- access
- deletion
- readiness_check
Opt-Out callback
Send API Request