Create Webhook
curl --request POST \
--url https://api.us.vartiq.com/webhooks \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"appId": "<string>",
"projectId": "<string>",
"url": "<string>",
"customHeaders": [
{
"key": "<string>",
"value": "<string>"
}
],
"authMethod": "<string>",
"userName": "<string>",
"password": "<string>",
"apiKey": "<string>",
"apiKeyHeader": "<string>",
"hmacHeader": "<string>",
"hmacSecret": "<string>"
}
'import requests
url = "https://api.us.vartiq.com/webhooks"
payload = {
"appId": "<string>",
"projectId": "<string>",
"url": "<string>",
"customHeaders": [
{
"key": "<string>",
"value": "<string>"
}
],
"authMethod": "<string>",
"userName": "<string>",
"password": "<string>",
"apiKey": "<string>",
"apiKeyHeader": "<string>",
"hmacHeader": "<string>",
"hmacSecret": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
appId: '<string>',
projectId: '<string>',
url: '<string>',
customHeaders: [{key: '<string>', value: '<string>'}],
authMethod: '<string>',
userName: '<string>',
password: '<string>',
apiKey: '<string>',
apiKeyHeader: '<string>',
hmacHeader: '<string>',
hmacSecret: '<string>'
})
};
fetch('https://api.us.vartiq.com/webhooks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.us.vartiq.com/webhooks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'appId' => '<string>',
'projectId' => '<string>',
'url' => '<string>',
'customHeaders' => [
[
'key' => '<string>',
'value' => '<string>'
]
],
'authMethod' => '<string>',
'userName' => '<string>',
'password' => '<string>',
'apiKey' => '<string>',
'apiKeyHeader' => '<string>',
'hmacHeader' => '<string>',
'hmacSecret' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.us.vartiq.com/webhooks"
payload := strings.NewReader("{\n \"appId\": \"<string>\",\n \"projectId\": \"<string>\",\n \"url\": \"<string>\",\n \"customHeaders\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"authMethod\": \"<string>\",\n \"userName\": \"<string>\",\n \"password\": \"<string>\",\n \"apiKey\": \"<string>\",\n \"apiKeyHeader\": \"<string>\",\n \"hmacHeader\": \"<string>\",\n \"hmacSecret\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.us.vartiq.com/webhooks")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"appId\": \"<string>\",\n \"projectId\": \"<string>\",\n \"url\": \"<string>\",\n \"customHeaders\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"authMethod\": \"<string>\",\n \"userName\": \"<string>\",\n \"password\": \"<string>\",\n \"apiKey\": \"<string>\",\n \"apiKeyHeader\": \"<string>\",\n \"hmacHeader\": \"<string>\",\n \"hmacSecret\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.us.vartiq.com/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"appId\": \"<string>\",\n \"projectId\": \"<string>\",\n \"url\": \"<string>\",\n \"customHeaders\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"authMethod\": \"<string>\",\n \"userName\": \"<string>\",\n \"password\": \"<string>\",\n \"apiKey\": \"<string>\",\n \"apiKeyHeader\": \"<string>\",\n \"hmacHeader\": \"<string>\",\n \"hmacSecret\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"data": {
"id": "<string>",
"name": "<string>",
"url": "<string>",
"customHeaders": [
{
"key": "<string>",
"value": "<string>"
}
],
"headers": [
{
"key": "<string>",
"value": "<string>"
}
],
"authMethod": {
"method": "<string>",
"hmacHeader": "<string>",
"hmacSecret": "<string>",
"apiKey": "<string>",
"apiKeyHeader": "<string>",
"userName": "<string>",
"password": "<string>"
},
"createdAt": "<string>",
"updatedAt": "<string>"
}
}Webhooks
Create Webhook
POST
/
webhooks
Create Webhook
curl --request POST \
--url https://api.us.vartiq.com/webhooks \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"appId": "<string>",
"projectId": "<string>",
"url": "<string>",
"customHeaders": [
{
"key": "<string>",
"value": "<string>"
}
],
"authMethod": "<string>",
"userName": "<string>",
"password": "<string>",
"apiKey": "<string>",
"apiKeyHeader": "<string>",
"hmacHeader": "<string>",
"hmacSecret": "<string>"
}
'import requests
url = "https://api.us.vartiq.com/webhooks"
payload = {
"appId": "<string>",
"projectId": "<string>",
"url": "<string>",
"customHeaders": [
{
"key": "<string>",
"value": "<string>"
}
],
"authMethod": "<string>",
"userName": "<string>",
"password": "<string>",
"apiKey": "<string>",
"apiKeyHeader": "<string>",
"hmacHeader": "<string>",
"hmacSecret": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
appId: '<string>',
projectId: '<string>',
url: '<string>',
customHeaders: [{key: '<string>', value: '<string>'}],
authMethod: '<string>',
userName: '<string>',
password: '<string>',
apiKey: '<string>',
apiKeyHeader: '<string>',
hmacHeader: '<string>',
hmacSecret: '<string>'
})
};
fetch('https://api.us.vartiq.com/webhooks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.us.vartiq.com/webhooks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'appId' => '<string>',
'projectId' => '<string>',
'url' => '<string>',
'customHeaders' => [
[
'key' => '<string>',
'value' => '<string>'
]
],
'authMethod' => '<string>',
'userName' => '<string>',
'password' => '<string>',
'apiKey' => '<string>',
'apiKeyHeader' => '<string>',
'hmacHeader' => '<string>',
'hmacSecret' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.us.vartiq.com/webhooks"
payload := strings.NewReader("{\n \"appId\": \"<string>\",\n \"projectId\": \"<string>\",\n \"url\": \"<string>\",\n \"customHeaders\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"authMethod\": \"<string>\",\n \"userName\": \"<string>\",\n \"password\": \"<string>\",\n \"apiKey\": \"<string>\",\n \"apiKeyHeader\": \"<string>\",\n \"hmacHeader\": \"<string>\",\n \"hmacSecret\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.us.vartiq.com/webhooks")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"appId\": \"<string>\",\n \"projectId\": \"<string>\",\n \"url\": \"<string>\",\n \"customHeaders\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"authMethod\": \"<string>\",\n \"userName\": \"<string>\",\n \"password\": \"<string>\",\n \"apiKey\": \"<string>\",\n \"apiKeyHeader\": \"<string>\",\n \"hmacHeader\": \"<string>\",\n \"hmacSecret\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.us.vartiq.com/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"appId\": \"<string>\",\n \"projectId\": \"<string>\",\n \"url\": \"<string>\",\n \"customHeaders\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"authMethod\": \"<string>\",\n \"userName\": \"<string>\",\n \"password\": \"<string>\",\n \"apiKey\": \"<string>\",\n \"apiKeyHeader\": \"<string>\",\n \"hmacHeader\": \"<string>\",\n \"hmacSecret\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"data": {
"id": "<string>",
"name": "<string>",
"url": "<string>",
"customHeaders": [
{
"key": "<string>",
"value": "<string>"
}
],
"headers": [
{
"key": "<string>",
"value": "<string>"
}
],
"authMethod": {
"method": "<string>",
"hmacHeader": "<string>",
"hmacSecret": "<string>",
"apiKey": "<string>",
"apiKeyHeader": "<string>",
"userName": "<string>",
"password": "<string>"
},
"createdAt": "<string>",
"updatedAt": "<string>"
}
}Body Parameters
string
The ID of the app to create the webhook for.
Required for webhooks in an app. Not required for global webhooks.
Required for webhooks in an app. Not required for global webhooks.
string
The ID of the app to create the webhook for.
Required for global webhooks.
Required for global webhooks.
string
required
The URL where webhook events will be sent
array
string
Authentication method for the webhook. Must be one of: “basic”, “hmac”, or “apiKey”
string
Username for basic authentication (required if authMethod is “basic”)
string
Password for basic authentication (required if authMethod is “basic”)
string
API key for apiKey authentication (required if authMethod is “apiKey”)
string
Header name for the API key (required if authMethod is “apiKey”)
string
Header name for the HMAC signature (required if authMethod is “hmac”)
string
Secret for HMAC signature generation (required if authMethod is “hmac”)
Response
boolean
Indicates if the request was successful
string
A message describing the result of the operation
object
The created webhook object
Show Properties
Show Properties
string
Unique identifier for the webhook
string
Name of the webhook
string
URL where webhook events will be sent
object
Authentication method configuration
Show Properties
Show Properties
string
Authentication method type (hmac, api_key, or basic)
string
Custom header name for HMAC signature (if method is hmac)
string
Secret used for HMAC signature generation (if method is hmac)
string
API key value (if method is api_key)
string
Custom header name for API key (if method is api_key)
string
Username for basic authentication (if method is basic)
string
Password for basic authentication (if method is basic)
string
Timestamp when the webhook was created
string
Timestamp when the webhook was last updated
Response Example
{
"success": true,
"message": "Webhook created successfully",
"data": {
"id": "wh_01JT39DVQGKA1RV4QNJ1VFRNW2",
"name": "heelo",
"url": "https://exp.com",
"secret": "01JT39DVQJW3A49TR3XXFVM939",
"customHeaders": [
{
"key": "x-app",
"value": "x-value"
}
],
"headers": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"authMethod": {
"hmacHeader": "x-Vartiq-signature",
"hmacSecret": "uPvKnaxMwD1gHs1uFNJh-UEn3D5ha5WZcS3WTMVUExY",
"method": "hmac"
},
"createdAt": "2025-04-30T12:06:00.703Z",
"updatedAt": "2025-04-30T12:06:00.703Z"
}
}
⌘I