Webhook

POST /crm_register_webhook

This endpoint is used to register or update a webhook for a specific collection.

Headers:

  • api_key (required): The public key of the collection.

  • api_secret (required): The private key of the collection.

Body:

  • webhook (optional): The URL of the webhook. Must be a valid HTTPS URL if provided.

  • webhook_pass (optional): The password for the webhook. Must be less than 250 characters if provided.

  • webhook_login (optional): The login for the webhook. Must be less than 250 characters if provided.

Responses:

  • 200 OK:

    jsonCopier le code{
        "status": true,
        "message": "updated"
    }
  • 400 Bad Request: Various error messages indicating the cause of the error.

GET /crm_get_webhook

This endpoint is used to retrieve the webhook details for a specific collection.

Headers:

  • api_key (required): The public key of the collection.

  • api_secret (required): The private key of the collection.

Responses:

  • 200 OK:

    jsonCopier le code{
        "status": true,
        "data": {
            "webhook": "https://yourwebhook.com",
            "webhook_pass": "yourpassword",
            "webhook_login": "yourlogin"
        }
    }
  • 400 Bad Request: Various error messages indicating the cause of the error.

Last updated