Create webhook
POST/webhooks
Subscribes your webhook listener to events.
Request
- application/json
Body
Array [
]
The URL that is configured to listen on localhost
for incoming POST
notification messages that contain event information.
Possible values: <= 2048 characters
event_types
object[]
required
An array of events to which to subscribe your webhook. To subscribe to all events, including events as they are added, specify the asterisk wild card. To replace the event_types
array, specify the asterisk wild card. To list all supported events, list available events.
Possible values: <= 500
The unique event name.
Note: To subscribe to all events, including events as they are added, specify an *
as the value to represent a wildcard.
Responses
- 201
- default
A successful request returns the HTTP 201 Created
status code and a JSON response body with a webhook
object that includes the webhook ID for later use.
- application/json
- Schema
- Example (from schema)
Schema
The ID of the webhook.
The URL that is configured to listen on localhost
for incoming POST
notification messages that contain event information.
Possible values: <= 2048 characters
An array of events to which to subscribe your webhook. To subscribe to all events, including events as they are added, specify the asterisk wild card. To replace the event_types
array, specify the asterisk wild card. To list all supported events, list available events.
Possible values: <= 500
An array of request-related HATEOAS links.
{
"id": "string",
"url": "string",
"event_types": [
{
"name": "string",
"description": "string",
"status": "string",
"resource_versions": [
"string"
]
}
],
"links": [
{
"href": "string",
"rel": "string",
"method": "GET"
}
]
}
The error response.
- application/json
- Schema
- Example (from schema)
Schema
The human-readable, unique name of the error.
The message that describes the error.
The PayPal internal ID. Used for correlation purposes.
The information link, or URI, that shows detailed information about this error for the developer.
An array of additional details about the error.
An array of request-related HATEOAS links.
{
"name": "string",
"message": "string",
"debug_id": "string",
"information_link": "string",
"details": [
{
"field": "string",
"value": "string",
"location": "body",
"issue": "string",
"description": "string"
}
],
"links": [
{
"href": "string",
"rel": "string",
"method": "GET"
}
]
}