# Get webhook delivery activity. Returns delivery activity for a specific webhook. Only activities in the last 30 days will be included. This endpoint requires the `personio:webhooks:read` scope. # OpenAPI definition ```json { "openapi": "3.0.3", "info": { "title": "Webhooks Management API", "version": "2.0.0", "description": "Endpoints to manage webhooks." }, "servers": [ { "url": "https://api.personio.de" } ], "security": [ { "BearerAuth": [] } ], "paths": { "/v2/webhooks/{id}/activity": { "get": { "summary": "Get webhook delivery activity.", "description": "Returns delivery activity for a specific webhook. Only activities in the last 30 days will be included. This endpoint requires the `personio:webhooks:read` scope.", "tags": [ "Webhooks" ], "parameters": [ { "name": "id", "in": "path", "required": true, "description": "The unique identifier of the webhook whose delivery activity is to be retrieved.", "schema": { "type": "string" }, "example": "533e7206-f4a3-11ed-9c8b-436fad0b82d1" }, { "name": "completed_at.gte", "in": "query", "description": "The start date for filtering activities by completion date. Only activities completed on or after this date will be included.", "schema": { "type": "string", "format": "date-time" }, "example": "2023-01-01T12:00:00.000Z" }, { "name": "completed_at.lte", "in": "query", "description": "The end date for filtering activities by completion date. Only activities completed on or before this date will be included.", "schema": { "type": "string", "format": "date-time" }, "example": "2023-01-01T13:00:00.000Z" }, { "name": "event_name", "in": "query", "description": "Enables filtering by event name. Refer to the [event catalog](https://developer.personio.de/v2.0/reference/webhooks#event-catalog) for a list of valid event names.", "schema": { "type": "string" }, "example": "person.updated" }, { "name": "is_delivered", "in": "query", "description": "Enables filtering by delivery status. Set to true for delivered events (received 2xx HTTP status code) and false for undelivered events (non-2xx status codes or delivery failures).", "schema": { "type": "boolean" }, "example": false }, { "name": "redelivery_id", "in": "query", "description": "Filters activities by the redelivery ID. Only activities with the specified redelivery ID will be included.", "schema": { "type": "string" }, "example": "2da86fee-6e01-488b-9071-e6ad49a33c80" }, { "$ref": "#/paths/~1v2~1webhooks/get/parameters/2" }, { "$ref": "#/paths/~1v2~1webhooks/get/parameters/3" } ], "x-path-examples": { "List all activities": { "value": "/v2/webhooks/533e7206-f4a3-11ed-9c8b-436fad0b82d1/activity", "query": "limit=2" }, "Invalid is_delivered filter": { "value": "/v2/webhooks/533e7206-f4a3-11ed-9c8b-436fad0b82d1/activity", "query": "is_delivered=YES" }, "Filter activity by date": { "value": "/v2/webhooks/533e7206-f4a3-11ed-9c8b-436fad0b82d1/activity", "query": "completed_at.gte=2023-01-01T00:00:00.000Z&completed_at.lte=2023-01-01T23:59:59.999Z&limit=2" }, "Filter activity by redelivery_id": { "value": "/v2/webhooks/533e7206-f4a3-11ed-9c8b-436fad0b82d1/activity", "query": "redelivery_id=2da86fee-6e01-488b-9071-e6ad49a33c80&limit=1" }, "Resource Not Found": { "value": "/v2/webhooks/533e7206-f4a3-11ed-9c8b-436fad0b82d1/activity" } }, "responses": { "200": { "$ref": "#/components/responses/WebhookActivityResponse" }, "401": { "$ref": "#/components/responses/WebhookInvalidAuthenticationErrorResponse" }, "403": { "$ref": "#/components/responses/WebhookAccessForbiddenErrorResponse" }, "404": { "$ref": "#/components/responses/WebhookNotFoundErrorResponse" }, "422": { "$ref": "#/components/responses/WebhookActivityBadFilterErrorResponse" } } } } }, "components": { "securitySchemes": { "BearerAuth": { "type": "http", "scheme": "bearer" } }, "schemas": { "WebhookActivity": { "description": "Webhook activity schema.", "type": "object", "required": [ "completed_at", "event_name", "is_delivered" ], "properties": { "completed_at": { "type": "string", "format": "date-time", "description": "The timestamp of when the delivery attempt was completed in UTC." }, "event_name": { "type": "string", "description": "The name of the event. Refer to the [event catalog](https://developer.personio.de/v2.0/reference/webhooks#event-catalog) for a list of valid event names." }, "is_delivered": { "type": "boolean", "description": "Indicates whether the delivery was successful." }, "attempts": { "type": "integer", "description": "The number of attempts made to deliver the webhook." }, "status_code": { "type": "integer", "nullable": true, "description": "The status code of the last delivery attempt, if available." }, "redelivery_id": { "type": "string", "nullable": true, "description": "The ID of the redelivery operation that generated the new delivery activity.\nThis value is returned as part of the response from the `/redelivery` endpoint\nwhen a redelivery request is accepted. It is used to track the redelivery process\nand link the new delivery activity to a previous redelivery operation.\n" } } } }, "responses": { "WebhooksResponse": { "description": "Successful list all webhooks response.", "content": { "application/json": { "schema": { "type": "object", "properties": { "_data": { "type": "array", "items": { "$ref": "#/components/schemas/Webhook" } }, "_meta": { "description": "This object represents the metadata information for an object. It's a set of arbitrary key/value attributes such as `links`.", "type": "object", "readOnly": true, "properties": { "links": { "type": "object", "additionalProperties": { "description": "This objects represents a hyperlink.", "type": "object", "readOnly": true, "properties": { "href": { "type": "string", "format": "uri" } }, "additionalProperties": true }, "example": { "links": { "self": { "href": "https://api.personio.de/v2/person?cursor=" } } } } } } } }, "examples": { "List all webhooks": { "$ref": "#/components/examples/ListAllWebhooksResponse" }, "List all webhooks where enabled_events contains person.updated": { "$ref": "#/components/examples/ListAllWebhooksEnabledEventFilterResponse" }, "List all webhooks where status is enabled": { "$ref": "#/components/examples/ListAllWebhooksStatusFilterResponse" } } } } }, "WebhookActivityResponse": { "description": "Successful list of all webhooks activities response.", "content": { "application/json": { "schema": { "type": "object", "properties": { "_data": { "type": "array", "items": { "$ref": "#/components/schemas/WebhookActivity" } }, "_meta": { "$ref": "#/components/responses/WebhooksResponse/content/application~1json/schema/properties/_meta" } } }, "examples": { "List all activities": { "$ref": "#/components/examples/ListAllActivities" }, "Filter activity by date": { "$ref": "#/components/examples/ListAllActivities" }, "Filter activity by redelivery_id": { "$ref": "#/components/examples/ListAllActivitiesWithRedelivery" } } } } }, "WebhookNotFoundErrorResponse": { "description": "The webhook could not be found.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/responses/WebhookTestEventBadRequest/content/application~1problem%2Bjson/schema" }, "examples": { "Resource Not Found": { "$ref": "#/components/examples/WebhookNotFoundErrorResponse" } } } } }, "WebhookActivityBadFilterErrorResponse": { "description": "The filters specified with the request are faulty.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/responses/WebhookTestEventBadRequest/content/application~1problem%2Bjson/schema" }, "examples": { "Invalid is_delivered filter": { "$ref": "#/components/examples/InvalidIsDeliveredFilterResponse" } } } } }, "WebhookAccessForbiddenErrorResponse": { "description": "Access to the webhook is forbidden.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/responses/WebhookTestEventBadRequest/content/application~1problem%2Bjson/schema" }, "examples": { "Access Forbidden": { "$ref": "#/components/examples/WebhookAccessForbiddenErrorResponse" } } } } }, "WebhookInvalidAuthenticationErrorResponse": { "description": "The webhook could not be created due to invalid authentication.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/responses/WebhookTestEventBadRequest/content/application~1problem%2Bjson/schema" }, "examples": { "Invalid authentication type": { "$ref": "#/components/examples/InvalidAuthenticationPayloadResponse" } } } } }, "WebhookTestEventBadRequest": { "description": "Bad request - invalid event name, event not enabled, or missing required payload data.", "content": { "application/problem+json": { "schema": { "type": "object", "description": "This object represents an error response.", "properties": { "personio_trace_id": { "type": "string", "example": "aswo3f-a202lfso-312123sld-1230ddd", "description": "A unique ID that was created for this error." }, "timestamp": { "type": "string", "format": "date-time", "example": "2021-05-28T11:17:30.000Z", "description": "The timestamp of when the error occurred." }, "errors": { "type": "array", "items": { "type": "object", "properties": { "title": { "type": "string", "example": "Not found", "description": "The title of the error." }, "detail": { "type": "string", "example": "The requested resource was not found.", "description": "A short description about the error." }, "type": { "type": "string", "format": "uri", "example": "https://developer.personio.de/reference/errors#common.requested_resource_not_found", "description": "A link to the developer hub where more information can be found for the encountered error." }, "_meta": { "type": "object", "additionalProperties": { "type": "string" } } } } } } }, "examples": { "400 missing required payload data": { "$ref": "#/components/examples/TestEventMissingPayloadDataResponse" } } } } } }, "examples": { "ListAllActivities": { "value": { "_data": [ { "completed_at": "2023-01-01T12:51:00.000Z", "event_name": "person.updated", "is_delivered": true, "attempts": 1, "status_code": 201, "redelivery_id": "2da86fee-6e01-488b-9071-e6ad49a33c80" }, { "completed_at": "2023-01-01T12:03:00.000Z", "event_name": "person.updated", "is_delivered": false, "attempts": 2, "status_code": 503, "redelivery_id": null } ], "_meta": { "links": { "next": { "href": "https://api.personio.de/v2/webhooks/533e7206-f4a3-11ed-9c8b-436fad0b82d1/activity?cursor=cur_AKbEjPZsArTP07gbhAaIUILluT52MvY7aab1jJTR3PgwQZ1BzQjplnq8" } } } } }, "ListAllActivitiesWithRedelivery": { "value": { "_data": [ { "completed_at": "2023-01-01T12:51:00.000Z", "event_name": "person.updated", "is_delivered": true, "attempts": 1, "status_code": 201, "redelivery_id": "2da86fee-6e01-488b-9071-e6ad49a33c80" } ], "_meta": { "links": { "next": { "href": "https://api.personio.de/v2/webhooks/533e7206-f4a3-11ed-9c8b-436fad0b82d1/activity?cursor=cur_AKbEjPZsArTP07gbhAaIUILluT52MvY7aab1jJTR3PgwQZ1BzQjplnq8" } } } } }, "WebhookAccessForbiddenErrorResponse": { "value": { "personio_trace_id": "aswo3f-a202lfso-312123sld-1230ddd", "timestamp": "2021-05-28T11:17:30Z", "errors": [ { "title": "Access denied", "detail": "Access denied to perform webhook operations" } ] } }, "WebhookNotFoundErrorResponse": { "value": { "personio_trace_id": "aswo3f-a202lfso-312123sld-1230ddd", "timestamp": "2021-05-28T11:17:30Z", "errors": [ { "title": "Webhook not found", "detail": "No webhook found matching the given id" } ] } }, "InvalidIsDeliveredFilterResponse": { "value": { "personio_trace_id": "aswo3f-a202lfso-312123sld-1230ddd", "timestamp": "2021-05-28T11:17:30Z", "errors": [ { "title": "Invalid value for filter: is_delivered", "detail": "Invalid value for filter: is_delivered. Supported values are [true, false]." } ] } }, "InvalidAuthenticationPayloadResponse": { "value": { "personio_trace_id": "aswo3f-a202lfso-312123sld-1230ddd", "timestamp": "2021-05-28T11:17:30Z", "errors": [ { "title": "Invalid authentication", "detail": "The authentication type is unsupported." } ] } } } } } ```