Skip to main content
PATCH
/
api
/
v1
/
projects
/
{project_id}
Update Project
curl --request PATCH \
  --url https://control-plane.kubiya.ai/api/v1/projects/{project_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "key": "<string>",
  "description": "<string>",
  "goals": "<string>",
  "settings": {},
  "status": "<string>",
  "visibility": "<string>",
  "restrict_to_environment": true,
  "policy_ids": [
    "<string>"
  ],
  "default_model": "<string>"
}
'
import requests

url = "https://control-plane.kubiya.ai/api/v1/projects/{project_id}"

payload = {
"name": "<string>",
"key": "<string>",
"description": "<string>",
"goals": "<string>",
"settings": {},
"status": "<string>",
"visibility": "<string>",
"restrict_to_environment": True,
"policy_ids": ["<string>"],
"default_model": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
key: '<string>',
description: '<string>',
goals: '<string>',
settings: {},
status: '<string>',
visibility: '<string>',
restrict_to_environment: true,
policy_ids: ['<string>'],
default_model: '<string>'
})
};

fetch('https://control-plane.kubiya.ai/api/v1/projects/{project_id}', 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://control-plane.kubiya.ai/api/v1/projects/{project_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'key' => '<string>',
'description' => '<string>',
'goals' => '<string>',
'settings' => [

],
'status' => '<string>',
'visibility' => '<string>',
'restrict_to_environment' => true,
'policy_ids' => [
'<string>'
],
'default_model' => '<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://control-plane.kubiya.ai/api/v1/projects/{project_id}"

payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"key\": \"<string>\",\n \"description\": \"<string>\",\n \"goals\": \"<string>\",\n \"settings\": {},\n \"status\": \"<string>\",\n \"visibility\": \"<string>\",\n \"restrict_to_environment\": true,\n \"policy_ids\": [\n \"<string>\"\n ],\n \"default_model\": \"<string>\"\n}")

req, _ := http.NewRequest("PATCH", 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.patch("https://control-plane.kubiya.ai/api/v1/projects/{project_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"key\": \"<string>\",\n \"description\": \"<string>\",\n \"goals\": \"<string>\",\n \"settings\": {},\n \"status\": \"<string>\",\n \"visibility\": \"<string>\",\n \"restrict_to_environment\": true,\n \"policy_ids\": [\n \"<string>\"\n ],\n \"default_model\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://control-plane.kubiya.ai/api/v1/projects/{project_id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"key\": \"<string>\",\n \"description\": \"<string>\",\n \"goals\": \"<string>\",\n \"settings\": {},\n \"status\": \"<string>\",\n \"visibility\": \"<string>\",\n \"restrict_to_environment\": true,\n \"policy_ids\": [\n \"<string>\"\n ],\n \"default_model\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": "<string>",
  "organization_id": "<string>",
  "name": "<string>",
  "key": "<string>",
  "description": "<string>",
  "goals": "<string>",
  "settings": {},
  "status": "<string>",
  "visibility": "<string>",
  "owner_id": "<string>",
  "owner_email": "<string>",
  "created_at": "<string>",
  "updated_at": "<string>",
  "archived_at": "<string>",
  "restrict_to_environment": false,
  "policy_ids": [],
  "default_model": "<string>",
  "agent_count": 0,
  "team_count": 0
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}

Authorizations

Authorization
string
header
required

Enter your Kubiya API token (format: Bearer )

Path Parameters

project_id
string
required

Body

application/json
name
string | null
key
string | null
description
string | null
goals
string | null
settings
Settings · object | null
status
string | null
visibility
string | null
restrict_to_environment
boolean | null
policy_ids
string[] | null
default_model
string | null

Response

Successful Response

id
string
required
organization_id
string
required
name
string
required
key
string
required
description
string | null
required
goals
string | null
required
settings
Settings · object
required
status
string
required
visibility
string
required
owner_id
string | null
required
owner_email
string | null
required
created_at
string
required
updated_at
string
required
archived_at
string | null
required
restrict_to_environment
boolean
default:false
policy_ids
string[]
default_model
string | null
agent_count
integer
default:0
team_count
integer
default:0