Create Webhook
POST/webhook
Create a webhook associated with a Charge project
Request
Query Parameters
apiKey stringrequired
Example: {{publicKey}}
Header Parameters
API-SECRET stringrequired
Example: {{secretKey}}
- application/json
Body
projectId string
webhookUrl string
eventType string
Responses
- 201
- 403
Created
- application/json
- Schema
- Example (from schema)
Schema
_id string
projectId string
webhookUrl string
eventType string
createdAt string
updatedAt string
__v number
{
"_id": "62d3f2aa15a8393bd802c313",
"projectId": "62ce87c8131bbffe0f83af65",
"webhookUrl": "https://webhook.site/d7a716ac-8119-4114-9586-f0667c2cb1e1",
"eventType": "ALL",
"createdAt": "2022-07-17T11:29:46.459Z",
"updatedAt": "2022-07-17T11:29:46.459Z",
"__v": 0
}
Forbidden
- application/json
- Schema
- Example (from schema)
Schema
statusCode number
errorMessage object
statusCode number
message string
error string
path string
{
"statusCode": 403,
"errorMessage": {
"statusCode": 403,
"message": "Forbidden resource",
"error": "Forbidden"
},
"path": "/api/v0/notifications/webhook?apiKey=pk_fPI_B8UbTnpPmH5UgQl2E7VI"
}
Loading...