Create Project
curl --request POST \
--url https://partner.peaka.studio/api/v1/organizations/{organizationId}/workspaces/{workspaceId}/projects \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Sample Project Name"
}
'import requests
url = "https://partner.peaka.studio/api/v1/organizations/{organizationId}/workspaces/{workspaceId}/projects"
payload = { "name": "Sample Project Name" }
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: 'Sample Project Name'})
};
fetch('https://partner.peaka.studio/api/v1/organizations/{organizationId}/workspaces/{workspaceId}/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://partner.peaka.studio/api/v1/organizations/{organizationId}/workspaces/{workspaceId}/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' => 'Sample Project Name'
]),
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://partner.peaka.studio/api/v1/organizations/{organizationId}/workspaces/{workspaceId}/projects"
payload := strings.NewReader("{\n \"name\": \"Sample Project Name\"\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://partner.peaka.studio/api/v1/organizations/{organizationId}/workspaces/{workspaceId}/projects")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Sample Project Name\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://partner.peaka.studio/api/v1/organizations/{organizationId}/workspaces/{workspaceId}/projects")
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\": \"Sample Project Name\"\n}"
response = http.request(request)
puts response.read_body{
"id": "URNg0GIj",
"name": "Sample Project Name",
"description": "Non accusantium ducimus accusantium. Laborum eum accusamus sit sit hic eaque doloremque. Occaecati blanditiis facere consequuntur consectetur culpa reiciendis hic tempore dolorem. Saepe impedit nam necessitatibus maxime numquam voluptatum cum. Adipisci mollitia blanditiis sint inventore ex commodi occaecati ipsam quas.",
"domain": "sampleprojectname-cdcn",
"webhookBaseUrl": "https://sampleprojectname-cdcn--test.api.peaka.host",
"createdAt": "2024-09-10T10:11:02.385253956Z",
"workspaceId": "d7f282d2-b392-4b5c-8cea-05f7523df2d2"
}Organization -- Projects
Create Project
Creates a new Project within the given Workspace.
A Project is a unit of work where queries, data tables, and semantic catalogs are managed. Projects live inside Workspaces.
POST
/
organizations
/
{organizationId}
/
workspaces
/
{workspaceId}
/
projects
Create Project
curl --request POST \
--url https://partner.peaka.studio/api/v1/organizations/{organizationId}/workspaces/{workspaceId}/projects \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Sample Project Name"
}
'import requests
url = "https://partner.peaka.studio/api/v1/organizations/{organizationId}/workspaces/{workspaceId}/projects"
payload = { "name": "Sample Project Name" }
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: 'Sample Project Name'})
};
fetch('https://partner.peaka.studio/api/v1/organizations/{organizationId}/workspaces/{workspaceId}/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://partner.peaka.studio/api/v1/organizations/{organizationId}/workspaces/{workspaceId}/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' => 'Sample Project Name'
]),
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://partner.peaka.studio/api/v1/organizations/{organizationId}/workspaces/{workspaceId}/projects"
payload := strings.NewReader("{\n \"name\": \"Sample Project Name\"\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://partner.peaka.studio/api/v1/organizations/{organizationId}/workspaces/{workspaceId}/projects")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Sample Project Name\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://partner.peaka.studio/api/v1/organizations/{organizationId}/workspaces/{workspaceId}/projects")
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\": \"Sample Project Name\"\n}"
response = http.request(request)
puts response.read_body{
"id": "URNg0GIj",
"name": "Sample Project Name",
"description": "Non accusantium ducimus accusantium. Laborum eum accusamus sit sit hic eaque doloremque. Occaecati blanditiis facere consequuntur consectetur culpa reiciendis hic tempore dolorem. Saepe impedit nam necessitatibus maxime numquam voluptatum cum. Adipisci mollitia blanditiis sint inventore ex commodi occaecati ipsam quas.",
"domain": "sampleprojectname-cdcn",
"webhookBaseUrl": "https://sampleprojectname-cdcn--test.api.peaka.host",
"createdAt": "2024-09-10T10:11:02.385253956Z",
"workspaceId": "d7f282d2-b392-4b5c-8cea-05f7523df2d2"
}
Authorizations
Use the Authorization header with the value 'Bearer ' to authenticate. Partner API Keys have full access; Project API Keys are limited to their project scope. Learn more: https://docs.peaka.com/api-reference/authentication
Path Parameters
ID of the Organization
ID of the Workspace
Body
application/json
Project to create
Response
200 - application/json
Project created
Project
Project ID
Project name
Descriptive text about the project
Domain of the project
Webhook base URL
The date and time the project was created
The owner of the project
The workspace to which the project belongs
⌘I