Create Deploy Webhook
curl --request POST \
--url https://api.vertracloud.app/v1/apps/{app_id}/deploys/webhooks \
--header 'Content-Type: application/json' \
--data '
{
"owner": "<string>",
"repo_name": "<string>",
"repo_id": "<string>",
"account_id": "<string>"
}
'import requests
url = "https://api.vertracloud.app/v1/apps/{app_id}/deploys/webhooks"
payload = {
"owner": "<string>",
"repo_name": "<string>",
"repo_id": "<string>",
"account_id": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
owner: '<string>',
repo_name: '<string>',
repo_id: '<string>',
account_id: '<string>'
})
};
fetch('https://api.vertracloud.app/v1/apps/{app_id}/deploys/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.vertracloud.app/v1/apps/{app_id}/deploys/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([
'owner' => '<string>',
'repo_name' => '<string>',
'repo_id' => '<string>',
'account_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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://api.vertracloud.app/v1/apps/{app_id}/deploys/webhooks"
payload := strings.NewReader("{\n \"owner\": \"<string>\",\n \"repo_name\": \"<string>\",\n \"repo_id\": \"<string>\",\n \"account_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.vertracloud.app/v1/apps/{app_id}/deploys/webhooks")
.header("Content-Type", "application/json")
.body("{\n \"owner\": \"<string>\",\n \"repo_name\": \"<string>\",\n \"repo_id\": \"<string>\",\n \"account_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vertracloud.app/v1/apps/{app_id}/deploys/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"owner\": \"<string>\",\n \"repo_name\": \"<string>\",\n \"repo_id\": \"<string>\",\n \"account_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"response": "https://api.vertracloud.app/v1/apps/123/deploys/receiver/webhook"
}
Deploys
Create Deploy Webhook
Creates a deploy webhook for a GitHub repository to automatically trigger deployments.
POST
/
v1
/
apps
/
{app_id}
/
deploys
/
webhooks
Create Deploy Webhook
curl --request POST \
--url https://api.vertracloud.app/v1/apps/{app_id}/deploys/webhooks \
--header 'Content-Type: application/json' \
--data '
{
"owner": "<string>",
"repo_name": "<string>",
"repo_id": "<string>",
"account_id": "<string>"
}
'import requests
url = "https://api.vertracloud.app/v1/apps/{app_id}/deploys/webhooks"
payload = {
"owner": "<string>",
"repo_name": "<string>",
"repo_id": "<string>",
"account_id": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
owner: '<string>',
repo_name: '<string>',
repo_id: '<string>',
account_id: '<string>'
})
};
fetch('https://api.vertracloud.app/v1/apps/{app_id}/deploys/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.vertracloud.app/v1/apps/{app_id}/deploys/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([
'owner' => '<string>',
'repo_name' => '<string>',
'repo_id' => '<string>',
'account_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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://api.vertracloud.app/v1/apps/{app_id}/deploys/webhooks"
payload := strings.NewReader("{\n \"owner\": \"<string>\",\n \"repo_name\": \"<string>\",\n \"repo_id\": \"<string>\",\n \"account_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.vertracloud.app/v1/apps/{app_id}/deploys/webhooks")
.header("Content-Type", "application/json")
.body("{\n \"owner\": \"<string>\",\n \"repo_name\": \"<string>\",\n \"repo_id\": \"<string>\",\n \"account_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vertracloud.app/v1/apps/{app_id}/deploys/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"owner\": \"<string>\",\n \"repo_name\": \"<string>\",\n \"repo_id\": \"<string>\",\n \"account_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"response": "https://api.vertracloud.app/v1/apps/123/deploys/receiver/webhook"
}
string
required
The ID of the application where the webhook will be created.
string
required
The GitHub repository owner.
string
required
The name of the GitHub repository.
string
required
The ID of the GitHub repository.
string
required
The GitHub account ID.
Response
string
The URL of the created webhook.
{
"response": "https://api.vertracloud.app/v1/apps/123/deploys/receiver/webhook"
}
Error Responses
string
Possible error codes:
UNAUTHORIZED: User is not authenticated or lacks permissions.PLAN_RESTRICTED_FEATURE: User plan does not support auto-deploy.INVALID_ACCOUNT_ID: Provided GitHub account ID is invalid.MISSING_REPO_INFORMATION: Required repository information is missing.INSTALLATION_NOT_FOUND: GitHub installation not found for the user.
string
A descriptive message providing additional details about the error.
{
"code": "INVALID_ACCOUNT_ID"
}