Marcar posts do canal como visualizados
POST /newsletter/viewed
Marca um ou mais posts do canal como visualizados usando serverid.
Observações:
- envie
serveridscom uma lista de posts
Autenticação
[
{
"token": []
}
]
{
"token": {
"name": "token",
"type": "apiKey",
"in": "header"
}
}
Corpo da requisição
{
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"jid",
"serverids"
],
"properties": {
"jid": {
"type": "string",
"description": "JID do canal. Aceita o formato completo `120363123456789012@newsletter` ou apenas o identificador numérico.",
"example": "120363123456789012@newsletter"
},
"serverids": {
"type": "array",
"items": {
"type": "integer"
},
"example": [
12345,
12346
]
}
}
}
}
}
}
Respostas
{
"200": {
"description": "Posts marcados como visualizados",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"response"
],
"properties": {
"response": {
"type": "boolean",
"example": true
}
}
}
}
}
},
"400": {
"description": "Payload inválido ou faltando `serverids`",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"example": "serverids is required"
}
}
}
}
}
},
"401": {
"description": "Instância não autenticada ou cliente não encontrado",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"example": "client not found"
}
}
}
}
}
},
"500": {
"description": "Erro interno ao marcar visualização",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"example": "connection closed"
}
}
}
}
}
}
}