Projects
POST /projects
Create a new project
curl -X POST "https://api.example.com/v2/projects" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"name": "New Project",
"description": "Description of the new project",
"status": "active"
}'
import requests
import json
url = "https://api.example.com/v2/projects"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
data = {
"name": "New Project",
"description": "Description of the new project",
"status": "active"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.example.com/v2/projects", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
},
body: JSON.stringify({
"name": "New Project",
"description": "Description of the new project",
"status": "active"
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"name": "New Project",
"description": "Description of the new project",
"status": "active"
}`)
req, err := http.NewRequest("POST", "https://api.example.com/v2/projects", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.example.com/v2/projects')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
request.body = '{
"name": "New Project",
"description": "Description of the new project",
"status": "active"
}'
response = http.request(request)
puts response.body
{
"id": 456,
"name": "My Awesome Project",
"description": "A project for building amazing things",
"status": "active",
"owner_id": 123,
"created_at": "2024-03-01T12:00:00Z",
"updated_at": "2024-12-20T16:45:00Z"
}
POST
/projects
POST
Security Scheme
X-API-Keystring
RequiredAPI key for authentication. Get your API key from the dashboard.
API key for authentication. Get your API key from the dashboard.
Content-Typestring
RequiredThe media type of the request body
Options: application/json
namestring
RequiredMin length: 1 • Max length: 100
descriptionstring
Max length: 500
statusstring
Options: active, draft
Request Preview
Response
Response will appear here after sending the request
Authentication
header
X-API-Keystring
RequiredAPI Key for authentication. API key for authentication. Get your API key from the dashboard.