Gravar rascunho
PUT
/api/seller/external/v1/page/{id}/draft
curl --request PUT \ "https://api.spelt.com.br/api/seller/external/v1/page/iMRSFHQ9TYBYCWTPTRGW5G9ZPYF/draft" \ --header "Authorization: Bearer splt_live_SUA_CHAVE" \ --header "Content-Type: application/json" \ --header "Accept: application/json" \ --data "{ \"blocks\": []}"const url = new URL( "https://api.spelt.com.br/api/seller/external/v1/page/iMRSFHQ9TYBYCWTPTRGW5G9ZPYF/draft");
const headers = { "Authorization": "Bearer splt_live_SUA_CHAVE", "Content-Type": "application/json", "Accept": "application/json",};
let body = { "blocks": []};
fetch(url, { method: "PUT", headers, body: JSON.stringify(body),}).then(response => response.json());$client = new \GuzzleHttp\Client();$url = 'https://api.spelt.com.br/api/seller/external/v1/page/iMRSFHQ9TYBYCWTPTRGW5G9ZPYF/draft';$response = $client->put( $url, [ 'headers' => [ 'Authorization' => 'Bearer splt_live_SUA_CHAVE', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'json' => [ 'blocks' => [], ], ]);$body = $response->getBody();print_r(json_decode((string) $body));import requestsimport json
url = 'https://api.spelt.com.br/api/seller/external/v1/page/iMRSFHQ9TYBYCWTPTRGW5G9ZPYF/draft'payload = { "blocks": []}headers = { 'Authorization': 'Bearer splt_live_SUA_CHAVE', 'Content-Type': 'application/json', 'Accept': 'application/json'}
response = requests.request('PUT', url, headers=headers, json=payload)response.json()Substitui o rascunho inteiro (cria na primeira vez). A versão publicada não muda: publicar é na tela de Páginas.
Authorizations
Seção intitulada “Authorizations”Parameters
Seção intitulada “Parameters”Path Parameters
Seção intitulada “Path Parameters”id
required
string
The ID of the page.
Request Bodyrequired
Seção intitulada “Request Bodyrequired”Media typeapplication/json
object
blocks
required
Envelope Editor.js: { blocks: [{ type, data }] }. Tipos: paragraph, header, list, quote, delimiter, image, table.
object
Responses
Seção intitulada “Responses”Media typeapplication/json
object
data
object
version
integer
updated_at
string
Example
{ "data": { "version": 2, "updated_at": "2026-11-03T10:00:00-03:00" }}Media typeapplication/json
object
message
string
errors
object
blocks.2.data.level
Array<string>
Example
{ "message": "Erro de validação.", "errors": { "blocks.2.data.level": [ "Nível de título inválido. Use 2, 3, 4." ] }}