curl --request POST \
--url https://sreagent.app/api/v1/config/ticket_integrations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"account_email": "<string>",
"api_token": "<string>",
"auth_url": "<string>",
"base_url": "<string>",
"client_id": "<string>",
"client_secret": "<string>",
"create_project_id": "<string>",
"create_sprint_id": "<string>",
"create_team_id": "<string>",
"enabled": true,
"issue_type": "<string>",
"project_key": "<string>",
"refresh_token": "<string>"
}
'import requests
url = "https://sreagent.app/api/v1/config/ticket_integrations"
payload = {
"account_email": "<string>",
"api_token": "<string>",
"auth_url": "<string>",
"base_url": "<string>",
"client_id": "<string>",
"client_secret": "<string>",
"create_project_id": "<string>",
"create_sprint_id": "<string>",
"create_team_id": "<string>",
"enabled": True,
"issue_type": "<string>",
"project_key": "<string>",
"refresh_token": "<string>"
}
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({
account_email: '<string>',
api_token: '<string>',
auth_url: '<string>',
base_url: '<string>',
client_id: '<string>',
client_secret: '<string>',
create_project_id: '<string>',
create_sprint_id: '<string>',
create_team_id: '<string>',
enabled: true,
issue_type: '<string>',
project_key: '<string>',
refresh_token: '<string>'
})
};
fetch('https://sreagent.app/api/v1/config/ticket_integrations', 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://sreagent.app/api/v1/config/ticket_integrations",
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([
'account_email' => '<string>',
'api_token' => '<string>',
'auth_url' => '<string>',
'base_url' => '<string>',
'client_id' => '<string>',
'client_secret' => '<string>',
'create_project_id' => '<string>',
'create_sprint_id' => '<string>',
'create_team_id' => '<string>',
'enabled' => true,
'issue_type' => '<string>',
'project_key' => '<string>',
'refresh_token' => '<string>'
]),
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://sreagent.app/api/v1/config/ticket_integrations"
payload := strings.NewReader("{\n \"account_email\": \"<string>\",\n \"api_token\": \"<string>\",\n \"auth_url\": \"<string>\",\n \"base_url\": \"<string>\",\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\",\n \"create_project_id\": \"<string>\",\n \"create_sprint_id\": \"<string>\",\n \"create_team_id\": \"<string>\",\n \"enabled\": true,\n \"issue_type\": \"<string>\",\n \"project_key\": \"<string>\",\n \"refresh_token\": \"<string>\"\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://sreagent.app/api/v1/config/ticket_integrations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"account_email\": \"<string>\",\n \"api_token\": \"<string>\",\n \"auth_url\": \"<string>\",\n \"base_url\": \"<string>\",\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\",\n \"create_project_id\": \"<string>\",\n \"create_sprint_id\": \"<string>\",\n \"create_team_id\": \"<string>\",\n \"enabled\": true,\n \"issue_type\": \"<string>\",\n \"project_key\": \"<string>\",\n \"refresh_token\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sreagent.app/api/v1/config/ticket_integrations")
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 \"account_email\": \"<string>\",\n \"api_token\": \"<string>\",\n \"auth_url\": \"<string>\",\n \"base_url\": \"<string>\",\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\",\n \"create_project_id\": \"<string>\",\n \"create_sprint_id\": \"<string>\",\n \"create_team_id\": \"<string>\",\n \"enabled\": true,\n \"issue_type\": \"<string>\",\n \"project_key\": \"<string>\",\n \"refresh_token\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"error": "<string>",
"message": "<string>"
}Create a ticket integration
Save this organization’s credentials for one ticket system, one row per provider. Zoho Sprints authenticates with client_id, client_secret and refresh_token against auth_url; Jira with account_email and api_token. Only the fields you send change, an omitted secret keeps the stored one, and the board columns are mapped with set_ticket_status_map rather than here.
curl --request POST \
--url https://sreagent.app/api/v1/config/ticket_integrations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"account_email": "<string>",
"api_token": "<string>",
"auth_url": "<string>",
"base_url": "<string>",
"client_id": "<string>",
"client_secret": "<string>",
"create_project_id": "<string>",
"create_sprint_id": "<string>",
"create_team_id": "<string>",
"enabled": true,
"issue_type": "<string>",
"project_key": "<string>",
"refresh_token": "<string>"
}
'import requests
url = "https://sreagent.app/api/v1/config/ticket_integrations"
payload = {
"account_email": "<string>",
"api_token": "<string>",
"auth_url": "<string>",
"base_url": "<string>",
"client_id": "<string>",
"client_secret": "<string>",
"create_project_id": "<string>",
"create_sprint_id": "<string>",
"create_team_id": "<string>",
"enabled": True,
"issue_type": "<string>",
"project_key": "<string>",
"refresh_token": "<string>"
}
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({
account_email: '<string>',
api_token: '<string>',
auth_url: '<string>',
base_url: '<string>',
client_id: '<string>',
client_secret: '<string>',
create_project_id: '<string>',
create_sprint_id: '<string>',
create_team_id: '<string>',
enabled: true,
issue_type: '<string>',
project_key: '<string>',
refresh_token: '<string>'
})
};
fetch('https://sreagent.app/api/v1/config/ticket_integrations', 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://sreagent.app/api/v1/config/ticket_integrations",
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([
'account_email' => '<string>',
'api_token' => '<string>',
'auth_url' => '<string>',
'base_url' => '<string>',
'client_id' => '<string>',
'client_secret' => '<string>',
'create_project_id' => '<string>',
'create_sprint_id' => '<string>',
'create_team_id' => '<string>',
'enabled' => true,
'issue_type' => '<string>',
'project_key' => '<string>',
'refresh_token' => '<string>'
]),
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://sreagent.app/api/v1/config/ticket_integrations"
payload := strings.NewReader("{\n \"account_email\": \"<string>\",\n \"api_token\": \"<string>\",\n \"auth_url\": \"<string>\",\n \"base_url\": \"<string>\",\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\",\n \"create_project_id\": \"<string>\",\n \"create_sprint_id\": \"<string>\",\n \"create_team_id\": \"<string>\",\n \"enabled\": true,\n \"issue_type\": \"<string>\",\n \"project_key\": \"<string>\",\n \"refresh_token\": \"<string>\"\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://sreagent.app/api/v1/config/ticket_integrations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"account_email\": \"<string>\",\n \"api_token\": \"<string>\",\n \"auth_url\": \"<string>\",\n \"base_url\": \"<string>\",\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\",\n \"create_project_id\": \"<string>\",\n \"create_sprint_id\": \"<string>\",\n \"create_team_id\": \"<string>\",\n \"enabled\": true,\n \"issue_type\": \"<string>\",\n \"project_key\": \"<string>\",\n \"refresh_token\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sreagent.app/api/v1/config/ticket_integrations")
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 \"account_email\": \"<string>\",\n \"api_token\": \"<string>\",\n \"auth_url\": \"<string>\",\n \"base_url\": \"<string>\",\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\",\n \"create_project_id\": \"<string>\",\n \"create_sprint_id\": \"<string>\",\n \"create_team_id\": \"<string>\",\n \"enabled\": true,\n \"issue_type\": \"<string>\",\n \"project_key\": \"<string>\",\n \"refresh_token\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"error": "<string>",
"message": "<string>"
}Authorizations
An sre_ak_* API key holding the api:admin scope (or api:config_read, which every write refuses with read_only_key).
Body
Which ticket system, one of: zoho_sprints, jira. One connection each.
zoho_sprints, jira Jira only: the account the API token belongs to, as an email address.
Jira only: the API token that account authenticates with. Replaced and refused on the same terms as client_secret.
Zoho Sprints only: the accounts server its access tokens are minted at, which is a different host from the API.
Where the API lives, per customer rather than a constant: Zoho serves seven data centres on seven domains and every Jira is its own host. Required the first time a provider is saved.
Zoho Sprints only: the self-client's id from the Zoho API console.
Zoho Sprints only: the self-client's secret. Sending it replaces whatever is stored; an empty one is refused rather than read as a way to remove it.
Zoho Sprints only: the project a new item is filed into.
Zoho Sprints only: the sprint a new item is filed into.
Zoho Sprints only: the team a new item is filed into. Zoho addresses an item by three ids, so all three are needed to create one, or none of them.
Whether the platform may write into this system. Switched off, the credentials are kept and nothing is sent.
Jira only: the issue type a new issue is filed as, for example Task.
Jira only: the project a new issue is filed into. Without it this connection can comment on an issue and not open one.
Zoho Sprints only: the long-lived token an access token is swapped for on every call. Replaced and refused on the same terms as client_secret.
Response
Created.

