The contact form event — send it when a store visitor submits the contact form. Request parameters, notification selection and the response format are described in the [E-shop API overview](https://www.bulkgate.com/en/docs/eshop-api/eshop-api-overview/).

## API URL

The URL used to send the HTTP requests:

```url
https://portal.bulkgate.com/api/1.0/eshop/contact/form
```

> [!NOTE]
> If the request does not reach its destination, repeat it on the [backup server](https://www.bulkgate.com/en/docs/api-administration-tokens/api-backup-server/) `backup1.bulkgate.com`.

## Supported HTTP methods

- `POST` - `application/json`

```http
POST /api/1.0/eshop/contact/form HTTP/1.1
Host: portal.bulkgate.com
Content-Type: application/json
```

## Notification

The portal uses the notification of the `contact_form` event. The form has no fixed variables — send the form fields under your own names and use them in the template (`<name>`). You can send the visitor's message in `customer_message`, for example.

## Request example

```http-json
POST /api/1.0/eshop/contact/form HTTP/1.1
Host: portal.bulkgate.com
Content-Type: application/json

{
  "application_id": 451,
  "application_token": "NKN02TWE6NfBkfl-your-secret-token-Wf05GaqLIWLW4aBj",
  "language": "en",
  "variables": {
    "customer_name": "John Smith",
    "customer_email": "john.smith@example.com",
    "customer_mobile": "777777777",
    "customer_country_id": "cz",
    "customer_message": "Hello, when will size M be back in stock?"
  }
}
```

## Response

```json
{
    "data": {
        "admin": [
            {
                "status": "accepted",
                "message_id": "tmpde1bcd4b1d1",
                "part_id": ["tmpde1bcd4b1d1"],
                "number": "420777777777",
                "channel": "sms"
            }
        ]
    }
}
```

The meaning of the `customer` and `admin` keys, send errors and error types are described in the [E-shop API overview](https://www.bulkgate.com/en/docs/eshop-api/eshop-api-overview/).
