Create Profile
curl --request POST \
--url https://agentgate.mynewapi.com/api/v1/profiles \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"extends": "<string>",
"loopStrategy": {},
"verification": {},
"gitOps": {},
"executionLimits": {}
}
'import requests
url = "https://agentgate.mynewapi.com/api/v1/profiles"
payload = {
"name": "<string>",
"description": "<string>",
"extends": "<string>",
"loopStrategy": {},
"verification": {},
"gitOps": {},
"executionLimits": {}
}
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({
name: '<string>',
description: '<string>',
extends: '<string>',
loopStrategy: {},
verification: {},
gitOps: {},
executionLimits: {}
})
};
fetch('https://agentgate.mynewapi.com/api/v1/profiles', 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://agentgate.mynewapi.com/api/v1/profiles",
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([
'name' => '<string>',
'description' => '<string>',
'extends' => '<string>',
'loopStrategy' => [
],
'verification' => [
],
'gitOps' => [
],
'executionLimits' => [
]
]),
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://agentgate.mynewapi.com/api/v1/profiles"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"extends\": \"<string>\",\n \"loopStrategy\": {},\n \"verification\": {},\n \"gitOps\": {},\n \"executionLimits\": {}\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://agentgate.mynewapi.com/api/v1/profiles")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"extends\": \"<string>\",\n \"loopStrategy\": {},\n \"verification\": {},\n \"gitOps\": {},\n \"executionLimits\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://agentgate.mynewapi.com/api/v1/profiles")
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 \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"extends\": \"<string>\",\n \"loopStrategy\": {},\n \"verification\": {},\n \"gitOps\": {},\n \"executionLimits\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"name": "<string>",
"description": "<string>",
"extends": "<string>",
"isBuiltIn": true,
"message": "<string>"
}
}Profiles
Create Profile
Create a new harness profile
POST
/
api
/
v1
/
profiles
Create Profile
curl --request POST \
--url https://agentgate.mynewapi.com/api/v1/profiles \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"extends": "<string>",
"loopStrategy": {},
"verification": {},
"gitOps": {},
"executionLimits": {}
}
'import requests
url = "https://agentgate.mynewapi.com/api/v1/profiles"
payload = {
"name": "<string>",
"description": "<string>",
"extends": "<string>",
"loopStrategy": {},
"verification": {},
"gitOps": {},
"executionLimits": {}
}
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({
name: '<string>',
description: '<string>',
extends: '<string>',
loopStrategy: {},
verification: {},
gitOps: {},
executionLimits: {}
})
};
fetch('https://agentgate.mynewapi.com/api/v1/profiles', 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://agentgate.mynewapi.com/api/v1/profiles",
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([
'name' => '<string>',
'description' => '<string>',
'extends' => '<string>',
'loopStrategy' => [
],
'verification' => [
],
'gitOps' => [
],
'executionLimits' => [
]
]),
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://agentgate.mynewapi.com/api/v1/profiles"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"extends\": \"<string>\",\n \"loopStrategy\": {},\n \"verification\": {},\n \"gitOps\": {},\n \"executionLimits\": {}\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://agentgate.mynewapi.com/api/v1/profiles")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"extends\": \"<string>\",\n \"loopStrategy\": {},\n \"verification\": {},\n \"gitOps\": {},\n \"executionLimits\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://agentgate.mynewapi.com/api/v1/profiles")
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 \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"extends\": \"<string>\",\n \"loopStrategy\": {},\n \"verification\": {},\n \"gitOps\": {},\n \"executionLimits\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"name": "<string>",
"description": "<string>",
"extends": "<string>",
"isBuiltIn": true,
"message": "<string>"
}
}Create Profile
Creates a new harness profile with the specified configuration.This endpoint requires authentication.
Request
Unique profile name (1-128 characters, alphanumeric and hyphens)
Profile description
Parent profile to inherit from
Loop strategy configuration
Verification configuration
Git operations configuration
Execution limits configuration
curl -X POST https://agentgate.mynewapi.com/api/v1/profiles \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "my-custom-profile",
"description": "Custom profile for production",
"extends": "ci-focused",
"loopStrategy": {
"type": "hybrid",
"baseIterations": 5,
"bonusIterations": 3
},
"verification": {
"levels": ["L0", "L1", "L2"]
},
"executionLimits": {
"maxIterations": 20
}
}'
Response
Indicates if the request was successful
Example Response
{
"success": true,
"data": {
"name": "my-custom-profile",
"description": "Custom profile for production",
"extends": "ci-focused",
"isBuiltIn": false,
"message": "Profile created successfully"
},
"requestId": "req_abc123"
}
Error Responses
Profile Already Exists
{
"success": false,
"error": {
"code": "CONFLICT",
"message": "Profile already exists: my-custom-profile"
}
}
Parent Profile Not Found
{
"success": false,
"error": {
"code": "BAD_REQUEST",
"message": "Parent profile not found: unknown-parent"
}
}
⌘I