status: published. O slug é derivado do título quando omitido e recebe um sufixo se já existir. Categorias são informadas pelo slug ou pelo nome e criadas quando não existem. A imagem de destaque entra por cover_image_id, o id devolvido por POST /v1/media com purpose=article; vinculada ao artigo, a mídia deixa de expirar. Aceita Idempotency-Key.201: artigo criado; Location aponta para ele.400: corpo inválido, capa que não resolve (inexistente, de outra finalidade ou vencida sem uso) ou autor que não é membro.409 ARTICLE_SLUG_TAKEN: outra gravação tomou o mesmo slug no mesmo instante; repita a chamada.curl --location 'https://api.veploy.com/v1/articles?expand=author' \
--header 'idempotency-key;' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"title": "string",
"slug": "string",
"content": "string",
"excerpt": "string",
"status": "published",
"cover_image_id": "string",
"categories": [
"string"
],
"tags": [
"string"
],
"author_id": "78424c75-5c41-4b25-9735-3c9f7d05c59e",
"published_at": "2019-08-24T14:15:22.123Z"
}'{
"data": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"title": "string",
"slug": "string",
"status": "published",
"excerpt": null,
"content": "string",
"cover_image_id": null,
"cover_image_url": null,
"categories": [
{
"slug": "string",
"name": "string"
}
],
"tags": [
"string"
],
"author_id": "78424c75-5c41-4b25-9735-3c9f7d05c59e",
"author": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"email": "string",
"phone": "string",
"cpf": "string",
"creci": "string",
"birth_date": "string",
"avatar_url": "string",
"role": "string",
"status": "active",
"lead_distribution_enabled": true,
"username": "string",
"invited_at": "2019-08-24T14:15:22.123Z",
"email_confirmed_at": "2019-08-24T14:15:22.123Z",
"created_at": "2019-08-24T14:15:22.123Z"
},
"published_at": "2019-08-24T14:15:22.123Z",
"created_at": "2019-08-24T14:15:22.123Z",
"updated_at": "2019-08-24T14:15:22.123Z"
}
}