Skip to content

Create a new project

POST
/api/v2/organizations/{organization}/projects
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, "search_enabled": true, "search_config": { "extractors": { "title": "//h1[1]", "content": "//meta[@name='\''description'\''][1]/@content", "summary": "//meta[@name='\''description'\''][1]/@content", "image": "//meta[@property='\''og:image'\''][1]/@content" }, "algolia": { "facets": [ "content_type", "url" ], "searchable_attributes": [ "unordered(title)", "unordered(summary)", "unordered(content)" ], "sortable_attributes": [], "custom_ranking": [ "asc(title)" ], "synonyms": "car,automobile\\ndoc,document" } } }'
organization
required
string

Organization identifier

Example
test-org
Media typeapplication/json
object
name

Project name

string
Example
Test Project
machine_name

Project machine name

string
Example
test-project
region

Project region

string
Example
au
allow_query_params

Allow query parameters

boolean
Example
true
disable_revisions

Disable revisions

boolean
Example
false
basic_auth_username

Basic auth username

string
Example
admin
basic_auth_password

Basic auth password

string
Example
secure_password123
basic_auth_preview_only

Apply basic auth to preview domain only

boolean
Example
true
search_enabled

Enable the project’s search index. Rejected when the organisation has no search subscription.

boolean
Example
true
search_config

How the project builds and serves its search index. A PATCH merges one section at a time, so sending only extractors leaves algolia untouched; within a section a list replaces wholesale.

object
extractors

XPath expressions that decide what each indexed page contributes to a search record. The defaults take the page body from the meta description, which indexes one sentence per page and matches nothing on body text, so a real deployment should set content to the page’s main content region.

object
title

XPath for the record title

string
default: //h1[1]
Example
//h1[1]
content

XPath for the record body

string
default: //meta[@name='description'][1]/@content
Example
//main
summary

XPath for the record summary

string
default: //meta[@name='description'][1]/@content
Example
//meta[@name='description'][1]/@content
image

XPath for the record image

string
default: //meta[@property='og:image'][1]/@content
Example
//meta[@property='og:image'][1]/@content
algolia

Index settings. Named algolia for historical reasons; they are applied to whichever backend the project’s platform_mode selects, including Typesense.

object
facets

Fields offered as facets

Array<string>
Example
[
"content_type",
"url"
]
searchable_attributes

Fields a query matches against

Array<string>
Example
[
"unordered(title)",
"unordered(summary)",
"unordered(content)"
]
sortable_attributes

Fields results may be sorted by

Array<string>
Example
[]
custom_ranking

Ranking rules, e.g. asc(title)

Array<string>
Example
[
"asc(title)"
]
synonyms

Newline-separated synonym groups, each a comma-separated list of terms

string
Example
car,automobile\ndoc,document

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
search_enabled

Whether the project’s search index is enabled. Requires an organisation search subscription.

boolean
search_config
One of:

How the project builds and serves its search index. A PATCH merges one section at a time, so sending only extractors leaves algolia untouched; within a section a list replaces wholesale.

object
extractors

XPath expressions that decide what each indexed page contributes to a search record. The defaults take the page body from the meta description, which indexes one sentence per page and matches nothing on body text, so a real deployment should set content to the page’s main content region.

object
title

XPath for the record title

string
default: //h1[1]
content

XPath for the record body

string
default: //meta[@name='description'][1]/@content
summary

XPath for the record summary

string
default: //meta[@name='description'][1]/@content
image

XPath for the record image

string
default: //meta[@property='og:image'][1]/@content
algolia

Index settings. Named algolia for historical reasons; they are applied to whichever backend the project’s platform_mode selects, including Typesense.

object
facets

Fields offered as facets

Array<string>
searchable_attributes

Fields a query matches against

Array<string>
sortable_attributes

Fields results may be sorted by

Array<string>
custom_ranking

Ranking rules, e.g. asc(title)

Array<string>
synonyms

Newline-separated synonym groups, each a comma-separated list of terms

string
Example
{
"id": 123,
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"name": "Test Project",
"machine_name": "test-project",
"write_token": "abc123token",
"search_enabled": true,
"search_config": {
"extractors": {
"title": "//h1[1]",
"content": "//meta[@name='description'][1]/@content",
"summary": "//meta[@name='description'][1]/@content",
"image": "//meta[@property='og:image'][1]/@content"
},
"algolia": {
"facets": [
"content_type",
"url"
],
"searchable_attributes": [
"unordered(title)",
"unordered(summary)",
"unordered(content)"
],
"sortable_attributes": [],
"custom_ranking": [
"asc(title)"
],
"synonyms": "car,automobile\\ndoc,document"
}
}
}

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
}