Create project
curl --request POST \
--url https://app.teamai.com/api/v1/projects \
--header 'Content-Type: application/json' \
--header 'x-teamai-api-key: <api-key>' \
--data '
{
"name": "<string>",
"description": "<string>",
"instructions": "<string>",
"color": "<string>",
"icon": "<string>"
}
'import requests
url = "https://app.teamai.com/api/v1/projects"
payload = {
"name": "<string>",
"description": "<string>",
"instructions": "<string>",
"color": "<string>",
"icon": "<string>"
}
headers = {
"x-teamai-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-teamai-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
instructions: '<string>',
color: '<string>',
icon: '<string>'
})
};
fetch('https://app.teamai.com/api/v1/projects', 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://app.teamai.com/api/v1/projects",
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>',
'instructions' => '<string>',
'color' => '<string>',
'icon' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-teamai-api-key: <api-key>"
],
]);
$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://app.teamai.com/api/v1/projects"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"instructions\": \"<string>\",\n \"color\": \"<string>\",\n \"icon\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-teamai-api-key", "<api-key>")
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://app.teamai.com/api/v1/projects")
.header("x-teamai-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"instructions\": \"<string>\",\n \"color\": \"<string>\",\n \"icon\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.teamai.com/api/v1/projects")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-teamai-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"instructions\": \"<string>\",\n \"color\": \"<string>\",\n \"icon\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"project": {
"id": "<string>",
"name": "<string>",
"description": "<string>",
"color": "<string>",
"icon": "<string>",
"archived": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}
}{
"code": "bad_request",
"message": "<string>",
"details": {}
}{
"code": "bad_request",
"message": "<string>",
"details": {}
}Projects
Create project
POST
/
projects
Create project
curl --request POST \
--url https://app.teamai.com/api/v1/projects \
--header 'Content-Type: application/json' \
--header 'x-teamai-api-key: <api-key>' \
--data '
{
"name": "<string>",
"description": "<string>",
"instructions": "<string>",
"color": "<string>",
"icon": "<string>"
}
'import requests
url = "https://app.teamai.com/api/v1/projects"
payload = {
"name": "<string>",
"description": "<string>",
"instructions": "<string>",
"color": "<string>",
"icon": "<string>"
}
headers = {
"x-teamai-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-teamai-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
instructions: '<string>',
color: '<string>',
icon: '<string>'
})
};
fetch('https://app.teamai.com/api/v1/projects', 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://app.teamai.com/api/v1/projects",
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>',
'instructions' => '<string>',
'color' => '<string>',
'icon' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-teamai-api-key: <api-key>"
],
]);
$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://app.teamai.com/api/v1/projects"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"instructions\": \"<string>\",\n \"color\": \"<string>\",\n \"icon\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-teamai-api-key", "<api-key>")
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://app.teamai.com/api/v1/projects")
.header("x-teamai-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"instructions\": \"<string>\",\n \"color\": \"<string>\",\n \"icon\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.teamai.com/api/v1/projects")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-teamai-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"instructions\": \"<string>\",\n \"color\": \"<string>\",\n \"icon\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"project": {
"id": "<string>",
"name": "<string>",
"description": "<string>",
"color": "<string>",
"icon": "<string>",
"archived": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}
}{
"code": "bad_request",
"message": "<string>",
"details": {}
}{
"code": "bad_request",
"message": "<string>",
"details": {}
}Authorizations
Secret API key created in Workspace Settings → API Keys (workspace keys) or Organization Admin → API Keys (organization keys).
Body
application/json
Response
Created project.
Show child attributes
Show child attributes
Was this page helpful?
⌘I