curl --request POST \
--url https://api.usenotra.com/v1/integrations/github \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"owner": "usenotra",
"repo": "notra",
"branch": "main",
"token": "github_pat_11ABCDEFG..."
}
'import requests
url = "https://api.usenotra.com/v1/integrations/github"
payload = {
"owner": "usenotra",
"repo": "notra",
"branch": "main",
"token": "github_pat_11ABCDEFG..."
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
owner: 'usenotra',
repo: 'notra',
branch: 'main',
token: 'github_pat_11ABCDEFG...'
})
};
fetch('https://api.usenotra.com/v1/integrations/github', 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.usenotra.com/v1/integrations/github",
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' => 'usenotra',
'repo' => 'notra',
'branch' => 'main',
'token' => 'github_pat_11ABCDEFG...'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.usenotra.com/v1/integrations/github"
payload := strings.NewReader("{\n \"owner\": \"usenotra\",\n \"repo\": \"notra\",\n \"branch\": \"main\",\n \"token\": \"github_pat_11ABCDEFG...\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.usenotra.com/v1/integrations/github")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"owner\": \"usenotra\",\n \"repo\": \"notra\",\n \"branch\": \"main\",\n \"token\": \"github_pat_11ABCDEFG...\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usenotra.com/v1/integrations/github")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"owner\": \"usenotra\",\n \"repo\": \"notra\",\n \"branch\": \"main\",\n \"token\": \"github_pat_11ABCDEFG...\"\n}"
response = http.request(request)
puts response.read_body{
"github": {
"id": "<string>",
"displayName": "<string>",
"owner": "<string>",
"repo": "<string>",
"defaultBranch": "<string>"
},
"organization": {
"id": "<string>",
"slug": "<string>",
"name": "<string>",
"logo": "<string>"
}
}{
"error": "<string>",
"code": "<string>",
"recovery": "<string>"
}{
"error": "<string>",
"code": "<string>",
"recovery": "<string>"
}{
"error": "<string>",
"code": "<string>",
"recovery": "<string>"
}{
"error": "<string>",
"code": "<string>",
"recovery": "<string>"
}{
"error": "<string>",
"code": "<string>",
"recovery": "<string>"
}{
"error": "<string>",
"limit": 2,
"remaining": 1,
"reset": 123
}{
"error": "<string>",
"code": "<string>",
"recovery": "<string>"
}Create a GitHub integration
Checks that the repository can be read (a personal access token is required for private repositories), connects it, and enables changelog generation for it; blog post and X post outputs start disabled. A webhook secret is generated on creation. Copy the payload URL and secret from the dashboard to receive push and release events.
curl --request POST \
--url https://api.usenotra.com/v1/integrations/github \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"owner": "usenotra",
"repo": "notra",
"branch": "main",
"token": "github_pat_11ABCDEFG..."
}
'import requests
url = "https://api.usenotra.com/v1/integrations/github"
payload = {
"owner": "usenotra",
"repo": "notra",
"branch": "main",
"token": "github_pat_11ABCDEFG..."
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
owner: 'usenotra',
repo: 'notra',
branch: 'main',
token: 'github_pat_11ABCDEFG...'
})
};
fetch('https://api.usenotra.com/v1/integrations/github', 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.usenotra.com/v1/integrations/github",
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' => 'usenotra',
'repo' => 'notra',
'branch' => 'main',
'token' => 'github_pat_11ABCDEFG...'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.usenotra.com/v1/integrations/github"
payload := strings.NewReader("{\n \"owner\": \"usenotra\",\n \"repo\": \"notra\",\n \"branch\": \"main\",\n \"token\": \"github_pat_11ABCDEFG...\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.usenotra.com/v1/integrations/github")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"owner\": \"usenotra\",\n \"repo\": \"notra\",\n \"branch\": \"main\",\n \"token\": \"github_pat_11ABCDEFG...\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usenotra.com/v1/integrations/github")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"owner\": \"usenotra\",\n \"repo\": \"notra\",\n \"branch\": \"main\",\n \"token\": \"github_pat_11ABCDEFG...\"\n}"
response = http.request(request)
puts response.read_body{
"github": {
"id": "<string>",
"displayName": "<string>",
"owner": "<string>",
"repo": "<string>",
"defaultBranch": "<string>"
},
"organization": {
"id": "<string>",
"slug": "<string>",
"name": "<string>",
"logo": "<string>"
}
}{
"error": "<string>",
"code": "<string>",
"recovery": "<string>"
}{
"error": "<string>",
"code": "<string>",
"recovery": "<string>"
}{
"error": "<string>",
"code": "<string>",
"recovery": "<string>"
}{
"error": "<string>",
"code": "<string>",
"recovery": "<string>"
}{
"error": "<string>",
"code": "<string>",
"recovery": "<string>"
}{
"error": "<string>",
"limit": 2,
"remaining": 1,
"reset": 123
}{
"error": "<string>",
"code": "<string>",
"recovery": "<string>"
}Authorizations
Send your API key in the Authorization header as Bearer API_KEY.
Body
GitHub user or organization that owns the repository.
1"usenotra"
Repository name without the owner.
1"notra"
Branch to read activity from. Defaults to the repository's default branch.
1"main"
GitHub personal access token with read access to the repository. Required for private repositories; public repositories work without one.
1"github_pat_11ABCDEFG..."
Was this page helpful?