Maximise AI Docs
  • Introduction
    • Authentication
    • Rate Limit
  • Whitelabel APIs
    • Check Credit Usage
    • Add Domain
    • Update Domain
    • Archive Domain
    • All Domains
    • Add Webhook
    • Domain Visitor List
    • Domain Account List
Powered by GitBook
On this page
  1. Whitelabel APIs

Add Webhook

Set up webhooks to automate workflows and trigger actions based on real-time events.

curl --location 'https://api.maximise.ai/v1/whitelabel-api/add-webhook' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "url": "https://example.com/webhook"
}'
const axios = require('axios');

axios.post('https://api.maximise.ai/v1/whitelabel-api/add-webhook',
{
    "url": "https://example.com/webhook"
}, {
    headers: {accept: 'application/json', Authorization: 'Bearer <token>'}
})
  .then(response => {
    console.log(response.data);
  })
  .catch(error => {
    console.log(error);
  });
import requests
import json

url = "https://api.maximise.ai/v1/whitelabel-api/add-webhook"

payload = json.dumps({
  "url": "https://example.com/webhook"
})
headers = {
  'Authorization': 'Bearer <token>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n    \"url\": \"https://example.com/webhook\",\n    \"active\": true, \n   \"verified\": true\n}");
Request request = new Request.Builder()
  .url("https://api.maximise.ai/v1/whitelabel-api/add-webhook")
  .method("POST", body)
  .addHeader("Authorization", "Bearer <token>")
  .addHeader("Content-Type", "application/json")
  .build();
Response response = client.newCall(request).execute();
require "uri"
require "json"
require "net/http"

url = URI("https://api.maximise.ai/v1/whitelabel-api/add-webhook")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <token>"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
  "url": "https://example.com/webhook"
})

response = https.request(request)
puts response.read_body
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.maximise.ai/v1/whitelabel-api/add-webhook',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "url": "https://example.com/webhook"
}',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer <token>',
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Example response

Status Code: 200 OK

{
    "message": "Webhook added successfully"
}
PreviousAll DomainsNextDomain Visitor List

Last updated 7 months ago