Webhook
Route: /register_webhook
/register_webhook
Description: This endpoint registers or updates a webhook for a minting API. It requires a valid API key and secret for authentication. The webhook URL must be a valid HTTPS URL. The webhook_pass
and webhook_login
parameters are optional but must not exceed 250 characters.
Method: POST
Headers:
api_key
(required): The API key for authentication.api_secret
(required): The API secret for authentication.
Form Parameters:
webhook
(optional): The URL for the webhook (must be a valid HTTPS URL).webhook_pass
(optional): A password for the webhook (maximum length: 250 characters).webhook_login
(optional): The login for the webhook (maximum length: 250 characters).
Responses:
Success
Status: 200 OK
Content-Type: application/json
Body:
Error
Status: 400 Bad Request
Content-Type: application/json
Body: Depends on the error; possible messages include:
"api_key or api_secret missing"
"api_key or api_secret invalid"
"webhook invalid"
"webhook_pass invalid"
"webhook_login invalid"
Route: /get_webhook
/get_webhook
Description: This endpoint retrieves the current webhook details for a minting API. It requires a valid API key and secret for authentication.
Method: GET
Headers:
api_key
(required): The API key for authentication.api_secret
(required): The API secret for authentication.
Responses:
Success
Status: 200 OK
Content-Type: application/json
Body:
Error
Status: 400 Bad Request
Content-Type: application/json
Body: Depends on the error; possible messages include:
"api_key or api_secret missing"
"api_key or api_secret invalid"
Webhook Payload
Description: When the webhook is triggered, the API sends a request with the following payload to the registered webhook URL.
Payload Body:
Example Response that the Webhook Receives:
When your webhook URL receives the payload from the API, it is expected to process the information and respond accordingly. Typically, the webhook should acknowledge receipt of the data.
Success Response
Status: 200 OK
Content-Type: application/json
Error Response If there is an error processing the webhook data, your server should respond with the appropriate error message.
Status: 400 Bad Request
Content-Type: application/json
Last updated