Aceitar convite de admin do canal
POST /newsletter/admin/accept
Aceita um convite pendente e torna a conta conectada administradora do canal informado.
Autenticação
[
{
"token": []
}
]
{
"token": {
"name": "token",
"type": "apiKey",
"in": "header"
}
}
Corpo da requisição
{
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"jid"
],
"properties": {
"jid": {
"type": "string",
"description": "JID do canal. Aceita o formato completo `120363123456789012@newsletter` ou apenas o identificador numérico.",
"example": "120363123456789012@newsletter"
}
}
}
}
}
}
Respostas
{
"200": {
"description": "Convite aceito com sucesso",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"response"
],
"properties": {
"response": {
"type": "boolean",
"example": true
}
}
}
}
}
},
"400": {
"description": "JID inválido",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"example": "invalid newsletter jid"
}
}
}
}
}
},
"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 aceitar convite de admin",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"example": "connection closed"
}
}
}
}
}
}
}