Create a new project
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,"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"}}}'};
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, "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" } } }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Organization identifier
Example
test-orgRequest Bodyrequired
Section titled “Request Bodyrequired”object
Project name
Example
Test ProjectProject machine name
Example
test-projectProject region
Example
auAllow query parameters
Example
trueDisable revisions
Example
falseBasic auth username
Example
adminBasic auth password
Example
secure_password123Apply basic auth to preview domain only
Example
trueEnable the project’s search index. Rejected when the organisation has no search subscription.
Example
trueHow 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
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
XPath for the record title
Example
//h1[1]XPath for the record body
Example
//mainXPath for the record summary
Example
//meta[@name='description'][1]/@contentXPath for the record image
Example
//meta[@property='og:image'][1]/@contentIndex settings. Named algolia for historical reasons; they are applied to whichever backend the project’s platform_mode selects, including Typesense.
object
Fields offered as facets
Example
[ "content_type", "url"]Fields a query matches against
Example
[ "unordered(title)", "unordered(summary)", "unordered(content)"]Fields results may be sorted by
Example
[]Ranking rules, e.g. asc(title)
Example
[ "asc(title)"]Newline-separated synonym groups, each a comma-separated list of terms
Example
car,automobile\ndoc,documentResponses
Section titled “Responses”The request has succeeded and a new resource has been created as a result.
object
Project ID
Project UUID
Project name
Project machine name
Write token for API access
Whether the project’s search index is enabled. Requires an organisation search subscription.
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
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
XPath for the record title
XPath for the record body
XPath for the record summary
XPath for the record image
Index settings. Named algolia for historical reasons; they are applied to whichever backend the project’s platform_mode selects, including Typesense.
object
Fields offered as facets
Fields a query matches against
Fields results may be sorted by
Ranking rules, e.g. asc(title)
Newline-separated synonym groups, each a comma-separated list of terms
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.
object
Error message
Error flag
Example
{ "message": "The requested resource was not found", "error": true}Access is forbidden.
object
Error message
Error flag
Example
{ "message": "The requested resource was not found", "error": true}