🔔Webhooks
Create Webhook
POST https://uc.alxgsv.com/api/v1/projects/${PROJECT_ID}/webhooks.json
curl -X POST -H "Authorization: Bearer ${SECRET_KEY}" -H "Content-Type: application/json" -d '{"webhook": { "target_url": "http://example.com/webhook", "events": ["file.updated", "file.created"] }}' https://uc.alxgsv.com/api/v1/projects/${PROJECT_ID}/webhooks.json
Path Parameters
project_id*
String
Headers
Authorization
String
Bearer SECRET_KEY
Request Body
webhook[target_url]*
String
webhook[events]*
Array
webhook[is_active]
Boolean
{
"data": {
"type": "groups",
"id": "g-xu49PKim5ztpqxQ5AfRCwC",
"attributes": {
"uuid": null,
"status": "pending"
},
"relationships": {
"project": {
"data": {
"type": "projects",
"id": "8a540ce633522d881e97"
}
}
},
"authentication": {
"access_token": "gat-938HYhsrDjFDWpQ4kkG5q2"
}
}
}View Webhook
GET https://uc.alxgsv.com/api/v1/projects/${PROJECT_ID}/webhooks/:webhook_id.json
curl -X GET -H "Authorization: Bearer ${SECRET_KEY}" -H "Content-Type: application/json" https://uc.alxgsv.com/api/v1/projects/${PROJECT_ID}/webhooks/${WEBHOOK_ID}.json
Path Parameters
project_id*
String
webhook_id*
String
Headers
Authorization
String
Bearer SECRET_KEY
{
"data": {
"type": "groups",
"id": "g-xu49PKim5ztpqxQ5AfRCwC",
"attributes": {
"uuid": null,
"status": "pending"
},
"relationships": {
"project": {
"data": {
"type": "projects",
"id": "8a540ce633522d881e97"
}
}
},
"authentication": {
"access_token": "gat-938HYhsrDjFDWpQ4kkG5q2"
}
}
}Update Webhook
PUT https://uc.alxgsv.com/api/v1/projects/${PROJECT_ID}/webhooks/:webhook_id.json
curl -X PUT -H "Authorization: Bearer ${SECRET_KEY}" -H "Content-Type: application/json" -d '{"webhook": { "target_url": "http://example.com/webhook", "events": ["file.updated", "file.created"] }}' https://uc.alxgsv.com/api/v1/projects/${PROJECT_ID}/webhooks/${WEBHOOK_ID}.json
Path Parameters
project_id*
String
webhook_id*
String
Headers
Authorization
String
Bearer SECRET_KEY
Request Body
webhook[target_url]
String
webhook[events]
Array
webhook[is_active]
Boolean
{
"data": {
"type": "groups",
"id": "g-xu49PKim5ztpqxQ5AfRCwC",
"attributes": {
"uuid": null,
"status": "pending"
},
"relationships": {
"project": {
"data": {
"type": "projects",
"id": "8a540ce633522d881e97"
}
}
},
"authentication": {
"access_token": "gat-938HYhsrDjFDWpQ4kkG5q2"
}
}
}Update Webhook
DELETE https://uc.alxgsv.com/api/v1/projects/${PROJECT_ID}/webhooks/:webhook_id.json
curl -X DELETE -H "Authorization: Bearer ${SECRET_KEY}" -H "Content-Type: application/json" https://uc.alxgsv.com/api/v1/projects/${PROJECT_ID}/webhooks/${WEBHOOK_ID}.json
Path Parameters
project_id*
String
webhook_id*
String
Headers
Authorization
String
Bearer SECRET_KEY
{
"data": {
"type": "groups",
"id": "g-xu49PKim5ztpqxQ5AfRCwC",
"attributes": {
"uuid": null,
"status": "pending"
},
"relationships": {
"project": {
"data": {
"type": "projects",
"id": "8a540ce633522d881e97"
}
}
},
"authentication": {
"access_token": "gat-938HYhsrDjFDWpQ4kkG5q2"
}
}
}Event Schema
{
"data": {
"type": "webhook_events",
"id": WEBHOOK_EVENT_ID, // Unique Event Id (not to confuse with webhook id)
"attributes": {
"event": WEBHOOK_EVENT_TYPE // Event type, like "file.created", "file.updated", etc
},
"relationships": {
"webhook": {
"data": {
"type": "webhooks",
"id": WEBHOOK_ID
}
},
"resource": {
"data": {
"type": RESOURCE_TYPE, // "files", "groups" or "action"
"id": RESOURCE_ID
}
}
}
},
"included": [
RESOURCE, // full resource serialized
WEBHOOK // full webhook serialized
]
}Events Types
File
file.created
File is created and assigned an ID
file.updated
File is updated (from_url load finish, chunked upload finish, conversion finish, attribute update)
file.deleted
File is deleted (manually or expiration)
Group
group.created
Group is created and assigned an ID
group.updated
Group is updated (received UUID from Uploadcare, updated UUID from Uploadcare)
group.deleted
Group is deleted
Actions
action.created
Action is created and assigned an ID
action.updated
Action result is ready
Last updated