# Примеры API запросов&#x20;

{% hint style="info" %}
В каждом запросе применяется обязательное значение **api\_token**
{% endhint %}

{% content-ref url="/pages/-Lf\_67vO3P0ws36zwHSn" %}
[Аккаунт](/rabota-s-api/akkaunt.md)
{% endcontent-ref %}

#### Метод <mark style="color:purple;">getMе</mark>

> [https://watbot.ru/api/v1/<mark style="color:purple;">getMe</mark>](https://watbot.ru/api/v1/getMe)?api\_token=Ваштокенwatbot

#### Как выполнить <mark style="color:purple;">getMе</mark> запрос в <mark style="color:red;">http</mark> блоке ?

<figure><img src="/files/cl2pVUHRSrz6tgDPFAXX" alt=""><figcaption></figcaption></figure>

#### **Ответ при успешном выполнении метода** <mark style="color:purple;">getMе</mark>

```json
{
  "data": {
    "id": 1,
    "name": "Дмитрий",
    "phone": null,
    "email": "dmitriy@example.com",
    "created_at": "2019-01-08T16:56:07+00:00"
  }
}
```

#### Метод <mark style="color:purple;">getContacts</mark>

[https://watbot.ru/api/v1/<mark style="color:purple;">getContacts</mark>](https://watbot.ru/api/v1/getContacts)?api\_token=Ваштокенwatbot

#### Как выполнить <mark style="color:purple;">getContacts</mark> запрос в <mark style="color:red;">http</mark> блоке ?

<figure><img src="/files/pXFz505pKa60VePQyFne" alt=""><figcaption></figcaption></figure>

#### **Ответ при успешном выполнении метода** <mark style="color:purple;">getContacts</mark>

```json
{
  "data": [
    {
      "id": 1,
      "bot_id": 1,
      "phone": "79991234567",
      "email": "info@example.com",
      "name": "Иван Иванов",
      "messenger": "whatsapp",
      "address": "г. Москва, ул. Пушкина, д. 5",
      "utm": {
        "utm_source": "landing",
        "utm_medium": "...",
        "utm_campaign": "...",
        "utm_term": "...",
        "utm_content": "..."
      },
      "created_at": "2019-05-10T10:38:28+00:00"
    },
    {
      "id": 2,
      "bot_id": 1,
      "phone": "792712312321",
      "email": null,
      "name": "Петр Петров",
      "messenger": "telegram",
      "telegram_id": "123456",
      "telegram_username": "superman",
      "address": null,
      "utm": null,
      "created_at": "2019-04-02T12:16:16+00:00"
    },
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 1,
    "path": "http:\/\/watbot.ru\/api\/v1\/getContacts",
    "per_page": 500,
    "to": 3,
    "total": 3
  }
}
```

#### Метод [<mark style="color:purple;">getR</mark>](https://watbot.ru/api/v1/getReferrers)<mark style="color:purple;">eferrers</mark>

[https://watbot.ru/api/v1/](https://watbot.ru/api/v1/getContacts)<mark style="color:purple;">getReferrers?</mark>api\_token=Ваштокенwatbot

#### Как выполнить <mark style="color:purple;">getReferrers</mark> запрос в <mark style="color:red;">http</mark> блоке ?

<figure><img src="/files/ILof1JF05sjlXKqQrnck" alt=""><figcaption></figcaption></figure>

#### **Ответ при успешном выполнении метода** <mark style="color:purple;">getReferrers</mark>

<pre class="language-json"><code class="lang-json"><strong>{
</strong>"data":{
"id":1501394,
"bot_id":35396,
"phone":null,
"email":null,
"name":"\u0418\u0433\u043e\u0440\u044c ",
"address":null,
"messenger":"telegram",
"utm":[],
"avatar":"https:\/\/eva.botsister.ru\/0a1f4d26-1e2b-4d91-a16f-801e1b4550df\/1501394.png",
"telegram_id":"1486741815",
"telegram_username":"watbot",
"vk_user_id":null,
"created_at":"2020-01-01T19:48:27+00:00",
"unsubscribed_at":null,
"tags":[],
"variables":[{
"id":17043975323132,
"name":"name",
"type":0,
"value":"\u0418\u0433\u043e\u0440\u044c",
"payload":null,
"deletable":false,
"schema_id":null}]
}
}
</code></pre>

#### Метод [<mark style="color:purple;">decodeShortLink</mark>](#metod-decodeshortlink)

[https://watbot.ru/api/v1/<mark style="color:purple;">decodeShortLink</mark>](#metod-decodeshortlink)<mark style="color:purple;">?url={{$закодированная ссылка на изображения,вида</mark> [<mark style="color:purple;">https://watbot.ru/w/Cra</mark>](https://watbot.ru/w/Cra)<mark style="color:purple;">}}</mark>\&api\_token=Ваштокенwatbot

#### Как выполнить <mark style="color:purple;">decodeShortLink</mark> запрос в <mark style="color:red;">http</mark> блоке ?

<figure><img src="/files/F1pCEPvCABK30dqvw307" alt=""><figcaption></figcaption></figure>

**Ответ при успешном выполнении метода&#x20;**<mark style="color:purple;">**decodeShortLink**</mark>

```json
{
"data":{
"url":"https:\/\/eva.botsister.ru\/53360f7b-7c9e-4b40-8888-edb92998b424\/file-1.jpg?expires_at=1704802035&s=0H75UwNj4lZPjtXd&sign=5c6b338989165e17b423e84d6418f2f43ed93b76cff45c4246be350660f9d6f1"
}
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.watbot.ru/rabota-s-api/primery-api-zaprosov.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
