curl --request POST \
--url https://api.1club.ai/v1/platform/website/sites \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"templateKey": "<string>",
"name": "<string>",
"clubId": 123
}
'import requests
url = "https://api.1club.ai/v1/platform/website/sites"
payload = {
"templateKey": "<string>",
"name": "<string>",
"clubId": 123
}
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({templateKey: '<string>', name: '<string>', clubId: 123})
};
fetch('https://api.1club.ai/v1/platform/website/sites', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.1club.ai/v1/platform/website/sites",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'templateKey' => '<string>',
'name' => '<string>',
'clubId' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.1club.ai/v1/platform/website/sites"
payload := strings.NewReader("{\n \"templateKey\": \"<string>\",\n \"name\": \"<string>\",\n \"clubId\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.1club.ai/v1/platform/website/sites")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"templateKey\": \"<string>\",\n \"name\": \"<string>\",\n \"clubId\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.1club.ai/v1/platform/website/sites")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"templateKey\": \"<string>\",\n \"name\": \"<string>\",\n \"clubId\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"name": "<string>",
"slug": "<string>",
"domain": "<string>",
"isDefault": true,
"isActive": true,
"clubId": 123,
"url": "<string>",
"previewUrl": "<string>",
"published": true,
"activeReleaseVersion": 123,
"lastPublishedAt": "2023-11-07T05:31:56Z",
"themeSupport": "both",
"defaultTheme": "light",
"supportedLocales": [
"<string>"
],
"defaultLocale": "<string>",
"seoSettings": {
"siteDescription": "<string>",
"defaultOgImage": "<string>",
"verification": {
"google": "<string>",
"bing": "<string>"
}
},
"pages": [
{
"slug": "<string>",
"title": "<string>",
"isHomepage": true,
"sectionCount": 123,
"sectionTypes": [
"<string>"
],
"sections": [
{
"type": "<string>",
"htmlId": "<string>",
"config": {},
"translations": {}
}
],
"metaTitle": "<string>",
"metaDescription": "<string>",
"ogImage": "<string>",
"noindex": true,
"translations": {},
"seo": {
"metaTitle": "<string>",
"metaDescription": "<string>",
"ogImage": "<string>",
"canonicalUrl": "<string>",
"indexable": true,
"notIndexableReason": "page_noindex",
"localizedLocales": [
"<string>"
]
},
"url": "<string>"
}
],
"layout": {
"header": {
"type": "<string>",
"htmlId": "<string>",
"config": {},
"translations": {}
},
"footer": {
"type": "<string>",
"htmlId": "<string>",
"config": {},
"translations": {}
}
},
"hasCustomCss": true,
"updatedAt": "2023-11-07T05:31:56Z"
}{
"id": 123,
"name": "<string>",
"slug": "<string>",
"domain": "<string>",
"isDefault": true,
"isActive": true,
"clubId": 123,
"url": "<string>",
"previewUrl": "<string>",
"published": true,
"activeReleaseVersion": 123,
"lastPublishedAt": "2023-11-07T05:31:56Z",
"themeSupport": "both",
"defaultTheme": "light",
"supportedLocales": [
"<string>"
],
"defaultLocale": "<string>",
"seoSettings": {
"siteDescription": "<string>",
"defaultOgImage": "<string>",
"verification": {
"google": "<string>",
"bing": "<string>"
}
},
"pages": [
{
"slug": "<string>",
"title": "<string>",
"isHomepage": true,
"sectionCount": 123,
"sectionTypes": [
"<string>"
],
"sections": [
{
"type": "<string>",
"htmlId": "<string>",
"config": {},
"translations": {}
}
],
"metaTitle": "<string>",
"metaDescription": "<string>",
"ogImage": "<string>",
"noindex": true,
"translations": {},
"seo": {
"metaTitle": "<string>",
"metaDescription": "<string>",
"ogImage": "<string>",
"canonicalUrl": "<string>",
"indexable": true,
"notIndexableReason": "page_noindex",
"localizedLocales": [
"<string>"
]
},
"url": "<string>"
}
],
"layout": {
"header": {
"type": "<string>",
"htmlId": "<string>",
"config": {},
"translations": {}
},
"footer": {
"type": "<string>",
"htmlId": "<string>",
"config": {},
"translations": {}
}
},
"hasCustomCss": true,
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}Create a website from a Website Template
Builds a new website from a template in GET /templates, as the admin’s template gallery does: the template’s pages, sections and look, with its sample copy rewritten for the business from its own data. A figure or claim the data cannot support is left out. The website is created offline, so nothing is public, and publishing it leaves it offline: taking it online and connecting a domain happen in the admin. Review it with previewUrl.
Asking again for the same template and club, before anyone has edited the website it built, returns that website as it is, its name included, with created: false and a 200, rather than building another. While one is being built, asking again is answered 409. The organization’s other websites are left as they are. Building takes up to a minute, and an organization can build 30 websites an hour. Requires the website:write scope.
curl --request POST \
--url https://api.1club.ai/v1/platform/website/sites \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"templateKey": "<string>",
"name": "<string>",
"clubId": 123
}
'import requests
url = "https://api.1club.ai/v1/platform/website/sites"
payload = {
"templateKey": "<string>",
"name": "<string>",
"clubId": 123
}
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({templateKey: '<string>', name: '<string>', clubId: 123})
};
fetch('https://api.1club.ai/v1/platform/website/sites', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.1club.ai/v1/platform/website/sites",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'templateKey' => '<string>',
'name' => '<string>',
'clubId' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.1club.ai/v1/platform/website/sites"
payload := strings.NewReader("{\n \"templateKey\": \"<string>\",\n \"name\": \"<string>\",\n \"clubId\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.1club.ai/v1/platform/website/sites")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"templateKey\": \"<string>\",\n \"name\": \"<string>\",\n \"clubId\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.1club.ai/v1/platform/website/sites")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"templateKey\": \"<string>\",\n \"name\": \"<string>\",\n \"clubId\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"name": "<string>",
"slug": "<string>",
"domain": "<string>",
"isDefault": true,
"isActive": true,
"clubId": 123,
"url": "<string>",
"previewUrl": "<string>",
"published": true,
"activeReleaseVersion": 123,
"lastPublishedAt": "2023-11-07T05:31:56Z",
"themeSupport": "both",
"defaultTheme": "light",
"supportedLocales": [
"<string>"
],
"defaultLocale": "<string>",
"seoSettings": {
"siteDescription": "<string>",
"defaultOgImage": "<string>",
"verification": {
"google": "<string>",
"bing": "<string>"
}
},
"pages": [
{
"slug": "<string>",
"title": "<string>",
"isHomepage": true,
"sectionCount": 123,
"sectionTypes": [
"<string>"
],
"sections": [
{
"type": "<string>",
"htmlId": "<string>",
"config": {},
"translations": {}
}
],
"metaTitle": "<string>",
"metaDescription": "<string>",
"ogImage": "<string>",
"noindex": true,
"translations": {},
"seo": {
"metaTitle": "<string>",
"metaDescription": "<string>",
"ogImage": "<string>",
"canonicalUrl": "<string>",
"indexable": true,
"notIndexableReason": "page_noindex",
"localizedLocales": [
"<string>"
]
},
"url": "<string>"
}
],
"layout": {
"header": {
"type": "<string>",
"htmlId": "<string>",
"config": {},
"translations": {}
},
"footer": {
"type": "<string>",
"htmlId": "<string>",
"config": {},
"translations": {}
}
},
"hasCustomCss": true,
"updatedAt": "2023-11-07T05:31:56Z"
}{
"id": 123,
"name": "<string>",
"slug": "<string>",
"domain": "<string>",
"isDefault": true,
"isActive": true,
"clubId": 123,
"url": "<string>",
"previewUrl": "<string>",
"published": true,
"activeReleaseVersion": 123,
"lastPublishedAt": "2023-11-07T05:31:56Z",
"themeSupport": "both",
"defaultTheme": "light",
"supportedLocales": [
"<string>"
],
"defaultLocale": "<string>",
"seoSettings": {
"siteDescription": "<string>",
"defaultOgImage": "<string>",
"verification": {
"google": "<string>",
"bing": "<string>"
}
},
"pages": [
{
"slug": "<string>",
"title": "<string>",
"isHomepage": true,
"sectionCount": 123,
"sectionTypes": [
"<string>"
],
"sections": [
{
"type": "<string>",
"htmlId": "<string>",
"config": {},
"translations": {}
}
],
"metaTitle": "<string>",
"metaDescription": "<string>",
"ogImage": "<string>",
"noindex": true,
"translations": {},
"seo": {
"metaTitle": "<string>",
"metaDescription": "<string>",
"ogImage": "<string>",
"canonicalUrl": "<string>",
"indexable": true,
"notIndexableReason": "page_noindex",
"localizedLocales": [
"<string>"
]
},
"url": "<string>"
}
],
"layout": {
"header": {
"type": "<string>",
"htmlId": "<string>",
"config": {},
"translations": {}
},
"footer": {
"type": "<string>",
"htmlId": "<string>",
"config": {},
"translations": {}
}
},
"hasCustomCss": true,
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}Authorizations
Body
Response
The untouched website this template already built for this club, with created false
A website belonging to the organization. Page content, layout and theme tokens describe the draft. url, published, activeReleaseVersion and lastPublishedAt describe what the public is currently being served. name and clubId are live row fields — they take effect without a publish.
The same site rendered from the unpublished draft - the link to review edits before publishing. Carries a signed grant that expires 24 hours after this response was generated; read the website again for a fresh one. Anyone holding the link can view the draft, so it is shareable without a login but should be treated as sensitive.
Was this page helpful?