Hook
A hook is an extension of Rossum that is notified when specific event occurs. A hook object is used to configure what endpoint or function is executed and when. For an overview of other extension options see Extensions
Hook
ID of the hook.
Name of the hook.
URL of the hook.
List of queues that use hook object.
List of all hooks that has to be executed before running this hook.
If set to true the hook is notified.
List of events, when the hook should be notified. For the list of events see Webhook events.
List of related objects that should be included in hook request. For the list of possible sideloads see Webhook events.
Default:[]Client data. May be used to store e.g. external system object IDs. See Metadata for more details.
Default:{}URL of a user object. If present, an API access token is generated for this user and sent to the hook. Users with organization group admin cannot be set as token_owner. If null, token is not generated.
Lifetime number of seconds for rossum_authorization_token (min=0, max=7200). This setting will ensure the token will be valid after hook response is returned. If null, default lifetime of 600 is used.
Hook description text.
Import source of the extension.
Default:"custom"Specific settings that will be included in the payload when executing the hook. Field is validated with json schema stored in settings_schema field.
{}JSON schema for settings field validation.
Specific secrets that are stored securely encrypted. The values are merged into the hook execution payload. Field is validated with json schema stored in secrets_schema field. (write only)
{}JSON schema for secrets field validation.
{"type":"object","additionalProperties":{"type":"string"}}Description how to use the extension.
URL address leading to more info page.
URL address of extension picture.
URL of the hook template used to create the hook.
URL of the hook creator. Might be null for hooks created before April 2025.
Date of hook creation. Might be null for hooks created before April 2025.
User that last modified the object.
Timestamp of last modification.
ID of the hook.
Name of the hook.
URL of the hook.
List of queues that use hook object.
List of all hooks that has to be executed before running this hook.
If set to true the hook is notified.
List of events, when the hook should be notified. For the list of events see Webhook events.
List of related objects that should be included in hook request. For the list of possible sideloads see Webhook events.
Default:[]Client data. May be used to store e.g. external system object IDs. See Metadata for more details.
Default:{}URL of a user object. If present, an API access token is generated for this user and sent to the hook. Users with organization group admin cannot be set as token_owner. If null, token is not generated.
Lifetime number of seconds for rossum_authorization_token (min=0, max=7200). This setting will ensure the token will be valid after hook response is returned. If null, default lifetime of 600 is used.
Hook description text.
Import source of the extension.
Default:"custom"Specific settings that will be included in the payload when executing the hook. Field is validated with json schema stored in settings_schema field.
{}JSON schema for settings field validation.
Specific secrets that are stored securely encrypted. The values are merged into the hook execution payload. Field is validated with json schema stored in secrets_schema field. (write only)
{}JSON schema for secrets field validation.
{"type":"object","additionalProperties":{"type":"string"}}Description how to use the extension.
URL address leading to more info page.
URL address of extension picture.
URL of the hook template used to create the hook.
URL of the hook creator. Might be null for hooks created before April 2025.
Date of hook creation. Might be null for hooks created before April 2025.
User that last modified the object.
Timestamp of last modification.
List hooks
GET api / v1 / hooks
Retrieve all hook objects.
curl -X GET "https://example.rossum.app/api/v1/hooks?type=webhook&active=true&config_url=https%3A%2F%2Fmyq.east-west-trading.com&config_app_url=https%3A%2F%2Fmyq.east-west-trading.com&extension_source=custom&events=annotation_status.changed&search=Hook+Foo"{
"pagination": {
"next": null,
"previous": null
},
"results": [
{
"id": 1500,
"type": "webhook",
"name": "Change of Status",
"url": "https://example.rossum.app/api/v1/hooks/1500",
"queues": [
"https://example.rossum.app/api/v1/queues/8199",
"https://example.rossum.app/api/v1/queues/8191"
],
"run_after": [],
"active": true,
"events": [
"annotation_status.changed"
],
"sideload": [
"queues"
],
"metadata": {
"some_key": "some_value"
},
"token_owner": "https://example.rossum.app/api/v1/users/2",
"token_lifetime_s": 1000,
"test": {
"saved_input": {}
},
"description": "This hook does...",
"extension_source": "custom",
"settings": {},
"settings_schema": {
"type": "object",
"properties": {}
},
"secrets": {},
"secrets_schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"guide": "Here we explain how the extension should be used.",
"read_more_url": "https://github.com/rossumai/simple-vendor-matching-webhook-python",
"extension_image_url": "https://rossum.ai/wp-content/themes/rossum/static/img/logo.svg",
"hook_template": "https://example.rossum.app/api/v1/hook_templates/998877",
"created_by": "https://example.rossum.app/api/v1/users/2",
"created_at": "2020-01-01T09:05:50.213451Z",
"modified_by": "https://example.rossum.app/api/v1/users/10775",
"modified_at": "2021-04-26T10:08:03.856648Z",
"config": {
"url": "https://myq.east-west-trading.com/api/hook1?strict=true",
"secret": "secret-token",
"insecure_ssl": false,
"client_ssl_certificate": "-----BEGIN CERTIFICATE-----\n...",
"client_ssl_key": "-----BEGIN PRIVATE KEY-----\n...",
"private": false,
"schedule": {},
"timeout_s": 30,
"retry_count": 4,
"max_polling_time_s": 300,
"retry_after_polling_failure": true,
"app": {
"url": "https://myq.east-west-trading.com/api/hook1?strict=true",
"settings": {},
"display_mode": "drawer"
},
"payload_logging_enabled": false,
"retry_on_any_non_2xx": false
}
}
]
}{
"detail": "Bad Request.",
"code": "bad_request"
}{
"detail": "Invalid token.",
"code": "authentication_failed"
}{
"detail": "Access to the requested resource is forbidden.",
"code": "access_forbidden"
}{
"detail": "Not found.",
"code": "not_found"
}{
"detail": "Conflict.",
"code": "conflict_status"
}{
"detail": "Request was rate limited.",
"code": "rate_limited",
"url": "https://rossum.app/api/docs/openapi/guides/overview/#rate-limiting"
}{
"detail": "Server error.",
"code": "error"
}{
"detail": "Bad Gateway.",
"code": "bad_gateway"
}{
"detail": "Service Unavailable.",
"code": "service_unavailable"
}{
"detail": "Gateway timeout.",
"code": "gateway_timeout"
}Response
OK
Invalid input data.
Detail of the error
Code of the error
The username/password is invalid or token is invalid (e.g. expired).
Detail of the error
Code of the error
Insufficient permission, missing authentication, invalid CSRF token and similar issue.
Detail of the error
Code of the error
The specified resource was not found.
Detail of the error
Code of the error
Conflict
Detail of the error
Code of the error
Request rate is too high, wait before sending more requests. See Rate Limiting for more details.
Detail of the error
Code of the error
Link to the rate limiting documentation
Server failure while processing the request.
Detail of the error
Code of the error
Invalid response from the upstream server.
Detail of the error
Code of the error
We're temporarily offline for maintenance. Please try again later.
Detail of the error
Code of the error
Upstream server could not complete the request in time.
Detail of the error
Code of the error
Create hook
POST api / v1 / hooks
Create a new hook object.
curl -X POST "https://example.rossum.app/api/v1/hooks" \ -H "Content-Type: application/json" \ -d '{ "name": "Change of Status", "events": [ "annotation_status.changed" ] }'{
"id": 1500,
"type": "webhook",
"name": "Change of Status",
"url": "https://example.rossum.app/api/v1/hooks/1500",
"queues": [
"https://example.rossum.app/api/v1/queues/8199",
"https://example.rossum.app/api/v1/queues/8191"
],
"run_after": [],
"active": true,
"events": [
"annotation_status.changed"
],
"sideload": [
"queues"
],
"metadata": {
"some_key": "some_value"
},
"token_owner": "https://example.rossum.app/api/v1/users/2",
"token_lifetime_s": 1000,
"test": {
"saved_input": {}
},
"description": "This hook does...",
"extension_source": "custom",
"settings": {},
"settings_schema": {
"type": "object",
"properties": {}
},
"secrets": {},
"secrets_schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"guide": "Here we explain how the extension should be used.",
"read_more_url": "https://github.com/rossumai/simple-vendor-matching-webhook-python",
"extension_image_url": "https://rossum.ai/wp-content/themes/rossum/static/img/logo.svg",
"hook_template": "https://example.rossum.app/api/v1/hook_templates/998877",
"created_by": "https://example.rossum.app/api/v1/users/2",
"created_at": "2020-01-01T09:05:50.213451Z",
"modified_by": "https://example.rossum.app/api/v1/users/10775",
"modified_at": "2021-04-26T10:08:03.856648Z",
"config": {
"url": "https://myq.east-west-trading.com/api/hook1?strict=true",
"secret": "secret-token",
"insecure_ssl": false,
"client_ssl_certificate": "-----BEGIN CERTIFICATE-----\n...",
"client_ssl_key": "-----BEGIN PRIVATE KEY-----\n...",
"private": false,
"schedule": {},
"timeout_s": 30,
"retry_count": 4,
"max_polling_time_s": 300,
"retry_after_polling_failure": true,
"app": {
"url": "https://myq.east-west-trading.com/api/hook1?strict=true",
"settings": {},
"display_mode": "drawer"
},
"payload_logging_enabled": false,
"retry_on_any_non_2xx": false
}
}{
"detail": "Bad Request.",
"code": "bad_request"
}{
"detail": "Invalid token.",
"code": "authentication_failed"
}{
"detail": "Access to the requested resource is forbidden.",
"code": "access_forbidden"
}{
"detail": "Not found.",
"code": "not_found"
}{
"detail": "Conflict.",
"code": "conflict_status"
}{
"detail": "Payload Too Large.",
"code": "payload_too_large"
}{
"detail": "Request was rate limited.",
"code": "rate_limited",
"url": "https://rossum.app/api/docs/openapi/guides/overview/#rate-limiting"
}{
"detail": "Server error.",
"code": "error"
}{
"detail": "Bad Gateway.",
"code": "bad_gateway"
}{
"detail": "Service Unavailable.",
"code": "service_unavailable"
}{
"detail": "Gateway timeout.",
"code": "gateway_timeout"
}Request Body
application/json
bodyobjectResponse
Created
responseobjectInvalid input data.
Detail of the error
Code of the error
The username/password is invalid or token is invalid (e.g. expired).
Detail of the error
Code of the error
Insufficient permission, missing authentication, invalid CSRF token and similar issue.
Detail of the error
Code of the error
The specified resource was not found.
Detail of the error
Code of the error
Conflict
Detail of the error
Code of the error
Payload too large (especially for files uploaded).
Detail of the error
Code of the error
Request rate is too high, wait before sending more requests. See Rate Limiting for more details.
Detail of the error
Code of the error
Link to the rate limiting documentation
Server failure while processing the request.
Detail of the error
Code of the error
Invalid response from the upstream server.
Detail of the error
Code of the error
We're temporarily offline for maintenance. Please try again later.
Detail of the error
Code of the error
Upstream server could not complete the request in time.
Detail of the error
Code of the error
Retrieve hook
GET api / v1 / hooks / {hookID}
Get a hook object.
curl -X GET "https://example.rossum.app/api/v1/hooks/1500"{
"id": 1500,
"type": "webhook",
"name": "Change of Status",
"url": "https://example.rossum.app/api/v1/hooks/1500",
"queues": [
"https://example.rossum.app/api/v1/queues/8199",
"https://example.rossum.app/api/v1/queues/8191"
],
"run_after": [],
"active": true,
"events": [
"annotation_status.changed"
],
"sideload": [
"queues"
],
"metadata": {
"some_key": "some_value"
},
"token_owner": "https://example.rossum.app/api/v1/users/2",
"token_lifetime_s": 1000,
"test": {
"saved_input": {}
},
"description": "This hook does...",
"extension_source": "custom",
"settings": {},
"settings_schema": {
"type": "object",
"properties": {}
},
"secrets": {},
"secrets_schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"guide": "Here we explain how the extension should be used.",
"read_more_url": "https://github.com/rossumai/simple-vendor-matching-webhook-python",
"extension_image_url": "https://rossum.ai/wp-content/themes/rossum/static/img/logo.svg",
"hook_template": "https://example.rossum.app/api/v1/hook_templates/998877",
"created_by": "https://example.rossum.app/api/v1/users/2",
"created_at": "2020-01-01T09:05:50.213451Z",
"modified_by": "https://example.rossum.app/api/v1/users/10775",
"modified_at": "2021-04-26T10:08:03.856648Z",
"config": {
"url": "https://myq.east-west-trading.com/api/hook1?strict=true",
"secret": "secret-token",
"insecure_ssl": false,
"client_ssl_certificate": "-----BEGIN CERTIFICATE-----\n...",
"client_ssl_key": "-----BEGIN PRIVATE KEY-----\n...",
"private": false,
"schedule": {},
"timeout_s": 30,
"retry_count": 4,
"max_polling_time_s": 300,
"retry_after_polling_failure": true,
"app": {
"url": "https://myq.east-west-trading.com/api/hook1?strict=true",
"settings": {},
"display_mode": "drawer"
},
"payload_logging_enabled": false,
"retry_on_any_non_2xx": false
}
}{
"detail": "Bad Request.",
"code": "bad_request"
}{
"detail": "Invalid token.",
"code": "authentication_failed"
}{
"detail": "Access to the requested resource is forbidden.",
"code": "access_forbidden"
}{
"detail": "Not found.",
"code": "not_found"
}{
"detail": "Conflict.",
"code": "conflict_status"
}{
"detail": "Request was rate limited.",
"code": "rate_limited",
"url": "https://rossum.app/api/docs/openapi/guides/overview/#rate-limiting"
}{
"detail": "Server error.",
"code": "error"
}{
"detail": "Bad Gateway.",
"code": "bad_gateway"
}{
"detail": "Service Unavailable.",
"code": "service_unavailable"
}{
"detail": "Gateway timeout.",
"code": "gateway_timeout"
}Response
OK
responseobjectInvalid input data.
Detail of the error
Code of the error
The username/password is invalid or token is invalid (e.g. expired).
Detail of the error
Code of the error
Insufficient permission, missing authentication, invalid CSRF token and similar issue.
Detail of the error
Code of the error
The specified resource was not found.
Detail of the error
Code of the error
Conflict
Detail of the error
Code of the error
Request rate is too high, wait before sending more requests. See Rate Limiting for more details.
Detail of the error
Code of the error
Link to the rate limiting documentation
Server failure while processing the request.
Detail of the error
Code of the error
Invalid response from the upstream server.
Detail of the error
Code of the error
We're temporarily offline for maintenance. Please try again later.
Detail of the error
Code of the error
Upstream server could not complete the request in time.
Detail of the error
Code of the error
Partial update hook
PATCH api / v1 / hooks / {hookID}
Update part of hook object.
curl -X PATCH "https://example.rossum.app/api/v1/hooks/1500" \ -H "Content-Type: application/json" \ -d '{}'{
"id": 1500,
"type": "webhook",
"name": "Change of Status",
"url": "https://example.rossum.app/api/v1/hooks/1500",
"queues": [
"https://example.rossum.app/api/v1/queues/8199",
"https://example.rossum.app/api/v1/queues/8191"
],
"run_after": [],
"active": true,
"events": [
"annotation_status.changed"
],
"sideload": [
"queues"
],
"metadata": {
"some_key": "some_value"
},
"token_owner": "https://example.rossum.app/api/v1/users/2",
"token_lifetime_s": 1000,
"test": {
"saved_input": {}
},
"description": "This hook does...",
"extension_source": "custom",
"settings": {},
"settings_schema": {
"type": "object",
"properties": {}
},
"secrets": {},
"secrets_schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"guide": "Here we explain how the extension should be used.",
"read_more_url": "https://github.com/rossumai/simple-vendor-matching-webhook-python",
"extension_image_url": "https://rossum.ai/wp-content/themes/rossum/static/img/logo.svg",
"hook_template": "https://example.rossum.app/api/v1/hook_templates/998877",
"created_by": "https://example.rossum.app/api/v1/users/2",
"created_at": "2020-01-01T09:05:50.213451Z",
"modified_by": "https://example.rossum.app/api/v1/users/10775",
"modified_at": "2021-04-26T10:08:03.856648Z",
"config": {
"url": "https://myq.east-west-trading.com/api/hook1?strict=true",
"secret": "secret-token",
"insecure_ssl": false,
"client_ssl_certificate": "-----BEGIN CERTIFICATE-----\n...",
"client_ssl_key": "-----BEGIN PRIVATE KEY-----\n...",
"private": false,
"schedule": {},
"timeout_s": 30,
"retry_count": 4,
"max_polling_time_s": 300,
"retry_after_polling_failure": true,
"app": {
"url": "https://myq.east-west-trading.com/api/hook1?strict=true",
"settings": {},
"display_mode": "drawer"
},
"payload_logging_enabled": false,
"retry_on_any_non_2xx": false
}
}{
"detail": "Bad Request.",
"code": "bad_request"
}{
"detail": "Invalid token.",
"code": "authentication_failed"
}{
"detail": "Access to the requested resource is forbidden.",
"code": "access_forbidden"
}{
"detail": "Not found.",
"code": "not_found"
}{
"detail": "Conflict.",
"code": "conflict_status"
}{
"detail": "Payload Too Large.",
"code": "payload_too_large"
}{
"detail": "Request was rate limited.",
"code": "rate_limited",
"url": "https://rossum.app/api/docs/openapi/guides/overview/#rate-limiting"
}{
"detail": "Server error.",
"code": "error"
}{
"detail": "Bad Gateway.",
"code": "bad_gateway"
}{
"detail": "Service Unavailable.",
"code": "service_unavailable"
}{
"detail": "Gateway timeout.",
"code": "gateway_timeout"
}Request Body
application/json
bodyobjectResponse
OK
responseobjectInvalid input data.
Detail of the error
Code of the error
The username/password is invalid or token is invalid (e.g. expired).
Detail of the error
Code of the error
Insufficient permission, missing authentication, invalid CSRF token and similar issue.
Detail of the error
Code of the error
The specified resource was not found.
Detail of the error
Code of the error
Conflict
Detail of the error
Code of the error
Payload too large (especially for files uploaded).
Detail of the error
Code of the error
Request rate is too high, wait before sending more requests. See Rate Limiting for more details.
Detail of the error
Code of the error
Link to the rate limiting documentation
Server failure while processing the request.
Detail of the error
Code of the error
Invalid response from the upstream server.
Detail of the error
Code of the error
We're temporarily offline for maintenance. Please try again later.
Detail of the error
Code of the error
Upstream server could not complete the request in time.
Detail of the error
Code of the error
Delete hook
DELETE api / v1 / hooks / {hookID}
Delete hook object.
curl -X DELETE "https://example.rossum.app/api/v1/hooks/1500"{
"detail": "Bad Request.",
"code": "bad_request"
}{
"detail": "Invalid token.",
"code": "authentication_failed"
}{
"detail": "Access to the requested resource is forbidden.",
"code": "access_forbidden"
}{
"detail": "Not found.",
"code": "not_found"
}{
"detail": "Conflict.",
"code": "conflict_status"
}{
"detail": "Request was rate limited.",
"code": "rate_limited",
"url": "https://rossum.app/api/docs/openapi/guides/overview/#rate-limiting"
}{
"detail": "Server error.",
"code": "error"
}{
"detail": "Bad Gateway.",
"code": "bad_gateway"
}{
"detail": "Service Unavailable.",
"code": "service_unavailable"
}{
"detail": "Gateway timeout.",
"code": "gateway_timeout"
}Response
No Content
No response body.
Invalid input data.
Detail of the error
Code of the error
The username/password is invalid or token is invalid (e.g. expired).
Detail of the error
Code of the error
Insufficient permission, missing authentication, invalid CSRF token and similar issue.
Detail of the error
Code of the error
The specified resource was not found.
Detail of the error
Code of the error
Conflict
Detail of the error
Code of the error
Request rate is too high, wait before sending more requests. See Rate Limiting for more details.
Detail of the error
Code of the error
Link to the rate limiting documentation
Server failure while processing the request.
Detail of the error
Code of the error
Invalid response from the upstream server.
Detail of the error
Code of the error
We're temporarily offline for maintenance. Please try again later.
Detail of the error
Code of the error
Upstream server could not complete the request in time.
Detail of the error
Code of the error
Update hook
PUT api / v1 / hooks / {hookID}
Update hook object.
curl -X PUT "https://example.rossum.app/api/v1/hooks/1500" \ -H "Content-Type: application/json" \ -d '{ "name": "Change of Status", "events": [ "annotation_status.changed" ] }'{
"id": 1500,
"type": "webhook",
"name": "Change of Status",
"url": "https://example.rossum.app/api/v1/hooks/1500",
"queues": [
"https://example.rossum.app/api/v1/queues/8199",
"https://example.rossum.app/api/v1/queues/8191"
],
"run_after": [],
"active": true,
"events": [
"annotation_status.changed"
],
"sideload": [
"queues"
],
"metadata": {
"some_key": "some_value"
},
"token_owner": "https://example.rossum.app/api/v1/users/2",
"token_lifetime_s": 1000,
"test": {
"saved_input": {}
},
"description": "This hook does...",
"extension_source": "custom",
"settings": {},
"settings_schema": {
"type": "object",
"properties": {}
},
"secrets": {},
"secrets_schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"guide": "Here we explain how the extension should be used.",
"read_more_url": "https://github.com/rossumai/simple-vendor-matching-webhook-python",
"extension_image_url": "https://rossum.ai/wp-content/themes/rossum/static/img/logo.svg",
"hook_template": "https://example.rossum.app/api/v1/hook_templates/998877",
"created_by": "https://example.rossum.app/api/v1/users/2",
"created_at": "2020-01-01T09:05:50.213451Z",
"modified_by": "https://example.rossum.app/api/v1/users/10775",
"modified_at": "2021-04-26T10:08:03.856648Z",
"config": {
"url": "https://myq.east-west-trading.com/api/hook1?strict=true",
"secret": "secret-token",
"insecure_ssl": false,
"client_ssl_certificate": "-----BEGIN CERTIFICATE-----\n...",
"client_ssl_key": "-----BEGIN PRIVATE KEY-----\n...",
"private": false,
"schedule": {},
"timeout_s": 30,
"retry_count": 4,
"max_polling_time_s": 300,
"retry_after_polling_failure": true,
"app": {
"url": "https://myq.east-west-trading.com/api/hook1?strict=true",
"settings": {},
"display_mode": "drawer"
},
"payload_logging_enabled": false,
"retry_on_any_non_2xx": false
}
}{
"detail": "Bad Request.",
"code": "bad_request"
}{
"detail": "Invalid token.",
"code": "authentication_failed"
}{
"detail": "Access to the requested resource is forbidden.",
"code": "access_forbidden"
}{
"detail": "Not found.",
"code": "not_found"
}{
"detail": "Conflict.",
"code": "conflict_status"
}{
"detail": "Payload Too Large.",
"code": "payload_too_large"
}{
"detail": "Request was rate limited.",
"code": "rate_limited",
"url": "https://rossum.app/api/docs/openapi/guides/overview/#rate-limiting"
}{
"detail": "Server error.",
"code": "error"
}{
"detail": "Bad Gateway.",
"code": "bad_gateway"
}{
"detail": "Service Unavailable.",
"code": "service_unavailable"
}{
"detail": "Gateway timeout.",
"code": "gateway_timeout"
}Request Body
application/json
bodyobjectResponse
OK
responseobjectInvalid input data.
Detail of the error
Code of the error
The username/password is invalid or token is invalid (e.g. expired).
Detail of the error
Code of the error
Insufficient permission, missing authentication, invalid CSRF token and similar issue.
Detail of the error
Code of the error
The specified resource was not found.
Detail of the error
Code of the error
Conflict
Detail of the error
Code of the error
Payload too large (especially for files uploaded).
Detail of the error
Code of the error
Request rate is too high, wait before sending more requests. See Rate Limiting for more details.
Detail of the error
Code of the error
Link to the rate limiting documentation
Server failure while processing the request.
Detail of the error
Code of the error
Invalid response from the upstream server.
Detail of the error
Code of the error
We're temporarily offline for maintenance. Please try again later.
Detail of the error
Code of the error
Upstream server could not complete the request in time.
Detail of the error
Code of the error
Create hook from template
POST api / v1 / hooks / create
Create a new hook object with the option to use a referenced hook template as a base.
curl -X POST "https://example.rossum.app/api/v1/hooks/create" \ -H "Content-Type: application/json" \ -d '{ "name": "Change of Status", "events": [ "annotation_status.changed" ] }'{
"id": 1500,
"type": "webhook",
"name": "Change of Status",
"url": "https://example.rossum.app/api/v1/hooks/1500",
"queues": [
"https://example.rossum.app/api/v1/queues/8199",
"https://example.rossum.app/api/v1/queues/8191"
],
"run_after": [],
"active": true,
"events": [
"annotation_status.changed"
],
"sideload": [
"queues"
],
"metadata": {
"some_key": "some_value"
},
"token_owner": "https://example.rossum.app/api/v1/users/2",
"token_lifetime_s": 1000,
"test": {
"saved_input": {}
},
"description": "This hook does...",
"extension_source": "custom",
"settings": {},
"settings_schema": {
"type": "object",
"properties": {}
},
"secrets": {},
"secrets_schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"guide": "Here we explain how the extension should be used.",
"read_more_url": "https://github.com/rossumai/simple-vendor-matching-webhook-python",
"extension_image_url": "https://rossum.ai/wp-content/themes/rossum/static/img/logo.svg",
"hook_template": "https://example.rossum.app/api/v1/hook_templates/998877",
"created_by": "https://example.rossum.app/api/v1/users/2",
"created_at": "2020-01-01T09:05:50.213451Z",
"modified_by": "https://example.rossum.app/api/v1/users/10775",
"modified_at": "2021-04-26T10:08:03.856648Z",
"config": {
"url": "https://myq.east-west-trading.com/api/hook1?strict=true",
"secret": "secret-token",
"insecure_ssl": false,
"client_ssl_certificate": "-----BEGIN CERTIFICATE-----\n...",
"client_ssl_key": "-----BEGIN PRIVATE KEY-----\n...",
"private": false,
"schedule": {},
"timeout_s": 30,
"retry_count": 4,
"max_polling_time_s": 300,
"retry_after_polling_failure": true,
"app": {
"url": "https://myq.east-west-trading.com/api/hook1?strict=true",
"settings": {},
"display_mode": "drawer"
},
"payload_logging_enabled": false,
"retry_on_any_non_2xx": false
}
}{
"detail": "Bad Request.",
"code": "bad_request"
}{
"detail": "Invalid token.",
"code": "authentication_failed"
}{
"detail": "Access to the requested resource is forbidden.",
"code": "access_forbidden"
}{
"detail": "Not found.",
"code": "not_found"
}{
"detail": "Conflict.",
"code": "conflict_status"
}{
"detail": "Payload Too Large.",
"code": "payload_too_large"
}{
"detail": "Request was rate limited.",
"code": "rate_limited",
"url": "https://rossum.app/api/docs/openapi/guides/overview/#rate-limiting"
}{
"detail": "Server error.",
"code": "error"
}{
"detail": "Bad Gateway.",
"code": "bad_gateway"
}{
"detail": "Service Unavailable.",
"code": "service_unavailable"
}{
"detail": "Gateway timeout.",
"code": "gateway_timeout"
}Request Body
application/json
bodyobjectResponse
Created
responseobjectInvalid input data.
Detail of the error
Code of the error
The username/password is invalid or token is invalid (e.g. expired).
Detail of the error
Code of the error
Insufficient permission, missing authentication, invalid CSRF token and similar issue.
Detail of the error
Code of the error
The specified resource was not found.
Detail of the error
Code of the error
Conflict
Detail of the error
Code of the error
Payload too large (especially for files uploaded).
Detail of the error
Code of the error
Request rate is too high, wait before sending more requests. See Rate Limiting for more details.
Detail of the error
Code of the error
Link to the rate limiting documentation
Server failure while processing the request.
Detail of the error
Code of the error
Invalid response from the upstream server.
Detail of the error
Code of the error
We're temporarily offline for maintenance. Please try again later.
Detail of the error
Code of the error
Upstream server could not complete the request in time.
Detail of the error
Code of the error
Duplicate hook
POST api / v1 / hooks / {hookID} / duplicate
Duplicate a hook object.
hook.queues is not copied by default, but can be copied using the copy_queues option. Duplicated hook is always inactive (hook.active = False).
curl -X POST "https://example.rossum.app/api/v1/hooks/1500/duplicate" \ -H "Content-Type: application/json" \ -d '{ "name": "string" }'{
"id": 1500,
"type": "webhook",
"name": "Change of Status",
"url": "https://example.rossum.app/api/v1/hooks/1500",
"queues": [
"https://example.rossum.app/api/v1/queues/8199",
"https://example.rossum.app/api/v1/queues/8191"
],
"run_after": [],
"active": true,
"events": [
"annotation_status.changed"
],
"sideload": [
"queues"
],
"metadata": {
"some_key": "some_value"
},
"token_owner": "https://example.rossum.app/api/v1/users/2",
"token_lifetime_s": 1000,
"test": {
"saved_input": {}
},
"description": "This hook does...",
"extension_source": "custom",
"settings": {},
"settings_schema": {
"type": "object",
"properties": {}
},
"secrets": {},
"secrets_schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"guide": "Here we explain how the extension should be used.",
"read_more_url": "https://github.com/rossumai/simple-vendor-matching-webhook-python",
"extension_image_url": "https://rossum.ai/wp-content/themes/rossum/static/img/logo.svg",
"hook_template": "https://example.rossum.app/api/v1/hook_templates/998877",
"created_by": "https://example.rossum.app/api/v1/users/2",
"created_at": "2020-01-01T09:05:50.213451Z",
"modified_by": "https://example.rossum.app/api/v1/users/10775",
"modified_at": "2021-04-26T10:08:03.856648Z",
"config": {
"url": "https://myq.east-west-trading.com/api/hook1?strict=true",
"secret": "secret-token",
"insecure_ssl": false,
"client_ssl_certificate": "-----BEGIN CERTIFICATE-----\n...",
"client_ssl_key": "-----BEGIN PRIVATE KEY-----\n...",
"private": false,
"schedule": {},
"timeout_s": 30,
"retry_count": 4,
"max_polling_time_s": 300,
"retry_after_polling_failure": true,
"app": {
"url": "https://myq.east-west-trading.com/api/hook1?strict=true",
"settings": {},
"display_mode": "drawer"
},
"payload_logging_enabled": false,
"retry_on_any_non_2xx": false
}
}{
"detail": "Bad Request.",
"code": "bad_request"
}{
"detail": "Invalid token.",
"code": "authentication_failed"
}{
"detail": "Access to the requested resource is forbidden.",
"code": "access_forbidden"
}{
"detail": "Not found.",
"code": "not_found"
}{
"detail": "Conflict.",
"code": "conflict_status"
}{
"detail": "Payload Too Large.",
"code": "payload_too_large"
}{
"detail": "Request was rate limited.",
"code": "rate_limited",
"url": "https://rossum.app/api/docs/openapi/guides/overview/#rate-limiting"
}{
"detail": "Server error.",
"code": "error"
}{
"detail": "Bad Gateway.",
"code": "bad_gateway"
}{
"detail": "Service Unavailable.",
"code": "service_unavailable"
}{
"detail": "Gateway timeout.",
"code": "gateway_timeout"
}Request Body
application/json
Name of the duplicated hook.
Whether to copy secrets.
Default:falseWhether to copy dependencies. If enabled, this option copies the dependency relations of the original hook.
It duplicates the run_after references to preserve which hooks the original hook depended on, and it also
updates all hooks that previously depended on the original hook to reference the new duplicated one. This
ensures that both dependency directions—"runs after" and "is run after by"—are correctly maintained.
falseWhether to copy queue assignments from the original hook to the duplicated hook.
Default:falseResponse
Created
responseobjectInvalid input data.
Detail of the error
Code of the error
The username/password is invalid or token is invalid (e.g. expired).
Detail of the error
Code of the error
Insufficient permission, missing authentication, invalid CSRF token and similar issue.
Detail of the error
Code of the error
The specified resource was not found.
Detail of the error
Code of the error
Conflict
Detail of the error
Code of the error
Payload too large (especially for files uploaded).
Detail of the error
Code of the error
Request rate is too high, wait before sending more requests. See Rate Limiting for more details.
Detail of the error
Code of the error
Link to the rate limiting documentation
Server failure while processing the request.
Detail of the error
Code of the error
Invalid response from the upstream server.
Detail of the error
Code of the error
We're temporarily offline for maintenance. Please try again later.
Detail of the error
Code of the error
Upstream server could not complete the request in time.
Detail of the error
Code of the error
Generate hook payload
POST api / v1 / hooks / {hookID} / generate_payload
Users can use this endpoint to test the hook on a payload of specific events and actions.
The token used for calling the endpoint is returned as rossum_authorization_token regardless of the token_owner of the hook.
Values in secrets are redacted for security reasons. The payload for email events from this endpoint may differ from the original hook payload in the file ids, height, width, and format of email addresses in headers.
curl -X POST "https://example.rossum.app/api/v1/hooks/1500/generate_payload" \ -H "Content-Type: application/json" \ -d '{ "action": "scheduled", "event": "invocation" }'{
"request_id": "ae7bc8dd-73bd-489b-a3d2-f5514b209591",
"timestamp": "2020-01-01T00:00:00.000000Z",
"base_url": "https://example.rossum.app",
"rossum_authorization_token": "1024873d424a007d8eebff7b3684d283abdf7d0d",
"hook": "https://example.rossum.app/api/v1/hooks/1500",
"settings": {
"example_target_service_type": "SFTP",
"example_target_hostname": "sftp.elis.rossum.ai"
},
"secrets": {
"username": "[redacted...]",
"password": "[redacted...]"
},
"action": "scheduled",
"event": "invocation"
}{
"detail": "Bad Request.",
"code": "bad_request"
}{
"detail": "Invalid token.",
"code": "authentication_failed"
}{
"detail": "Access to the requested resource is forbidden.",
"code": "access_forbidden"
}{
"detail": "Not found.",
"code": "not_found"
}{
"detail": "Conflict.",
"code": "conflict_status"
}{
"detail": "Payload Too Large.",
"code": "payload_too_large"
}{
"detail": "Request was rate limited.",
"code": "rate_limited",
"url": "https://rossum.app/api/docs/openapi/guides/overview/#rate-limiting"
}{
"detail": "Server error.",
"code": "error"
}{
"detail": "Bad Gateway.",
"code": "bad_gateway"
}{
"detail": "Service Unavailable.",
"code": "service_unavailable"
}{
"detail": "Gateway timeout.",
"code": "gateway_timeout"
}Request Body
application/json
URL of related Annotation object. Required for annotation_status and annotation_content events.
A previous status of the document. See Annotation Lifecycle for a list of supported values. Required for annotation_status and annotation_content events.
Status of the document. See Annotation Lifecycle for a list of supported values. Required for annotation_status and annotation_content events.
URL of the arriving email. Required for email event.
URL of an upload instance. Required for upload event.
Response
OK
Request ID.
Timestamp.
Base URL.
Authorization token.
Hook URL.
Hook settings.
Hook secrets (values redacted).
Action.
Event.
Invalid input data.
Detail of the error
Code of the error
The username/password is invalid or token is invalid (e.g. expired).
Detail of the error
Code of the error
Insufficient permission, missing authentication, invalid CSRF token and similar issue.
Detail of the error
Code of the error
The specified resource was not found.
Detail of the error
Code of the error
Conflict
Detail of the error
Code of the error
Payload too large (especially for files uploaded).
Detail of the error
Code of the error
Request rate is too high, wait before sending more requests. See Rate Limiting for more details.
Detail of the error
Code of the error
Link to the rate limiting documentation
Server failure while processing the request.
Detail of the error
Code of the error
Invalid response from the upstream server.
Detail of the error
Code of the error
We're temporarily offline for maintenance. Please try again later.
Detail of the error
Code of the error
Upstream server could not complete the request in time.
Detail of the error
Code of the error
Retrieve secret keys list
GET api / v1 / hooks / {hookID} / secrets_keys
Retrieve all secrets in a list (only keys are retrieved, values are encrypted in DB and aren't possible to obtain via API).
curl -X GET "https://example.rossum.app/api/v1/hooks/1500/secrets_keys"[
"secret_key1",
"secret_key2"
]{
"detail": "Bad Request.",
"code": "bad_request"
}{
"detail": "Invalid token.",
"code": "authentication_failed"
}{
"detail": "Access to the requested resource is forbidden.",
"code": "access_forbidden"
}{
"detail": "Not found.",
"code": "not_found"
}{
"detail": "Conflict.",
"code": "conflict_status"
}{
"detail": "Request was rate limited.",
"code": "rate_limited",
"url": "https://rossum.app/api/docs/openapi/guides/overview/#rate-limiting"
}{
"detail": "Server error.",
"code": "error"
}{
"detail": "Bad Gateway.",
"code": "bad_gateway"
}{
"detail": "Service Unavailable.",
"code": "service_unavailable"
}{
"detail": "Gateway timeout.",
"code": "gateway_timeout"
}Response
OK
responselist[string]List of hook secrets keys.
Invalid input data.
Detail of the error
Code of the error
The username/password is invalid or token is invalid (e.g. expired).
Detail of the error
Code of the error
Insufficient permission, missing authentication, invalid CSRF token and similar issue.
Detail of the error
Code of the error
The specified resource was not found.
Detail of the error
Code of the error
Conflict
Detail of the error
Code of the error
Request rate is too high, wait before sending more requests. See Rate Limiting for more details.
Detail of the error
Code of the error
Link to the rate limiting documentation
Server failure while processing the request.
Detail of the error
Code of the error
Invalid response from the upstream server.
Detail of the error
Code of the error
We're temporarily offline for maintenance. Please try again later.
Detail of the error
Code of the error
Upstream server could not complete the request in time.
Detail of the error
Code of the error
Test hook
POST api / v1 / hooks / {hookID} / test
Test a hook with custom payload. Test endpoint will return result generated by the specified Hook which would be normally processed by Rossum.
curl -X POST "https://example.rossum.app/api/v1/hooks/1500/test" \ -H "Content-Type: application/json" \ -d '{ "payload": { "action": "started", "event": "annotation_content", "annotation": {}, "document": {}, "settings": {} } }'{
"response": {
"messages": [],
"operations": []
}
}{
"detail": "Bad Request.",
"code": "bad_request"
}{
"detail": "Invalid token.",
"code": "authentication_failed"
}{
"detail": "Access to the requested resource is forbidden.",
"code": "access_forbidden"
}{
"detail": "Not found.",
"code": "not_found"
}{
"detail": "Test function is not ready yet"
}{
"detail": "Payload Too Large.",
"code": "payload_too_large"
}{
"detail": "Request was rate limited.",
"code": "rate_limited",
"url": "https://rossum.app/api/docs/openapi/guides/overview/#rate-limiting"
}{
"detail": "Server error.",
"code": "error"
}{
"detail": "Bad Gateway.",
"code": "bad_gateway"
}{
"detail": "Service Unavailable.",
"code": "service_unavailable"
}{
"detail": "Gateway timeout.",
"code": "gateway_timeout"
}Request Body
application/json
You can override default configuration of hook being executed. The runtime attribute is required for function hook if custom config is set.
Payload sent to the Hook, please note only supported combination of action and event can be passed.
Response
OK
Response from the hook.
Invalid input data.
Detail of the error
Code of the error
The username/password is invalid or token is invalid (e.g. expired).
Detail of the error
Code of the error
Insufficient permission, missing authentication, invalid CSRF token and similar issue.
Detail of the error
Code of the error
The specified resource was not found.
Detail of the error
Code of the error
Conflict - Test function is not ready yet, request should be retried after 10 seconds.
Payload too large (especially for files uploaded).
Detail of the error
Code of the error
Request rate is too high, wait before sending more requests. See Rate Limiting for more details.
Detail of the error
Code of the error
Link to the rate limiting documentation
Server failure while processing the request.
Detail of the error
Code of the error
Invalid response from the upstream server.
Detail of the error
Code of the error
We're temporarily offline for maintenance. Please try again later.
Detail of the error
Code of the error
Upstream server could not complete the request in time.
Detail of the error
Code of the error
Trigger manual hook
POST api / v1 / hooks / {hookID} / invoke
Invoke the hook with custom payload. The payload will be added to the standard invocation event hook request and sent to the hook. The hook response is returned in the invocation response payload.
Values for standard json hook response attributes (request_id, action, ...) will NOT be overwritten.
Attribute timeout_s in hook config for this endpoint POST /v1/hooks/{id}/invoke will be overwritten by default value of 30.
curl -X POST "https://example.rossum.app/api/v1/hooks/1500/invoke" \ -H "Content-Type: application/json" \ -d '{ "SAP_ID": "1234", "DB_COLUMN": "SAP" }'{}{
"detail": "Hook must have proper event and action configuration"
}{
"detail": "Invalid token.",
"code": "authentication_failed"
}{
"detail": "Access to the requested resource is forbidden.",
"code": "access_forbidden"
}{
"detail": "Not found.",
"code": "not_found"
}{
"detail": "Conflict.",
"code": "conflict_status"
}{
"detail": "Payload Too Large.",
"code": "payload_too_large"
}{
"detail": "Request was rate limited.",
"code": "rate_limited",
"url": "https://rossum.app/api/docs/openapi/guides/overview/#rate-limiting"
}{
"detail": "Server error.",
"code": "error"
}{
"detail": "Bad Gateway.",
"code": "bad_gateway"
}{
"detail": "Service Unavailable.",
"code": "service_unavailable"
}{
"detail": "Gateway timeout.",
"code": "gateway_timeout"
}Request Body
application/json
bodyobjectrequiredObject with properties to be merged into the invocation payload.
Response
OK
responseobjectHook response merged with invocation response payload.
Bad Request - Not having proper event and action in hook object or non-json response.
The username/password is invalid or token is invalid (e.g. expired).
Detail of the error
Code of the error
Insufficient permission, missing authentication, invalid CSRF token and similar issue.
Detail of the error
Code of the error
The specified resource was not found.
Detail of the error
Code of the error
Conflict
Detail of the error
Code of the error
Payload too large (especially for files uploaded).
Detail of the error
Code of the error
Request rate is too high, wait before sending more requests. See Rate Limiting for more details.
Detail of the error
Code of the error
Link to the rate limiting documentation
Server failure while processing the request.
Detail of the error
Code of the error
Invalid response from the upstream server.
Detail of the error
Code of the error
We're temporarily offline for maintenance. Please try again later.
Detail of the error
Code of the error
Upstream server could not complete the request in time.
Detail of the error
Code of the error