Create a new project
POST
/api/v2/organizations/{organization}/projects
const url = 'https://dashboard.quantcdn.io/api/v2/organizations/test-org/projects';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"Test Project","machine_name":"test-project","region":"au","allow_query_params":true,"disable_revisions":false,"basic_auth_username":"admin","basic_auth_password":"secure_password123","basic_auth_preview_only":false}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://dashboard.quantcdn.io/api/v2/organizations/test-org/projects \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "Test Project", "machine_name": "test-project", "region": "au", "allow_query_params": true, "disable_revisions": false, "basic_auth_username": "admin", "basic_auth_password": "secure_password123", "basic_auth_preview_only": false }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”organization
required
string
Organization identifier
Example
test-orgRequest Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
Project name
string
Example
Test Projectmachine_name
Project machine name
string
Example
test-projectregion
Project region
string
Example
auallow_query_params
Allow query parameters
boolean
Example
truedisable_revisions
Disable revisions
boolean
Example
falsebasic_auth_username
Basic auth username
string
Example
adminbasic_auth_password
Basic auth password
string
Example
secure_password123basic_auth_preview_only
Apply basic auth to preview domain only
boolean
Example
trueResponses
Section titled “Responses”The request has succeeded and a new resource has been created as a result.
Media typeapplication/json
object
id
required
Project ID
integer
uuid
required
Project UUID
string
name
required
Project name
string
machine_name
required
Project machine name
string
write_token
Write token for API access
string
Example
{ "id": 123, "uuid": "550e8400-e29b-41d4-a716-446655440000", "name": "Test Project", "machine_name": "test-project", "write_token": "abc123token"}The server could not understand the request due to invalid syntax.
Media typeapplication/json
object
message
required
Error message
string
error
required
Error flag
boolean
Example
{ "message": "The requested resource was not found", "error": true}Access is forbidden.
Media typeapplication/json
object
message
required
Error message
string
error
required
Error flag
boolean
Example
{ "message": "The requested resource was not found", "error": true}