> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.withpersona.com/2020-05-18/api-reference/webhook-events/search-webhook-events/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.withpersona.com/_mcp/server. # Search Webhook Events POST https://api.withpersona.com/api/v1/webhook-events/search Content-Type: application/json Search for webhook events using a flexible query language. Webhook events are the individual delivery records for your webhooks — one per event, per webhook. Use this endpoint to find events (for example, all `failed` deliveries for a given webhook in a time window) before re-running them. ## Data Freshness Do not use search for read-after-write flows because the data will not be immediately available to search. Under normal operating conditions, data is searchable within approximately 1 minute of creation or modification. Propagation could be delayed during an outage. ## Retention Webhook events are retained for a limited window. Searches are automatically bounded to that window, so events older than the retention period are not returned even if requested. ### Searchable Attributes The following attributes can be used in query predicates: | Attribute | Description | |-----------|-------------| | `updated_at` | Timestamp the event was last updated (i.e. last delivery attempt). Supports `eq`, `gt`, `gte`, `lt`, `lte`. | | `status` | Delivery status: `pending`, `completed`, `failed`, or `skipped`. | | `webhook_id` | Webhook token (e.g. `wbh_ABC123`). | | `event_id` | Event token the webhook event was created from (e.g. `evt_ABC123`). | | `event_name` | Event name (e.g. `inquiry.completed`). | | `webhook_event_id` | Webhook event token (e.g. `wbhe_ABC123`). | | `related_object_ids` | A related object token contained in the event payload. | All attributes other than `updated_at` support only the `eq` operator. Reference: https://docs.withpersona.com/api-reference/webhook-events/search-webhook-events ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. ## Request ### Query parameters - `fields` (map from string to string, optional) — Comma-separated list(s) of attributes to include in the response. This can be used to customize which attributes will be serialized in the response. See [Serialization](https://docs.withpersona.com/serialization#sparse-fieldsets) for more details. - `page` (WebhookEventsSearchPostParametersPage, optional) ### Headers - `Key-Inflection` (enum, optional) — Determines casing for the API response. - Allowed values: `camel`, `kebab`, `snake` - `Idempotency-Key` (string, optional) — Ensures the request is idempotent. - `Persona-Version` (enum, optional) — Server API version. More info on versioning can be found [here](https://docs.withpersona.com/versioning). - Allowed values: `2025-12-08`, `2025-10-27`, `2023-01-05`, `2022-09-01`, `2021-08-18`, `2021-07-05`, `2021-02-21`, `2020-05-18` ### Body (application/json) This endpoint expects a Webhook Events_search-webhook-events_Request. - `query` (WebhookEventsSearchPostRequestBodyContentApplicationJsonSchemaQuery, optional) — Search query using boolean logic (AND/OR/NOT) and comparison operators. Supports predicates with operators: eq (equal), gt (greater than), gte (greater than or equal), lt (less than), lte (less than or equal). Only `updated_at` supports the range operators; all other attributes support only `eq`. - `sort` (WebhookEventsSearchPostRequestBodyContentApplicationJsonSchemaSort, optional) — Sort configuration for results - `page` (WebhookEventsSearchPostRequestBodyContentApplicationJsonSchemaPage, optional) — Pagination parameters ## Response ### 200 This endpoint returns a collection of Webhook Event objects matching the search criteria. - `data` (list of webhook-event, required) — An array of Webhook Events matching the search criteria - `links` (WebhookEventsSearchPostResponsesContentApplicationJsonSchemaLinks, required) ## Errors ### 400 Bad Request Error The request was unacceptable, often due to invalid parameters. - `errors` (list of WebhookEventsSearchPostResponsesContentApplicationJsonSchemaErrorsItems, optional) ### 401 Unauthorized Error An invalid API key was provided. - `errors` (list of WebhookEventsSearchPostResponsesContentApplicationJsonSchemaErrorsItems, optional) ### 403 Forbidden Error The given API key doesn’t have permissions to perform the request or a quota has been exceeded. - `errors` (list of WebhookEventsSearchPostResponsesContentApplicationJsonSchemaErrorsItems, optional) ### 409 Conflict Error The request conflicts with another request, often due to attempting to create a duplicate resource. - `errors` (list of WebhookEventsSearchPostResponsesContentApplicationJsonSchemaErrorsItems, optional) ### 422 Unprocessable Entity Error The request modifies the resource in an unacceptable way, often due to an invalid action or parameter. - `errors` (list of WebhookEventsSearchPostResponsesContentApplicationJsonSchemaErrorsItems, optional) ### 429 Too Many Requests Error Your organization’s rate limit has been exceeded. We recommend an exponential backoff on requests. - `errors` (list of WebhookEventsSearchPostResponsesContentApplicationJsonSchemaErrorsItems, optional) ## Types ### WebhookEventsSearchPostRequestBodyContentApplicationJsonSchemaQuery Search query using boolean logic (AND/OR/NOT) and comparison operators. Supports predicates with operators: eq (equal), gt (greater than), gte (greater than or equal), lt (less than), lte (less than or equal). Only `updated_at` supports the range operators; all other attributes support only `eq`. ### WebhookEventsSearchPostRequestBodyContentApplicationJsonSchemaSort Sort configuration for results - `attribute` (string, required) — The attribute name to sort by. Only `updated_at` is supported. - `direction` (string, required, default: desc) — Sort direction. Possible values: asc (ascending), desc (descending). ### WebhookEventsSearchPostRequestBodyContentApplicationJsonSchemaPage Pagination parameters - `after` (string, optional) — Cursor for forward pagination. Opaque; use the value from `links.next`. - `before` (string, optional) — Cursor for backward pagination. Opaque; use the value from `links.prev`. Cannot be combined with `after`. - `size` (integer, optional, default: 10) — Number of results to return per page ### WebhookEventsSearchPostParametersPage - `after` (string, optional) — Cursor for forward pagination. Use the value from `links.next` in the previous response. Cursors are opaque and must not be constructed by clients. - `before` (string, optional) — Cursor for backward pagination. Use the value from `links.prev` in the previous response. Cursors are opaque and must not be constructed by clients. Cannot be combined with `after`. - `size` (integer, optional, default: 10) — Number of results to return per page. ### webhook-event A Webhook Event object — a single delivery record for one event to one webhook. - `type` ("webhook-event", optional) - `id` (string, optional) - `attributes` (WebhookEventAttributes, optional) ### WebhookEventsSearchPostResponsesContentApplicationJsonSchemaLinks - `prev` (string, required, nullable) — URL pointing to the previous page of data, or null if on the first page. Must be used with a POST request and the original request body. - `next` (string, required, nullable) — URL pointing to the next page of data, or null if on the last page. Must be used with a POST request and the original request body. ### WebhookEventsSearchPostResponsesContentApplicationJsonSchemaErrorsItems - `title` (string, optional) - `details` (string, optional) ### WebhookEventsSearchPostRequestBodyContentApplicationJsonSchemaQuery0 Boolean AND clause - combines multiple conditions where ALL must be true. This clause is recursive: each item in the `and` array can be another AND, OR, NOT clause, or a leaf predicate, enabling complex nested queries. Maximum nesting depth: 2 levels, Maximum clauses per AND: 20 - `and` (list of map from string to any, required) ### WebhookEventsSearchPostRequestBodyContentApplicationJsonSchemaQuery1 Boolean OR clause - combines multiple conditions where AT LEAST ONE must be true. This clause is recursive: each item in the `or` array can be another AND, OR, NOT clause, or a leaf predicate, enabling complex nested queries. Maximum nesting depth: 2 levels, Maximum clauses per OR: 20 - `or` (list of map from string to any, required) ### WebhookEventsSearchPostRequestBodyContentApplicationJsonSchemaQuery2 Boolean NOT clause - negates a single condition. This clause is recursive: the `not` value can be another AND, OR, NOT clause, or a leaf predicate, enabling complex nested queries. Maximum nesting depth: 2 levels - `not` (map from string to any, required) ### WebhookEventsSearchPostRequestBodyContentApplicationJsonSchemaQuery3 Attribute predicate - `attribute` (string, required) — The attribute name to filter on (e.g., 'updated_at', 'status', 'webhook_id', 'event_name') - `operator` (string, required) — Comparison operator. Possible values: eq (equal), gt (greater than), gte (greater than or equal), lt (less than), lte (less than or equal). - `value` (WebhookEventsSearchPostRequestBodyContentApplicationJsonSchemaQueryOneOf3Value, required) — Value to compare against ### WebhookEventAttributes - `status` (string, optional) — Delivery status of the webhook event. Possible values: pending, completed, failed, skipped. - `event-name` (string, optional) — The name of the event that triggered this webhook delivery. - `webhook-id` (string, optional) — The token of the Webhook this event was delivered to. - `event-id` (string, optional, nullable) — The token of the Event this webhook event was created from, or null if unavailable. - `result-code` (integer, optional, nullable) — HTTP status code returned by the destination endpoint on the most recent delivery attempt, or null if no attempt has been made yet. - `attempts-made` (integer, optional) — Number of delivery attempts made so far. - `last-attempted-at` (datetime, optional, nullable) — Timestamp of the most recent delivery attempt, or null if no attempt has been made yet. - `created-at` (datetime, optional) - `updated-at` (datetime, optional) ### WebhookEventsSearchPostRequestBodyContentApplicationJsonSchemaQueryOneOf3Value Value to compare against ## Examples ### Success **Response** ```json { "data": [ { "type": "webhook-event", "id": "wbhe_9f2a3cD4e5F6g7H8i9J0kLmN", "attributes": { "status": "failed", "event-name": "inquiry.completed", "webhook-id": "wbh_1a2b3c", "event-id": "evt_44c1d2", "result-code": 503, "attempts-made": 8, "last-attempted-at": "2026-04-24T09:15:44.000Z", "created-at": "2026-04-23T14:02:11.000Z", "updated-at": "2026-04-24T09:15:44.000Z" } } ], "links": { "prev": null, "next": "/api/v1/webhook-events/search?page%5Bafter%5D=eyJ2IjoxfQ%3D%3D&page%5Bsize%5D=10" } } ``` **SDK Code** ```python Success import requests url = "https://api.withpersona.com/api/v1/webhook-events/search" headers = {"Authorization": "Bearer "} response = requests.post(url, headers=headers) print(response.json()) ``` ```javascript Success const url = 'https://api.withpersona.com/api/v1/webhook-events/search'; const options = {method: 'POST', headers: {Authorization: 'Bearer '}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Success package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.withpersona.com/api/v1/webhook-events/search" req, _ := http.NewRequest("POST", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Success require 'uri' require 'net/http' url = URI("https://api.withpersona.com/api/v1/webhook-events/search") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body ``` ```java Success import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.withpersona.com/api/v1/webhook-events/search") .header("Authorization", "Bearer ") .asString(); ``` ```php Success request('POST', 'https://api.withpersona.com/api/v1/webhook-events/search', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` ```csharp Success using RestSharp; var client = new RestClient("https://api.withpersona.com/api/v1/webhook-events/search"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); IRestResponse response = client.Execute(request); ``` ```swift Success import Foundation let headers = ["Authorization": "Bearer "] let request = NSMutableURLRequest(url: NSURL(string: "https://api.withpersona.com/api/v1/webhook-events/search")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` ### Simple query **Request** ```json { "query": { "attribute": "status", "operator": "eq", "value": "failed" }, "sort": { "attribute": "updated_at", "direction": "desc" }, "page": { "size": 15 } } ``` **Response** ```json { "data": [ { "type": "webhook-event", "id": "wbhe_9f2a3cD4e5F6g7H8i9J0kLmN", "attributes": { "status": "failed", "event-name": "inquiry.completed", "webhook-id": "wbh_1a2b3c", "event-id": "evt_44c1d2", "result-code": 503, "attempts-made": 8, "last-attempted-at": "2026-04-24T09:15:44.000Z", "created-at": "2026-04-23T14:02:11.000Z", "updated-at": "2026-04-24T09:15:44.000Z" } } ], "links": { "prev": null, "next": "/api/v1/webhook-events/search?page%5Bafter%5D=eyJ2IjoxfQ%3D%3D&page%5Bsize%5D=10" } } ``` **SDK Code** ```python Simple query import requests url = "https://api.withpersona.com/api/v1/webhook-events/search" payload = { "query": { "attribute": "status", "operator": "eq", "value": "failed" }, "sort": { "attribute": "updated_at", "direction": "desc" }, "page": { "size": 15 } } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Simple query const url = 'https://api.withpersona.com/api/v1/webhook-events/search'; const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: '{"query":{"attribute":"status","operator":"eq","value":"failed"},"sort":{"attribute":"updated_at","direction":"desc"},"page":{"size":15}}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Simple query package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.withpersona.com/api/v1/webhook-events/search" payload := strings.NewReader("{\n \"query\": {\n \"attribute\": \"status\",\n \"operator\": \"eq\",\n \"value\": \"failed\"\n },\n \"sort\": {\n \"attribute\": \"updated_at\",\n \"direction\": \"desc\"\n },\n \"page\": {\n \"size\": 15\n }\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Simple query require 'uri' require 'net/http' url = URI("https://api.withpersona.com/api/v1/webhook-events/search") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"query\": {\n \"attribute\": \"status\",\n \"operator\": \"eq\",\n \"value\": \"failed\"\n },\n \"sort\": {\n \"attribute\": \"updated_at\",\n \"direction\": \"desc\"\n },\n \"page\": {\n \"size\": 15\n }\n}" response = http.request(request) puts response.read_body ``` ```java Simple query import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.withpersona.com/api/v1/webhook-events/search") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"query\": {\n \"attribute\": \"status\",\n \"operator\": \"eq\",\n \"value\": \"failed\"\n },\n \"sort\": {\n \"attribute\": \"updated_at\",\n \"direction\": \"desc\"\n },\n \"page\": {\n \"size\": 15\n }\n}") .asString(); ``` ```php Simple query request('POST', 'https://api.withpersona.com/api/v1/webhook-events/search', [ 'body' => '{ "query": { "attribute": "status", "operator": "eq", "value": "failed" }, "sort": { "attribute": "updated_at", "direction": "desc" }, "page": { "size": 15 } }', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp Simple query using RestSharp; var client = new RestClient("https://api.withpersona.com/api/v1/webhook-events/search"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"query\": {\n \"attribute\": \"status\",\n \"operator\": \"eq\",\n \"value\": \"failed\"\n },\n \"sort\": {\n \"attribute\": \"updated_at\",\n \"direction\": \"desc\"\n },\n \"page\": {\n \"size\": 15\n }\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Simple query import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [ "query": [ "attribute": "status", "operator": "eq", "value": "failed" ], "sort": [ "attribute": "updated_at", "direction": "desc" ], "page": ["size": 15] ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.withpersona.com/api/v1/webhook-events/search")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` ### Complex boolean query **Request** ```json { "query": { "and": [ { "attribute": "webhook_id", "operator": "eq", "value": "wbh_1a2b3c" }, { "attribute": "status", "operator": "eq", "value": "failed" }, { "attribute": "updated_at", "operator": "gte", "value": "2026-04-23T00:00:00Z" } ] }, "page": { "size": 15 } } ``` **Response** ```json { "data": [ { "type": "webhook-event", "id": "wbhe_9f2a3cD4e5F6g7H8i9J0kLmN", "attributes": { "status": "failed", "event-name": "inquiry.completed", "webhook-id": "wbh_1a2b3c", "event-id": "evt_44c1d2", "result-code": 503, "attempts-made": 8, "last-attempted-at": "2026-04-24T09:15:44.000Z", "created-at": "2026-04-23T14:02:11.000Z", "updated-at": "2026-04-24T09:15:44.000Z" } } ], "links": { "prev": null, "next": "/api/v1/webhook-events/search?page%5Bafter%5D=eyJ2IjoxfQ%3D%3D&page%5Bsize%5D=10" } } ``` **SDK Code** ```python Complex boolean query import requests url = "https://api.withpersona.com/api/v1/webhook-events/search" payload = { "query": { "and": [ { "attribute": "webhook_id", "operator": "eq", "value": "wbh_1a2b3c" }, { "attribute": "status", "operator": "eq", "value": "failed" }, { "attribute": "updated_at", "operator": "gte", "value": "2026-04-23T00:00:00Z" } ] }, "page": { "size": 15 } } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Complex boolean query const url = 'https://api.withpersona.com/api/v1/webhook-events/search'; const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: '{"query":{"and":[{"attribute":"webhook_id","operator":"eq","value":"wbh_1a2b3c"},{"attribute":"status","operator":"eq","value":"failed"},{"attribute":"updated_at","operator":"gte","value":"2026-04-23T00:00:00Z"}]},"page":{"size":15}}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Complex boolean query package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.withpersona.com/api/v1/webhook-events/search" payload := strings.NewReader("{\n \"query\": {\n \"and\": [\n {\n \"attribute\": \"webhook_id\",\n \"operator\": \"eq\",\n \"value\": \"wbh_1a2b3c\"\n },\n {\n \"attribute\": \"status\",\n \"operator\": \"eq\",\n \"value\": \"failed\"\n },\n {\n \"attribute\": \"updated_at\",\n \"operator\": \"gte\",\n \"value\": \"2026-04-23T00:00:00Z\"\n }\n ]\n },\n \"page\": {\n \"size\": 15\n }\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Complex boolean query require 'uri' require 'net/http' url = URI("https://api.withpersona.com/api/v1/webhook-events/search") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"query\": {\n \"and\": [\n {\n \"attribute\": \"webhook_id\",\n \"operator\": \"eq\",\n \"value\": \"wbh_1a2b3c\"\n },\n {\n \"attribute\": \"status\",\n \"operator\": \"eq\",\n \"value\": \"failed\"\n },\n {\n \"attribute\": \"updated_at\",\n \"operator\": \"gte\",\n \"value\": \"2026-04-23T00:00:00Z\"\n }\n ]\n },\n \"page\": {\n \"size\": 15\n }\n}" response = http.request(request) puts response.read_body ``` ```java Complex boolean query import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.withpersona.com/api/v1/webhook-events/search") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"query\": {\n \"and\": [\n {\n \"attribute\": \"webhook_id\",\n \"operator\": \"eq\",\n \"value\": \"wbh_1a2b3c\"\n },\n {\n \"attribute\": \"status\",\n \"operator\": \"eq\",\n \"value\": \"failed\"\n },\n {\n \"attribute\": \"updated_at\",\n \"operator\": \"gte\",\n \"value\": \"2026-04-23T00:00:00Z\"\n }\n ]\n },\n \"page\": {\n \"size\": 15\n }\n}") .asString(); ``` ```php Complex boolean query request('POST', 'https://api.withpersona.com/api/v1/webhook-events/search', [ 'body' => '{ "query": { "and": [ { "attribute": "webhook_id", "operator": "eq", "value": "wbh_1a2b3c" }, { "attribute": "status", "operator": "eq", "value": "failed" }, { "attribute": "updated_at", "operator": "gte", "value": "2026-04-23T00:00:00Z" } ] }, "page": { "size": 15 } }', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp Complex boolean query using RestSharp; var client = new RestClient("https://api.withpersona.com/api/v1/webhook-events/search"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"query\": {\n \"and\": [\n {\n \"attribute\": \"webhook_id\",\n \"operator\": \"eq\",\n \"value\": \"wbh_1a2b3c\"\n },\n {\n \"attribute\": \"status\",\n \"operator\": \"eq\",\n \"value\": \"failed\"\n },\n {\n \"attribute\": \"updated_at\",\n \"operator\": \"gte\",\n \"value\": \"2026-04-23T00:00:00Z\"\n }\n ]\n },\n \"page\": {\n \"size\": 15\n }\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Complex boolean query import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [ "query": ["and": [ [ "attribute": "webhook_id", "operator": "eq", "value": "wbh_1a2b3c" ], [ "attribute": "status", "operator": "eq", "value": "failed" ], [ "attribute": "updated_at", "operator": "gte", "value": "2026-04-23T00:00:00Z" ] ]], "page": ["size": 15] ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.withpersona.com/api/v1/webhook-events/search")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` ### Empty query (all webhook events) **Request** ```json { "page": { "size": 15 } } ``` **Response** ```json { "data": [ { "type": "webhook-event", "id": "wbhe_9f2a3cD4e5F6g7H8i9J0kLmN", "attributes": { "status": "failed", "event-name": "inquiry.completed", "webhook-id": "wbh_1a2b3c", "event-id": "evt_44c1d2", "result-code": 503, "attempts-made": 8, "last-attempted-at": "2026-04-24T09:15:44.000Z", "created-at": "2026-04-23T14:02:11.000Z", "updated-at": "2026-04-24T09:15:44.000Z" } } ], "links": { "prev": null, "next": "/api/v1/webhook-events/search?page%5Bafter%5D=eyJ2IjoxfQ%3D%3D&page%5Bsize%5D=10" } } ``` **SDK Code** ```python Empty query (all webhook events) import requests url = "https://api.withpersona.com/api/v1/webhook-events/search" payload = { "page": { "size": 15 } } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Empty query (all webhook events) const url = 'https://api.withpersona.com/api/v1/webhook-events/search'; const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: '{"page":{"size":15}}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Empty query (all webhook events) package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.withpersona.com/api/v1/webhook-events/search" payload := strings.NewReader("{\n \"page\": {\n \"size\": 15\n }\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Empty query (all webhook events) require 'uri' require 'net/http' url = URI("https://api.withpersona.com/api/v1/webhook-events/search") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"page\": {\n \"size\": 15\n }\n}" response = http.request(request) puts response.read_body ``` ```java Empty query (all webhook events) import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.withpersona.com/api/v1/webhook-events/search") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"page\": {\n \"size\": 15\n }\n}") .asString(); ``` ```php Empty query (all webhook events) request('POST', 'https://api.withpersona.com/api/v1/webhook-events/search', [ 'body' => '{ "page": { "size": 15 } }', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp Empty query (all webhook events) using RestSharp; var client = new RestClient("https://api.withpersona.com/api/v1/webhook-events/search"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"page\": {\n \"size\": 15\n }\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Empty query (all webhook events) import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = ["page": ["size": 15]] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.withpersona.com/api/v1/webhook-events/search")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```