# Send a ping event. Use this endpoint to trigger a test event of type `ping` for a specific webhook. This allows to verify that the webhook is configured correctly and can receive events. Requires the `personio:webhooks:write` 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}/ping": { "post": { "summary": "Send a ping event.", "description": "Use this endpoint to trigger a test event of type `ping` for a specific webhook.\nThis allows to verify that the webhook is configured correctly and can receive events.\nRequires the `personio:webhooks:write` scope.\n", "tags": [ "Webhooks" ], "parameters": [ { "name": "id", "in": "path", "required": true, "description": "The unique identifier of the webhook to send the test event to.", "schema": { "type": "string" } } ], "x-path-examples": { "200 send a ping event": { "value": "/v2/webhooks/533e7206-f4a3-11ed-9c8b-436fad0b82d1/ping" } }, "responses": { "200": { "$ref": "#/components/responses/WebhookPingResponse" }, "403": { "$ref": "#/components/responses/WebhookAccessForbiddenErrorResponse" }, "404": { "$ref": "#/components/responses/WebhookNotFoundErrorResponse" } } } } }, "components": { "securitySchemes": { "BearerAuth": { "type": "http", "scheme": "bearer" } }, "responses": { "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" } } } } }, "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" } } } } }, "WebhookPingResponse": { "description": "Test event triggered successfully.", "content": { "application/json": { "schema": { "type": "object", "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, which will be `ping` for this endpoint." }, "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." } } }, "examples": { "200 send a ping event": { "$ref": "#/components/examples/SuccessfulPingResponse" } } } } }, "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": { "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" } ] } }, "SuccessfulPingResponse": { "value": { "completed_at": "2023-01-01T12:51:00.000Z", "event_name": "ping", "is_delivered": true, "attempts": 1, "status_code": 200 } } } } } ```