Create a site
curl --request POST \
--url https://api.arg.ai/api/sites \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workspace_id": "<string>",
"slug": "<string>"
}
'import requests
url = "https://api.arg.ai/api/sites"
payload = {
"workspace_id": "<string>",
"slug": "<string>"
}
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({workspace_id: '<string>', slug: '<string>'})
};
fetch('https://api.arg.ai/api/sites', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{}{
"detail": "<string>"
}Sites
Create a site
Create a hosted site that builds from a folder in a workspace.
POST
/
api
/
sites
Create a site
curl --request POST \
--url https://api.arg.ai/api/sites \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workspace_id": "<string>",
"slug": "<string>"
}
'import requests
url = "https://api.arg.ai/api/sites"
payload = {
"workspace_id": "<string>",
"slug": "<string>"
}
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({workspace_id: '<string>', slug: '<string>'})
};
fetch('https://api.arg.ai/api/sites', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{}{
"detail": "<string>"
}Authorizations
bearerAuthapiKeyAuth
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Workspace holding the source files.
Subdomain the site is served on.
Name shown in the product.
Folder to build from. Defaults to the workspace root.
Build preset to use. Detected when omitted.
Who can reach the site.
Response
Successful response
The response is of type object.