curl --request POST \
--url https://api.example.com/api/crew-templates/{template_id}/accept-update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"artifact_id": "<string>",
"version": "<string>"
}
'import requests
url = "https://api.example.com/api/crew-templates/{template_id}/accept-update"
payload = {
"artifact_id": "<string>",
"version": "<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({artifact_id: '<string>', version: '<string>'})
};
fetch('https://api.example.com/api/crew-templates/{template_id}/accept-update', 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.example.com/api/crew-templates/{template_id}/accept-update",
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([
'artifact_id' => '<string>',
'version' => '<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://api.example.com/api/crew-templates/{template_id}/accept-update"
payload := strings.NewReader("{\n \"artifact_id\": \"<string>\",\n \"version\": \"<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://api.example.com/api/crew-templates/{template_id}/accept-update")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"artifact_id\": \"<string>\",\n \"version\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/crew-templates/{template_id}/accept-update")
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 \"artifact_id\": \"<string>\",\n \"version\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"crew_config": {
"agents": [
{
"id": "<string>",
"ref": {
"artifact_id": "<string>",
"version": "<string>"
},
"role": "",
"goal": "",
"backstory": ""
}
],
"tasks": [
{
"description": "<string>",
"agent_index": 0,
"expected_output": "",
"context": [
123
]
}
],
"id": "<string>",
"verbose": false,
"process": "sequential",
"layout": {},
"context_packs": [
{
"artifact_id": "<string>",
"version": "<string>",
"token_budget": 101
}
],
"repository": {
"repos": [
{
"artifact_id": "<string>",
"version": "<string>"
}
],
"branch_prefix": "nx1/",
"max_files": 5,
"max_lines": 200,
"may_open_pr": true,
"may_comment": false
}
},
"tags": [
"<string>"
],
"is_shared": true,
"created_by": "<string>",
"updated_by": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"variables": [
{
"name": "<string>",
"label": "<string>",
"description": "",
"type": "string",
"required": true,
"default": "<unknown>",
"choices": [
"<string>"
],
"min_length": 123,
"max_length": 123,
"min_value": 123,
"max_value": 123,
"sensitive": false,
"group": "<string>",
"show_if": {}
}
],
"pins": [
{
"artifact_id": "<string>",
"kind": "<string>",
"name": "<string>",
"scope": "<string>",
"pinned_version": "<string>",
"agent_index": 123,
"status": "<string>",
"latest_approved_version": "<string>",
"update_available": false,
"blocked_reason": "<string>"
}
],
"lint_warnings": [
"<string>"
]
}{
"error": "<string>",
"code": 500
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Accept an agent update
Pin one of the template’s agents to a newer approved version. A newer version is never applied on its own; this is how the owner takes it.
curl --request POST \
--url https://api.example.com/api/crew-templates/{template_id}/accept-update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"artifact_id": "<string>",
"version": "<string>"
}
'import requests
url = "https://api.example.com/api/crew-templates/{template_id}/accept-update"
payload = {
"artifact_id": "<string>",
"version": "<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({artifact_id: '<string>', version: '<string>'})
};
fetch('https://api.example.com/api/crew-templates/{template_id}/accept-update', 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.example.com/api/crew-templates/{template_id}/accept-update",
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([
'artifact_id' => '<string>',
'version' => '<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://api.example.com/api/crew-templates/{template_id}/accept-update"
payload := strings.NewReader("{\n \"artifact_id\": \"<string>\",\n \"version\": \"<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://api.example.com/api/crew-templates/{template_id}/accept-update")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"artifact_id\": \"<string>\",\n \"version\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/crew-templates/{template_id}/accept-update")
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 \"artifact_id\": \"<string>\",\n \"version\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"crew_config": {
"agents": [
{
"id": "<string>",
"ref": {
"artifact_id": "<string>",
"version": "<string>"
},
"role": "",
"goal": "",
"backstory": ""
}
],
"tasks": [
{
"description": "<string>",
"agent_index": 0,
"expected_output": "",
"context": [
123
]
}
],
"id": "<string>",
"verbose": false,
"process": "sequential",
"layout": {},
"context_packs": [
{
"artifact_id": "<string>",
"version": "<string>",
"token_budget": 101
}
],
"repository": {
"repos": [
{
"artifact_id": "<string>",
"version": "<string>"
}
],
"branch_prefix": "nx1/",
"max_files": 5,
"max_lines": 200,
"may_open_pr": true,
"may_comment": false
}
},
"tags": [
"<string>"
],
"is_shared": true,
"created_by": "<string>",
"updated_by": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"variables": [
{
"name": "<string>",
"label": "<string>",
"description": "",
"type": "string",
"required": true,
"default": "<unknown>",
"choices": [
"<string>"
],
"min_length": 123,
"max_length": 123,
"min_value": 123,
"max_value": 123,
"sensitive": false,
"group": "<string>",
"show_if": {}
}
],
"pins": [
{
"artifact_id": "<string>",
"kind": "<string>",
"name": "<string>",
"scope": "<string>",
"pinned_version": "<string>",
"agent_index": 123,
"status": "<string>",
"latest_approved_version": "<string>",
"update_available": false,
"blocked_reason": "<string>"
}
],
"lint_warnings": [
"<string>"
]
}{
"error": "<string>",
"code": 500
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
ID of the crew template.
Body
Response
Successful Response
Response model for a crew template returned from the API.
Unique ID for the template.
Human-readable name for the template.
What the template does.
The crew configuration saved in this template.
Show child attributes
Show child attributes
Tags for categorizing the template.
True if every user can see this template, false if only its creator can.
Keycloak username of whoever created the template.
Keycloak username of whoever last updated the template.
Creation time of the template. Represented as an ISO 8601 timestamp.
Last update time of the template. Represented as an ISO 8601 timestamp.
Declared inputs the template's tasks reference as {placeholders}. Empty for a free-form template.
Show child attributes
Show child attributes
The registry versions this template pins, with whether a newer approved version is available and anything that stops it running.
Show child attributes
Show child attributes
Authoring-time warnings about drift between the declared variables and the {placeholders} referenced by tasks. Surfaced on create or update. Usually empty on read.
Was this page helpful?

