Webhook Message
curl --request POST \
--url https://api.us.vartiq.com/webhook-messages \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"appId": "<string>",
"webhookId": "<string>",
"payload": {}
}
'import requests
url = "https://api.us.vartiq.com/webhook-messages"
payload = {
"appId": "<string>",
"webhookId": "<string>",
"payload": {}
}
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>', webhookId: '<string>', payload: {}})
};
fetch('https://api.us.vartiq.com/webhook-messages', 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/webhook-messages",
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>',
'webhookId' => '<string>',
'payload' => [
]
]),
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/webhook-messages"
payload := strings.NewReader("{\n \"appId\": \"<string>\",\n \"webhookId\": \"<string>\",\n \"payload\": {}\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/webhook-messages")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"appId\": \"<string>\",\n \"webhookId\": \"<string>\",\n \"payload\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.us.vartiq.com/webhook-messages")
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 \"webhookId\": \"<string>\",\n \"payload\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"data": {
"webhookMessage": {
"id": "<string>",
"isDelivered": true,
"payload": "<string>",
"signature": "<string>",
"headers": [
{}
],
"createdAt": "<string>",
"updatedAt": "<string>"
},
"webhookMessageAttempt": {
"id": "<string>",
"isProcessed": true,
"isResend": true,
"statusCode": 123,
"response": "<string>",
"headers": [
{}
],
"createdAt": "<string>",
"updatedAt": "<string>"
}
}
}Webhook Messages
Webhook Message
POST
/
webhook-messages
Webhook Message
curl --request POST \
--url https://api.us.vartiq.com/webhook-messages \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"appId": "<string>",
"webhookId": "<string>",
"payload": {}
}
'import requests
url = "https://api.us.vartiq.com/webhook-messages"
payload = {
"appId": "<string>",
"webhookId": "<string>",
"payload": {}
}
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>', webhookId: '<string>', payload: {}})
};
fetch('https://api.us.vartiq.com/webhook-messages', 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/webhook-messages",
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>',
'webhookId' => '<string>',
'payload' => [
]
]),
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/webhook-messages"
payload := strings.NewReader("{\n \"appId\": \"<string>\",\n \"webhookId\": \"<string>\",\n \"payload\": {}\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/webhook-messages")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"appId\": \"<string>\",\n \"webhookId\": \"<string>\",\n \"payload\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.us.vartiq.com/webhook-messages")
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 \"webhookId\": \"<string>\",\n \"payload\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"data": {
"webhookMessage": {
"id": "<string>",
"isDelivered": true,
"payload": "<string>",
"signature": "<string>",
"headers": [
{}
],
"createdAt": "<string>",
"updatedAt": "<string>"
},
"webhookMessageAttempt": {
"id": "<string>",
"isProcessed": true,
"isResend": true,
"statusCode": 123,
"response": "<string>",
"headers": [
{}
],
"createdAt": "<string>",
"updatedAt": "<string>"
}
}
}Body Parameters
string
The unique identifier of the app to send the webhook message to.
Either
Either
appId or webhookId must be provided, but not both.string
The unique identifier of the webhook to send the message to.
Either
Either
appId or webhookId must be provided, but not both.object
required
The payload to be sent in the webhook message
Response
boolean
Indicates if the request was successful
string
A message describing the result of the operation
object
The created webhook message details
Show Properties
Show Properties
object
Details of the created webhook message
Show Properties
Show Properties
string
Unique identifier for the webhook message
boolean
Indicates if the message has been delivered
string
The stringified payload of the message
string
HMAC signature of the message
array
Array of header objects containing key-value pairs
string
Timestamp when the message was created
string
Timestamp when the message was last updated
object
Details of the delivery attempt
Show Properties
Show Properties
string
Unique identifier for the attempt
boolean
Indicates if the attempt has been processed
boolean
Indicates if this is a resend attempt
number
HTTP status code of the attempt
string
Response received from the webhook endpoint
array
Array of header objects containing key-value pairs
string
Timestamp when the attempt was created
string
Timestamp when the attempt was last updated
Response Example
⌘I