Slides
Create Slides
Create one or more empty slides in a project in a single atomic call.
POST
/
projects
/
{slug}
/
slides
Create one or more slides
curl --request POST \
--url https://faces.app/api/v1/projects/{slug}/slides \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"slides": [
{
"name": "Hero Section"
}
],
"afterSlideId": "<string>",
"editing": true
}
'import requests
url = "https://faces.app/api/v1/projects/{slug}/slides"
payload = {
"slides": [{ "name": "Hero Section" }],
"afterSlideId": "<string>",
"editing": True
}
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({slides: [{name: 'Hero Section'}], afterSlideId: '<string>', editing: true})
};
fetch('https://faces.app/api/v1/projects/{slug}/slides', 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://faces.app/api/v1/projects/{slug}/slides",
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([
'slides' => [
[
'name' => 'Hero Section'
]
],
'afterSlideId' => '<string>',
'editing' => true
]),
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://faces.app/api/v1/projects/{slug}/slides"
payload := strings.NewReader("{\n \"slides\": [\n {\n \"name\": \"Hero Section\"\n }\n ],\n \"afterSlideId\": \"<string>\",\n \"editing\": true\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://faces.app/api/v1/projects/{slug}/slides")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"slides\": [\n {\n \"name\": \"Hero Section\"\n }\n ],\n \"afterSlideId\": \"<string>\",\n \"editing\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://faces.app/api/v1/projects/{slug}/slides")
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 \"slides\": [\n {\n \"name\": \"Hero Section\"\n }\n ],\n \"afterSlideId\": \"<string>\",\n \"editing\": true\n}"
response = http.request(request)
puts response.read_body{
"slides": [
{
"slideId": "<string>",
"name": "<string>"
}
],
"versionId": "<string>"
}{
"error": "<string>",
"hint": "<string>"
}{
"error": "<string>",
"hint": "<string>"
}Authorizations
API key with "faces_" prefix. Create one at Settings > Developers.
Path Parameters
Body
application/json
Ordered list of slides to create. The first entry is inserted immediately after afterSlideId (or at the end if omitted); each subsequent entry is inserted after the previous one.
Minimum array length:
1Show child attributes
Show child attributes
Insert the new slides immediately after this slide ID. Omit to append at the end.
If true, immediately shows the loading gradient on every new slide. Call finishSlideEditing on each when done.
⌘I
Create one or more slides
curl --request POST \
--url https://faces.app/api/v1/projects/{slug}/slides \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"slides": [
{
"name": "Hero Section"
}
],
"afterSlideId": "<string>",
"editing": true
}
'import requests
url = "https://faces.app/api/v1/projects/{slug}/slides"
payload = {
"slides": [{ "name": "Hero Section" }],
"afterSlideId": "<string>",
"editing": True
}
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({slides: [{name: 'Hero Section'}], afterSlideId: '<string>', editing: true})
};
fetch('https://faces.app/api/v1/projects/{slug}/slides', 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://faces.app/api/v1/projects/{slug}/slides",
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([
'slides' => [
[
'name' => 'Hero Section'
]
],
'afterSlideId' => '<string>',
'editing' => true
]),
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://faces.app/api/v1/projects/{slug}/slides"
payload := strings.NewReader("{\n \"slides\": [\n {\n \"name\": \"Hero Section\"\n }\n ],\n \"afterSlideId\": \"<string>\",\n \"editing\": true\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://faces.app/api/v1/projects/{slug}/slides")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"slides\": [\n {\n \"name\": \"Hero Section\"\n }\n ],\n \"afterSlideId\": \"<string>\",\n \"editing\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://faces.app/api/v1/projects/{slug}/slides")
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 \"slides\": [\n {\n \"name\": \"Hero Section\"\n }\n ],\n \"afterSlideId\": \"<string>\",\n \"editing\": true\n}"
response = http.request(request)
puts response.read_body{
"slides": [
{
"slideId": "<string>",
"name": "<string>"
}
],
"versionId": "<string>"
}{
"error": "<string>",
"hint": "<string>"
}{
"error": "<string>",
"hint": "<string>"
}