# Webhook integration

You can automatically get [leads](/content/help/tpost/n1ngms8gu1-leads-management/index.html) in your Upp app from any external system (CMS, IP telephony, etc.) using a webhook.

### Turn on API requests

First, you should enable API requests in Upp. Open your account settings in the main menu:

"Admin mode" switch must be turned on:

Scroll down and find the "API" section. Turn the "Allow API connections" switch on:

### Enable API for your "business"

Proceed to the Orders section in the main menu:

Open your "business" actions menu and press "Settings":

Open the "API" settings tab and turn the "Webhook" switch on:

You'll get the "Webhook URL" to use in your external system configuration:

### Data structure

Send your data to Upp using the "Webhook URL". Use **POST** method and **JSON** data format:

```
{
  "source": "Lead source",
  "source2": "Lead source comment",
  "name": "Client name",
  "phone": "Client phone number",
  "email": "Client email",
  "address": "Client address",
  "lat": "Map marker latitude",
  "lng": "Map marker longitude",
  "companyname": "Client company name",
  "companyinn": "Client company ID / TIN",
  "descr": "Lead description",
  "u_field": "Some additional field - see below",
  "manageruid": "Upp user UID to assign the lead to (by default the lead will be unassigned)",
  "orderlist": [\
    {\
      "sku": "Item #1 code",\
      "name": "Item #1 name",\
      "quantity": "Quantity",\
      "measure": "Measure unit",\
      "price": "Price"\
    },\
    {\
      "sku": "Item #2 code",\
      "name": "Item #2 name",\
      "quantity": "Quantity",\
      "measure": "Measure unit",\
      "price": "Price"\
    }\
  ]
}
```

All fields except "phone" are not mandatory. You may also send UTMs: _utmsource, utmmedium, utmcampaign, utmcontent, utmterm_

### Sending additional fields

Take a look at the "Fields" tab in your Upp "business" settings:

Scroll down. If you have "Additional fields" in Upp, you can send them to the webhook adding "u_" prefix to the field code. For instance, you have the additional field with code "car":

Then, you can send its value to the webhook as _u_car:_

```
{
  "name": "John",
  "phone": "+12223334455",
  "u_car": "BMW XM",
  ...
}
```

[Orders](/content/help#!/tfeeds/929225792041/c/Orders/index.html)
