# Envio de Notificação com Arquivo

## Notification Send File

<mark style="color:green;">`POST`</mark> `https://{SUBDOMAIN}.brpex.com/api/v1/notifications /send-file`

#### Headers

| Name                                      | Type   | Description                                     |
| ----------------------------------------- | ------ | ----------------------------------------------- |
| token\*<mark style="color:red;">\*</mark> | String | As tokens são geradas na configuração do canal. |

#### Request Body

| Name                                      | Type   | Description                                                                   |
| ----------------------------------------- | ------ | ----------------------------------------------------------------------------- |
| file\*<mark style="color:red;">\*</mark>  | String | O arquivo que deseja enviar no formato "base64" ou URL válida.                |
| text                                      | String | Texto que deseja enviar junto ao arquivo.                                     |
| phone\*<mark style="color:red;">\*</mark> |        | Número no formato internacional (DDI + DDD + Número). Exemplo: 5511988887777. |

{% tabs %}
{% tab title="200: OK Mensagem recebidapara fila de envios" %}

```javascript
{
"message": "success" 
}
```

{% endtab %}

{% tab title="400: Bad Request Arquivo não acessível ou inválido" %}

```javascript
{
  "message": "error",
  "errors": "The file is not available",
  "file": "http://meusite.com/img.jpg"
}
```

{% endtab %}

{% tab title="422: Unprocessable Entity Informações insuficientes. Você precisa enviar todos os campos obrigatórios." %}

```javascript
{
   "message": "The given data was invalid.",
  "errors": {
    "phone": [
      "The phone field is required."
    ],
    "file": [
      "The file field is required."
}
```

{% endtab %}

{% tab title="401: Unauthorized Erro de autenticação. Verifique o token informado." %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

\*Campos obrigatórios
