Webhooks
InMemory4 offers webhooks for specific types of events. In order to enable webhooks, your client needs to have access to projects.
All events are sent as POST requests to the given URL.
Set webhooks settings
You can enable webhooks through the API
URI: 'https://<im4>/webhooks'
- Request-type:
POST - Parameters:
{webhook_url}(string|nullable){webhook_proofreading_created}(boolean){webhook_proofreading_changed}(boolean){webhook_order_created}(boolean){webhook_order_changed}(boolean) - Return data
200 OKSettings updated successfully.422 Unprocessable ContentMalformed payload not as expected. Response contains enerrorsobject with details.
Get webhooks settings
Returns the current webhook settings
URI: 'https://<im4>/webhooks'
- Request-type:
GET - Return data
{object}(JSON)
{
"webhook_url": "String",
"webhook_proofreading_created": "Boolean",
"webhook_proofreading_changed": "Boolean",
"webhook_order_created": "Boolean",
"webhook_order_changed": "Boolean"
}
Security - Signature
Each webhook event will contain a header Signature.
The signature value will be the same as your API key.
You can use this signature to verify the request hasn't been tampered with.
Trigger a test-event
Triggers a Test event. Useful if you want to confirm your webhook configuration is working.
URI: 'https://<im4>/webhooks/test'
- Request-type:
POST - Return data
200 OK
Event types
These are the supported event types. Each event origin is identified by its event attribute, which is always
part of the payload.
Order created
Triggered whenever a new order has been created.
Payload
{
"event": "order.created",
"project_id": "Number",
"order_id": "Number"
}
Order changed
Triggered whenever an order changes
Payload
{
"event": "order.changed",
"project_id": "Number",
"order_id": "Number"
}
Proofreading sent
Triggered whenever a new proofreading is created and sent
Payload
{
"event": "proofreading.sent",
"project_id": "Number",
"proofreading_batch_id": "Number"
}
Proofreading updated
Triggered whenever a new proofreading is updated with a new comment
Payload
{
"event": "proofreading.updated",
"project_id": "Number",
"proofreading_batch_id": "Number"
}
Test
Triggered the Trigger a test-event request is posted.
Payload
{
"event": "test",
"message": "Hello!"
}