Criar página
POST
/api/seller/external/v1/page
curl --request POST \ "https://api.spelt.com.br/api/seller/external/v1/page" \ --header "Authorization: Bearer splt_live_SUA_CHAVE" \ --header "Content-Type: application/json" \ --header "Accept: application/json" \ --data "{ \"title\": \"architecto\", \"slug\": \"architecto\", \"excerpt\": \"architecto\", \"role\": \"architecto\"}"const url = new URL( "https://api.spelt.com.br/api/seller/external/v1/page");
const headers = { "Authorization": "Bearer splt_live_SUA_CHAVE", "Content-Type": "application/json", "Accept": "application/json",};
let body = { "title": "architecto", "slug": "architecto", "excerpt": "architecto", "role": "architecto"};
fetch(url, { method: "POST", headers, body: JSON.stringify(body),}).then(response => response.json());$client = new \GuzzleHttp\Client();$url = 'https://api.spelt.com.br/api/seller/external/v1/page';$response = $client->post( $url, [ 'headers' => [ 'Authorization' => 'Bearer splt_live_SUA_CHAVE', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'json' => [ 'title' => 'architecto', 'slug' => 'architecto', 'excerpt' => 'architecto', 'role' => 'architecto', ], ]);$body = $response->getBody();print_r(json_decode((string) $body));import requestsimport json
url = 'https://api.spelt.com.br/api/seller/external/v1/page'payload = { "title": "architecto", "slug": "architecto", "excerpt": "architecto", "role": "architecto"}headers = { 'Authorization': 'Bearer splt_live_SUA_CHAVE', 'Content-Type': 'application/json', 'Accept': 'application/json'}
response = requests.request('POST', url, headers=headers, json=payload)response.json()Nasce como rascunho (status = draft), sem conteúdo — o conteúdo vai em PUT /page/{id}/draft.
Authorizations
Seção intitulada “Authorizations”Request Bodyrequired
Seção intitulada “Request Bodyrequired”Media typeapplication/json
object
title
required
Título da página.
string
slug
Opcional Endereço público; vazio deriva do título. 422 se já existir.
string
excerpt
Opcional Resumo (índice público e meta description).
string
role
Opcional Papel institucional: privacy_policy | terms_of_service | refund_policy | data_processing_agreement.
string
Responses
Seção intitulada “Responses”Media typeapplication/json
object
data
object
id
string
title
string
slug
string
status
string
role
string
Example
{ "data": { "id": "01J...", "title": "Termos de Serviço", "slug": "termos-de-servico", "status": "draft", "role": "terms_of_service" }}Media typeapplication/json
object
message
string
Example
{ "message": "A página \"Termos\" já é Termos de Serviço desta conta. Remova o papel dela antes de atribuí-lo a outra."}Media typeapplication/json
object
message
string
errors
object
slug
Array<string>
Example
{ "message": "Erro de validação.", "errors": { "slug": [ "..." ] }}