curl --request POST \
--url https://us.getconvoy.cloud/api/v1/projects/{projectID}/events/dynamic \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"custom_headers": {},
"data": {},
"event_type": "<string>",
"event_types": [
"<string>"
],
"idempotency_key": "<string>",
"secret": "<string>",
"url": "<string>"
}
'import requests
url = "https://us.getconvoy.cloud/api/v1/projects/{projectID}/events/dynamic"
payload = {
"custom_headers": {},
"data": {},
"event_type": "<string>",
"event_types": ["<string>"],
"idempotency_key": "<string>",
"secret": "<string>",
"url": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
custom_headers: {},
data: {},
event_type: '<string>',
event_types: ['<string>'],
idempotency_key: '<string>',
secret: '<string>',
url: '<string>'
})
};
fetch('https://us.getconvoy.cloud/api/v1/projects/{projectID}/events/dynamic', 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://us.getconvoy.cloud/api/v1/projects/{projectID}/events/dynamic",
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([
'custom_headers' => [
],
'data' => [
],
'event_type' => '<string>',
'event_types' => [
'<string>'
],
'idempotency_key' => '<string>',
'secret' => '<string>',
'url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$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://us.getconvoy.cloud/api/v1/projects/{projectID}/events/dynamic"
payload := strings.NewReader("{\n \"custom_headers\": {},\n \"data\": {},\n \"event_type\": \"<string>\",\n \"event_types\": [\n \"<string>\"\n ],\n \"idempotency_key\": \"<string>\",\n \"secret\": \"<string>\",\n \"url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<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://us.getconvoy.cloud/api/v1/projects/{projectID}/events/dynamic")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"custom_headers\": {},\n \"data\": {},\n \"event_type\": \"<string>\",\n \"event_types\": [\n \"<string>\"\n ],\n \"idempotency_key\": \"<string>\",\n \"secret\": \"<string>\",\n \"url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://us.getconvoy.cloud/api/v1/projects/{projectID}/events/dynamic")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"custom_headers\": {},\n \"data\": {},\n \"event_type\": \"<string>\",\n \"event_types\": [\n \"<string>\"\n ],\n \"idempotency_key\": \"<string>\",\n \"secret\": \"<string>\",\n \"url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{}{
"message": "<string>",
"status": true,
"data": {}
}{
"message": "<string>",
"status": true,
"data": {}
}{
"message": "<string>",
"status": true,
"data": {}
}Dynamic Events
This endpoint does not require creating endpoint and subscriptions ahead of time. Instead, you supply the endpoint and the payload, and Convoy delivers the events
curl --request POST \
--url https://us.getconvoy.cloud/api/v1/projects/{projectID}/events/dynamic \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"custom_headers": {},
"data": {},
"event_type": "<string>",
"event_types": [
"<string>"
],
"idempotency_key": "<string>",
"secret": "<string>",
"url": "<string>"
}
'import requests
url = "https://us.getconvoy.cloud/api/v1/projects/{projectID}/events/dynamic"
payload = {
"custom_headers": {},
"data": {},
"event_type": "<string>",
"event_types": ["<string>"],
"idempotency_key": "<string>",
"secret": "<string>",
"url": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
custom_headers: {},
data: {},
event_type: '<string>',
event_types: ['<string>'],
idempotency_key: '<string>',
secret: '<string>',
url: '<string>'
})
};
fetch('https://us.getconvoy.cloud/api/v1/projects/{projectID}/events/dynamic', 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://us.getconvoy.cloud/api/v1/projects/{projectID}/events/dynamic",
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([
'custom_headers' => [
],
'data' => [
],
'event_type' => '<string>',
'event_types' => [
'<string>'
],
'idempotency_key' => '<string>',
'secret' => '<string>',
'url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$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://us.getconvoy.cloud/api/v1/projects/{projectID}/events/dynamic"
payload := strings.NewReader("{\n \"custom_headers\": {},\n \"data\": {},\n \"event_type\": \"<string>\",\n \"event_types\": [\n \"<string>\"\n ],\n \"idempotency_key\": \"<string>\",\n \"secret\": \"<string>\",\n \"url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<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://us.getconvoy.cloud/api/v1/projects/{projectID}/events/dynamic")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"custom_headers\": {},\n \"data\": {},\n \"event_type\": \"<string>\",\n \"event_types\": [\n \"<string>\"\n ],\n \"idempotency_key\": \"<string>\",\n \"secret\": \"<string>\",\n \"url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://us.getconvoy.cloud/api/v1/projects/{projectID}/events/dynamic")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"custom_headers\": {},\n \"data\": {},\n \"event_type\": \"<string>\",\n \"event_types\": [\n \"<string>\"\n ],\n \"idempotency_key\": \"<string>\",\n \"secret\": \"<string>\",\n \"url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{}{
"message": "<string>",
"status": true,
"data": {}
}{
"message": "<string>",
"status": true,
"data": {}
}{
"message": "<string>",
"status": true,
"data": {}
}Authorizations
Path Parameters
Project ID
Body
Event Details
Specifies custom headers you want convoy to add when the event is dispatched to your endpoint
Show child attributes
Show child attributes
Data is an arbitrary JSON value that gets sent as the body of the webhook to the endpoints
Event Type is used for filtering and debugging e.g invoice.paid
A list of event types for the subscription filter config
Specify a key for event deduplication
Endpoint's webhook secret. If not provided, Convoy autogenerates one for the endpoint.
URL is the endpoint's URL prefixed with https. non-https urls are currently not supported.
Response
Created
The response is of type object.
Was this page helpful?