Pular para o conteúdo

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\"
}"

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.

id
required
string

ULID da tarefa.

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
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."
]
}
}