# Convidar admin do canal

POST /newsletter/admin/invite

Envia a um telefone um convite para administrar o canal. O acesso só muda depois que o destinatário aceitar.

## Autenticação

```json
[
  {
    "token": []
  }
]
```

```json
{
  "token": {
    "name": "token",
    "type": "apiKey",
    "in": "header"
  }
}
```

## Corpo da requisição

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "jid",
          "phone"
        ],
        "properties": {
          "jid": {
            "type": "string",
            "description": "JID do canal. Aceita o formato completo `120363123456789012@newsletter` ou apenas o identificador numérico.",
            "example": "120363123456789012@newsletter"
          },
          "phone": {
            "type": "string",
            "example": "5511999999999"
          }
        }
      }
    }
  }
}
```

## Respostas

```json
{
  "200": {
    "description": "Convite enviado com sucesso",
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "required": [
            "response"
          ],
          "properties": {
            "response": {
              "type": "boolean",
              "example": true
            }
          }
        }
      }
    }
  },
  "400": {
    "description": "Payload inválido",
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "error": {
              "type": "string",
              "example": "phone 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 convidar admin",
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "error": {
              "type": "string",
              "example": "connection closed"
            }
          }
        }
      }
    }
  }
}
```

## Guias relacionados

[Autenticação](/docs/authentication) · [Erros e retries](/docs/errors-and-retries) · [Server URL](/docs/server-url)
