Get Single Webhook
Call this endpoint as a GET request to retrieve the URL of a webhook with the ID that you have provided in the body.
Endpoint
Method | URL | Parameters |
---|---|---|
GET | https://api.everlytic.net/transactional/email/v1/webhooks/[Webhook ID] | [Webhook ID] – ID of the requested webhook |
Example Request
curl --location 'https://api.everlytic.net/transactional/email/v1/webhooks/07a64775-ec55-40aa-b32b-7969cbf28b6a'
Response
Status code
Status code | Explanation |
---|---|
200 Ok | Request was processed successfully |
400 Bad Request | The request body was formatted improperly |
401 Unauthorized | The provided authorization credentials are incorrect |
412 Precondition Failed | One or more of the required fields were invalid |
Properties
Properties of response with a status of 200 Ok
Property | Sub-properties | Description | Data type | Parameters |
---|---|---|---|---|
type | Type of resource listed | string |
|
|
meta | total | Total amount of pages returned | integer | |
per_page | Number of webhooks listed per page | integer | ||
current_page | The current page number | integer | ||
last_page | The number of the last page of the results. | integer | ||
from | The number of the previous page | integer | ||
to | The number of the next page | integer | ||
links | first | The URL for the first page of results | string | Valid URL |
last | The URL for the final page of results | string | Valid URL | |
prev | The URL for the previous page | string | Valid URL | |
next | The URL for the next page | string | Valid URL | |
data | id | The ID that will be used to identify the webhook in future requests | string | |
url | The URL that will receive the webhook event | string | Valid URL | |
verb | The HTTP method that will be used by the webhook | enum (string) |
|
|
auth_details | Authorization details required by the provided webhook URL. | JSON |
|
|
|
The username required by the provided webhook URL | string | ||
|
The password required by the provided webhook URL | string | ||
auth_type | The type of authorization used by the provided webhook URL | enum (string) |
|
|
status | The current state of the new webhook | enum (string) |
|
|
settings | Optional settings used for this webhook. | JSON |
|
|
|
Setting to enable sending transactional email’s HTML content as part of webhook payload. HTML content is only sent as part of “sent” event types and only part of the “legacy” field set. |
boolean |
|
|
content_type | The original media type (prior to any content encoding applied for sending) used for the webhook payload. | enum (string) |
|
|
field_set | The format of the webhook payload. Set to “legacy” to use the format of legacy transactional callbacks. | enum (string) |
|
|
updated_timestamp | The date and time that the webhook was last updated | date-time | ISO 8601 date-time string | |
created_timestamp | The date and time that the webhook was initially created | date-time | ISO 8601 date-time string | |
event_types | Array containing the type of event that will trigger the webhook | array (string) |
|
Properties of response with a status 4XX
Property | Description | Data type | Expected parameters |
---|---|---|---|
code | The HTTP response status code | integer |
|
message | The reason for the failure | string | Valid string |
error | Array containing errors field | JSON |
|
errors | Array containing the failure details | JSON |
|
domain | The classification of the type of error | string |
|
reason | Keyword used to describe the error | string |
|
message | Text describing the reason for the failure | string | Valid string |
locationType | The location where the failure occurred | string |
|
location | The type of validation that failed | string |
|
Example Response
Successful request [200 OK]
{ "webhook": { "id": "07a64775-ec55-40aa-b32b-7969cbf28b6a", "url": "[Your Webhook URL]", "verb": "post", "auth_details": null, "auth_type": "basic", "status": "enabled", "settings": "{\"include_html\":false}", "content_type": "application/json", "field_set": "standard", "updated_timestamp": "2023-08-07T14:21:12.000Z", "created_timestamp": "2023-08-07T14:19:42.000Z", "event_types": [ "sent" ] } }
Webhook not found [400 Bad Request]
{ "code": 412, "message": "Webhook not found", "error": { "errors": [ { "domain": "global", "reason": "invalid", "message": "Webhook not found", "locationType": "request", "location": "default" } ] } }
Invalid/Missing authorization credentials [401 Unauthorized]
{ "code": 401, "message": "Login Required", "error": { "errors": [ { "domain": "global", "reason": "required", "message": "Login Required", "locationType": "request", "location": "authorization" } ] } }