Create project
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
slug: '<string>',
organizationId: '<string>',
description: '<string>',
metadata: {}
})
};
fetch('https://api.example.com/v1/regions/global/projects', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/regions/global/projects"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"organizationId\": \"<string>\",\n \"description\": \"<string>\",\n \"metadata\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}curl --request POST \
--url https://api.example.com/v1/regions/global/projects \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"slug": "<string>",
"organizationId": "<string>",
"description": "<string>",
"metadata": {}
}
'import requests
url = "https://api.example.com/v1/regions/global/projects"
payload = {
"name": "<string>",
"slug": "<string>",
"organizationId": "<string>",
"description": "<string>",
"metadata": {}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"id": "<string>",
"name": "<string>",
"slug": "<string>",
"organizationId": "<string>",
"description": "<string>",
"metadata": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}Projects
Create project
Create a new project within the current organization
POST
/
v1
/
regions
/
global
/
projects
Create project
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
slug: '<string>',
organizationId: '<string>',
description: '<string>',
metadata: {}
})
};
fetch('https://api.example.com/v1/regions/global/projects', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/regions/global/projects"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"organizationId\": \"<string>\",\n \"description\": \"<string>\",\n \"metadata\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}curl --request POST \
--url https://api.example.com/v1/regions/global/projects \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"slug": "<string>",
"organizationId": "<string>",
"description": "<string>",
"metadata": {}
}
'import requests
url = "https://api.example.com/v1/regions/global/projects"
payload = {
"name": "<string>",
"slug": "<string>",
"organizationId": "<string>",
"description": "<string>",
"metadata": {}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"id": "<string>",
"name": "<string>",
"slug": "<string>",
"organizationId": "<string>",
"description": "<string>",
"metadata": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}Body
application/json
Was this page helpful?