Create Webhook
curl --request POST \
--url https://api.management.junction.com/v1/org/{org_id}/team/{team_id}/{environment}/webhook \
--header 'Content-Type: application/json' \
--header 'X-Management-Key: <api-key>' \
--data '
{
"url": "<string>",
"description": "",
"rate_limit": 123,
"disabled": false,
"filter_types": "daily.data.activity.created",
"secret": "<string>"
}
'import requests
url = "https://api.management.junction.com/v1/org/{org_id}/team/{team_id}/{environment}/webhook"
payload = {
"url": "<string>",
"description": "",
"rate_limit": 123,
"disabled": False,
"filter_types": "daily.data.activity.created",
"secret": "<string>"
}
headers = {
"X-Management-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Management-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: '<string>',
description: '',
rate_limit: 123,
disabled: false,
filter_types: 'daily.data.activity.created',
secret: '<string>'
})
};
fetch('https://api.management.junction.com/v1/org/{org_id}/team/{team_id}/{environment}/webhook', 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.management.junction.com/v1/org/{org_id}/team/{team_id}/{environment}/webhook",
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([
'url' => '<string>',
'description' => '',
'rate_limit' => 123,
'disabled' => false,
'filter_types' => 'daily.data.activity.created',
'secret' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Management-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.management.junction.com/v1/org/{org_id}/team/{team_id}/{environment}/webhook"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"description\": \"\",\n \"rate_limit\": 123,\n \"disabled\": false,\n \"filter_types\": \"daily.data.activity.created\",\n \"secret\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Management-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.management.junction.com/v1/org/{org_id}/team/{team_id}/{environment}/webhook")
.header("X-Management-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"description\": \"\",\n \"rate_limit\": 123,\n \"disabled\": false,\n \"filter_types\": \"daily.data.activity.created\",\n \"secret\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.management.junction.com/v1/org/{org_id}/team/{team_id}/{environment}/webhook")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Management-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"description\": \"\",\n \"rate_limit\": 123,\n \"disabled\": false,\n \"filter_types\": \"daily.data.activity.created\",\n \"secret\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"url": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"rate_limit": 123,
"disabled": false,
"filter_types": "daily.data.activity.created"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Team Webhooks
Create Webhook
Post org team webhook via the Junction API. Requires authentication with your team API key.
POST
/
v1
/
org
/
{org_id}
/
team
/
{team_id}
/
{environment}
/
webhook
Create Webhook
curl --request POST \
--url https://api.management.junction.com/v1/org/{org_id}/team/{team_id}/{environment}/webhook \
--header 'Content-Type: application/json' \
--header 'X-Management-Key: <api-key>' \
--data '
{
"url": "<string>",
"description": "",
"rate_limit": 123,
"disabled": false,
"filter_types": "daily.data.activity.created",
"secret": "<string>"
}
'import requests
url = "https://api.management.junction.com/v1/org/{org_id}/team/{team_id}/{environment}/webhook"
payload = {
"url": "<string>",
"description": "",
"rate_limit": 123,
"disabled": False,
"filter_types": "daily.data.activity.created",
"secret": "<string>"
}
headers = {
"X-Management-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Management-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: '<string>',
description: '',
rate_limit: 123,
disabled: false,
filter_types: 'daily.data.activity.created',
secret: '<string>'
})
};
fetch('https://api.management.junction.com/v1/org/{org_id}/team/{team_id}/{environment}/webhook', 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.management.junction.com/v1/org/{org_id}/team/{team_id}/{environment}/webhook",
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([
'url' => '<string>',
'description' => '',
'rate_limit' => 123,
'disabled' => false,
'filter_types' => 'daily.data.activity.created',
'secret' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Management-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.management.junction.com/v1/org/{org_id}/team/{team_id}/{environment}/webhook"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"description\": \"\",\n \"rate_limit\": 123,\n \"disabled\": false,\n \"filter_types\": \"daily.data.activity.created\",\n \"secret\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Management-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.management.junction.com/v1/org/{org_id}/team/{team_id}/{environment}/webhook")
.header("X-Management-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"description\": \"\",\n \"rate_limit\": 123,\n \"disabled\": false,\n \"filter_types\": \"daily.data.activity.created\",\n \"secret\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.management.junction.com/v1/org/{org_id}/team/{team_id}/{environment}/webhook")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Management-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"description\": \"\",\n \"rate_limit\": 123,\n \"disabled\": false,\n \"filter_types\": \"daily.data.activity.created\",\n \"secret\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"url": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"rate_limit": 123,
"disabled": false,
"filter_types": "daily.data.activity.created"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Junction Management API is available for the Scale plan.
The base URL of this endpoint is
https://api.management.junction.com/.The endpoint accepts only Management Key (X-Management-Key).
Team API Key is not accepted.Authorizations
Path Parameters
Available options:
production, sandbox Body
application/json
Response
Successful Response
Was this page helpful?
⌘I