Anexar arquivo à tarefa
POST
/api/seller/external/v1/task/{id}/attachment
curl --request POST \ "https://api.spelt.com.br/api/seller/external/v1/task/architecto/attachment" \ --header "Authorization: Bearer splt_live_SUA_CHAVE" \ --header "Content-Type: application/json" \ --header "Accept: application/json" \ --data "{ \"name\": \"architecto\", \"content\": \"architecto\", \"content_base64\": \"architecto\"}"const url = new URL( "https://api.spelt.com.br/api/seller/external/v1/task/architecto/attachment");
const headers = { "Authorization": "Bearer splt_live_SUA_CHAVE", "Content-Type": "application/json", "Accept": "application/json",};
let body = { "name": "architecto", "content": "architecto", "content_base64": "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/task/architecto/attachment';$response = $client->post( $url, [ 'headers' => [ 'Authorization' => 'Bearer splt_live_SUA_CHAVE', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'json' => [ 'name' => 'architecto', 'content' => 'architecto', 'content_base64' => 'architecto', ], ]);$body = $response->getBody();print_r(json_decode((string) $body));import requestsimport json
url = 'https://api.spelt.com.br/api/seller/external/v1/task/architecto/attachment'payload = { "name": "architecto", "content": "architecto", "content_base64": "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()Envie o nome do arquivo com a extensão e o conteúdo: content para texto (.md, .txt, .csv, .xml) ou
content_base64 para os demais (.pdf, .png, .jpg, .webp, .docx, .xlsx). Até 10 MB por arquivo e 20
anexos por tarefa. Anexo .md ou .txt abre formatado no card, no painel.
Authorizations
Seção intitulada “Authorizations”Parameters
Seção intitulada “Parameters”Path Parameters
Seção intitulada “Path Parameters”id
required
string
ULID da tarefa.
Request Bodyrequired
Seção intitulada “Request Bodyrequired”Media typeapplication/json
object
name
required
Nome do arquivo, com a extensão. Exemplo: briefing.md
string
content
Conteúdo em texto. Informe este ou content_base64.
string
content_base64
Conteúdo em base64, para arquivo que não é texto.
string
Responses
Seção intitulada “Responses”Media typeapplication/json
object
data
object
object
string
id
string
task_id
string
name
string
size
integer
mime_type
string
created_at
string
Example
{ "data": { "object": "task_attachment", "id": "01JA0000000000000000000050", "task_id": "01JA0000000000000000000010", "name": "briefing.md", "size": 1840, "mime_type": "text/plain", "created_at": "2026-11-28T10:00:00-03:00" }}Media typeapplication/json
object
message
string
Example
{ "message": "Esta tarefa já tem o máximo de 20 anexos."}Media typeapplication/json
object
error
string
Example
{ "error": "Recurso não encontrado"}Media typeapplication/json
object
message
string
errors
object
name
Array<string>
Example
{ "message": "Erro de validação.", "errors": { "name": [ "Este tipo de arquivo não é aceito." ] }}