# Realtime Tracking API

## POST - Add Creator For Tracking

This API serves the purpose of generating a tracking link specifically designed for the selected influencer, enabling precise monitoring and analytics.

{% embed url="<https://dashboard.ylytic.com/ylytic/api/v1/rt_tracking/creators>" %}

```
curl --location 'https://dashboard.ylytic.com/ylytic/api/v1/rt_tracking/creators' \
--header 'Authorization: Bearer {{auth_token}}' \
--data '{
    "connector" : "instagram",
    "handle" : "rcvjinsta",
    "cron expression": "0 1 * * *",
    "stories_cron_expression": "0 15 * * *",
    "stories_tracking_expiry_at":"2023-12-15 12:10:01.0",
    "tracking_expiry_at":"2023-12-10 12:12:1.0"
}'

```

### POST PARAMS

<table><thead><tr><th width="246">ATTRIBUTES</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td><strong>connector</strong></td><td>The social connector flow that needs to be triggered for the creator. currently supported values are Youtube and Instagram.</td></tr><tr><td><strong>handle</strong></td><td>A handle is the username of a particular creator on Instagram or YouTube.</td></tr><tr><td><strong>cron_expression</strong></td><td>A cron expression is a string format representing a schedule for recurring tasks in a cron job, specifying the timing and frequency of task execution<strong>.</strong></td></tr><tr><td><strong>stories_cron_expression</strong></td><td>is a string representing a schedule in cron format for recurring tasks related to tracking and managing stories on social media platforms.</td></tr><tr><td><strong>stories_tracking_expiry_at</strong></td><td>refers to the timestamp indicating the expiration time or date for tracking events related to stories on social media platforms.</td></tr><tr><td><strong>tracking_expiry_at</strong></td><td>refers to the timestamp denoting the expiration time or date for a tracking event or action in a system or application.</td></tr></tbody></table>

### PAYLOAD

```json
{
    "connector" : "instagram",
    "handle" : "rcvjinsta",
    "cron expression": "0 1 * * *",
    "stories_cron_expression": "0 15 * * *",
    "stories_tracking_expiry_at":"2023-12-15 12:10:01.0",
    "tracking_expiry_at":"2023-12-10 12:12:1.0"
}
```

### &#x20;OUTPUT(JSON)

{% code overflow="wrap" %}

```json
{
    "connector": "instagram",
    "handle": "rcvjinsta",
    "tracking": true,
    "cron_expression": "0 1 * * *",
    "next_tracking_at": "2023-12-23 01:00:00",
    "tracking_expiry_at": "2023-12-10 12:12:01",
    "created_at": "2023-12-22 10:10:03.814000",
    "stories_tracking": true,
    "stories_cron_expression": "0 15 * * *",
    "next_stories_tracking_at": "2023-12-22 15:00:00",
    "stories_tracking_expiry_at": "2023-12-15 12:10:01",
    "event_insights": {
        "total": 0,
        "webhooks_success_total": 0,
        "this_month": 0,
        "webhooks_success_this_month": 0,
        "today": 0,
        "webhooks_success_today": 0,
        "events_datewise_this_month": [],
        "events_creatorwise_this_month": []
    }
}

```

{% endcode %}

## GET - Get Creator

The "Get Creator" API retrieves information about a specific creator from the Ylytic platform, offering insights into audience demographics and engagement metrics.

{% embed url="<https://dashboard.ylytic.com/ylytic/api/v1/rt_tracking/creators/rcvjinsta>" %}

```
curl --location 'https://dashboard.ylytic.com/ylytic//api/v1/rt_tracking/creators/rcvjinsta' \
--header 'Authorization: Bearer {{auth_token}}'
```

### OUTPUT(JSON)

{% code overflow="wrap" %}

```json
{
    "connector": "instagram",
    "handle": "rcvjinsta",
    "tracking": true,
    "cron_expression": "0 1 * * *",
    "next_tracking_at": "2023-12-23 01:00:00",
    "tracking_expiry_at": "2023-12-10 12:12:01",
    "created_at": "2023-12-22 10:10:03.814000",
    "stories_tracking": true,
    "stories_cron_expression": "0 15 * * *",
    "next_stories_tracking_at": "2023-12-22 15:00:00",
    "stories_tracking_expiry_at": "2023-12-15 12:10:01",
    "event_insights": {
        "total": 0,
        "webhooks_success_total": 0,
        "this_month": 0,
        "webhooks_success_this_month": 0,
        "today": 0,
        "webhooks_success_today": 0,
        "events_datewise_this_month": [],
        "events_creatorwise_this_month": []
    }
}


```

{% endcode %}

## PUT - Update Creator Tracking

The "PUT - Update Creator Tracking" API endpoint facilitates the updating of tracking information for a specific creator in the system.

{% embed url="<https://dashboard.ylytic.com/ylytic/api/v1/rt_tracking/creators/rcvjinsta>" %}

```
curl --location --request PUT 'https://dashboard.ylytic.com/ylytic/api/v1/rt_tracking/creators/rcvjinsta' \
--header 'Authorization: Bearer {{auth_token}} \
--data '{
    "tracking" : "False",
    "stories_tracking" : "False",
    "cron_expression":"0 1 * * *",
    "stories_cron_expression":"0 1 * * *",
    "stories_tracking_expiry_at":"2023-12-15 12:10:01.0",
    "tracking_expiry_at":"2023-12-10 12:12:1.0"
}'

```

### POST PARAMS

<table><thead><tr><th width="249">ATTRIBUTES</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td><strong>tracking</strong></td><td>To verify if tracking is currently active, it returns a boolean value.</td></tr><tr><td><strong>story_tracking</strong></td><td>To verify if story tracking is currently active, it returns a boolean value.</td></tr></tbody></table>

### PAYLOAD

```json
{
    "tracking" : "False",
    "stories_tracking" : "False",
    "cron_expression":"0 1 * * *",
    "stories_cron_expression":"0 1 * * *",
    "stories_tracking_expiry_at":"2023-12-15 12:10:01.0",
    "tracking_expiry_at":"2023-12-10 12:12:1.0"
}
```

### OUTPUT (JSON)

{% code overflow="wrap" fullWidth="true" %}

```json
{
    "connector": "instagram",
    "handle": "rcvjinsta",
    "tracking": false,
    "cron_expression": "0 1 * * *",
    "next_tracking_at": "2023-12-23 01:00:00",
    "tracking_expiry_at": "2023-12-10 12:12:01",
    "created_at": "2023-12-22 10:10:03.814000",
    "stories_tracking": false,
    "stories_cron_expression": "0 1 * * *",
    "next_stories_tracking_at": "2023-12-22 15:00:00",
    "stories_tracking_expiry_at": "2023-12-15 12:10:01",
    "event_insights": {
        "total": 0,
        "webhooks_success_total": 0,
        "this_month": 0,
        "webhooks_success_this_month": 0,
        "today": 0,
        "webhooks_success_today": 0,
        "events_datewise_this_month": [],
        "events_creatorwise_this_month": []
    }
}

```

{% endcode %}

## &#x20;POST - Add Post For Tracking

The "POST - Add Post for Tracking" API allows for the inclusion and tracking of posts, providing a method to monitor and analyze specific content within the system.

{% embed url="<https://dashboard.ylytic.com/ylytic/api/v1/rt_tracking/posts>" %}

```
curl --location 'https://dashboard.ylytic.com/ylytic/api/v1/rt_tracking/posts' \
--header 'Authorization: Bearer {{auth_token}}' \
--data '{
    "connector" : "instagram",
    "shortcode" : "C1JjTC-STpl",
    "handle":"brut.india",
    "cron_expression":"0/5 * * * *",
    "tracking_expiry_at": "2024-10-23 12:23:12.12"
}'
```

### POST PARAMS

<table><thead><tr><th width="233">ATTRIBUTES</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td><strong>shortcode</strong></td><td>A ShortCode is the Instagram URL of the profile of the creator, serving as a concise identifier for their account.</td></tr></tbody></table>

### PAYLOAD

```json
{
    "connector" : "instagram",
    "shortcode" : "C1JjTC-STpl",
    "handle":"brut.india",
    "cron_expression":"0/5 * * * *",
    "tracking_expiry_at": "2024-10-23 12:23:12.12"
}
```

### OUTPUT (JSON)

{% code overflow="wrap" fullWidth="true" %}

```json
{
    "connector": "instagram",
    "shortcode": "C1JjTC-STpl",
    "tracking": true,
    "cron_expression": "0/5 * * * *",
    "next_tracking_at": "2023-12-22 10:22:23.774000",
    "tracking_expiry_at": "2024-10-23 12:23:12.120000",
    "created_at": "2023-12-22 10:22:23.774000",
    "event_insights": {
        "total": 0,
        "webhooks_success_total": 0,
        "this_month": 0,
        "webhooks_success_this_month": 0,
        "today": 0,
        "webhooks_success_today": 0,
        "events_datewise_this_month": [],
        "events_creatorwise_posts_this_month": []
    }
}

```

{% endcode %}

## GET - Get Post

The "GET - Get Post" API retrieves information about a specific post, allowing users to access details and analytics associated with the identified content.

{% embed url="<https://dashboard.ylytic.com/ylytic/api/v1/rt_tracking/posts/C1JjTC-STpl>" %}

```
curl --location 'https://dashboard.ylytic.com/ylytic/api/v1/rt_tracking/posts/C1JjTC-STpl' \
--header 'Authorization: Bearer {{auth_token}}' 
```

### OUTPUT (JSON)

{% code overflow="wrap" %}

```json
{
    "connector": "instagram",
    "handle": "rcvjinsta",
    "tracking": true,
    "cron_expression": "0 1 * * *",
    "next_tracking_at": "2023-12-23 01:00:00",
    "tracking_expiry_at": "2023-12-10 12:12:01",
    "created_at": "2023-12-22 10:10:03.814000",
    "stories_tracking": true,
    "stories_cron_expression": "0 15 * * *",
    "next_stories_tracking_at": "2023-12-22 15:00:00",
    "stories_tracking_expiry_at": "2023-12-15 12:10:01",
    "event_insights": {
        "total": 0,
        "webhooks_success_total": 0,
        "this_month": 0,
        "webhooks_success_this_month": 0,
        "today": 0,
        "webhooks_success_today": 0,
        "events_datewise_this_month": [],
        "events_creatorwise_this_month": []
    }
}

```

{% endcode %}

## PUT - Update Post Tracking

The "PUT - Update Post Tracking" API enables the modification and updating of tracking information for a specific post in the system.

{% embed url="<https://dashboard.ylytic.com/ylytic/api/v1/rt_tracking/posts/C1JjTC-STpl>" %}

```
curl --location --request PUT 'https://dashboard.ylytic.com/ylytic/api/v1/rt_tracking/posts/C1JjTC-STpl' \
--header 'Authorization: Bearer {{auth_token}}' \
--data '{
    "connector" : "instagram",
    "tracking": "False",
    "cron_expression" : "*/3 * * * *",
    "tracking_expiry_at": "2024-10-23 12:23:12.12"
}'
```

### PAYLOAD

```json
{
    "connector" : "instagram",
    "tracking": "False",
    "cron_expression" : "*/3 * * * *",
    "tracking_expiry_at": "2024-10-23 12:23:12.12"
}
```

### OUTPUT(JSON)

{% code overflow="wrap" %}

```json
{
    "connector": "instagram",
    "shortcode": "C1JjTC-STpl",
    "tracking": false,
    "cron_expression": "*/3 * * * *",
    "next_tracking_at": "2023-12-22 10:30:00",
    "tracking_expiry_at": "2024-10-23 12:23:12.120000",
    "created_at": "2023-12-22 10:22:23.774000",
    "event_insights": {
        "total": 1,
        "webhooks_success_total": 0,
        "this_month": 1,
        "webhooks_success_this_month": 0,
        "today": 1,
        "webhooks_success_today": 0,
        "events_datewise_this_month": [
            {
                "2023-12-22": 1,
                "webhook_success": 0
            }
        ],
        "events_creatorwise_posts_this_month": [
            {
                "brut.india": 1,
                "webhook_success": 0
            }
        ]
    }
}

```

{% endcode %}

## GET – Tracking Insights

The "GET – Tracking Insights" API provides insights and analytics related to tracking activities, offering valuable information about monitored events and data within the system.

{% embed url="<https://dashboard.ylytic.com/ylytic/api/v1/rt_tracking/insights>" %}

```
curl --location 'https://dashboard.ylytic.com/ylytic/api/v1/rt_tracking/insights' \
--header 'Authorization: Bearer {{auth_token}}'
```


---

# 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.ylytic.com/ylytic/rest-apis/api-overview/realtime-tracking-api.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.
