> For the complete documentation index, see [llms.txt](https://products.monterosa.co/mic/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://products.monterosa.co/mic/platform-extensions/instance-handshake.md).

# Instance handshake

Handshake request from Studio to an Extension

## Instance handshake

<mark style="color:green;">`POST`</mark> `https://example-service.lvis.io/lvis`

#### Request Body

| Name           | Type   | Description                                                      |
| -------------- | ------ | ---------------------------------------------------------------- |
| id             | string | Unique identifier across all platform instances, in UUID format. |
| name           | string | Human-readable platform instance name.                           |
| auth\_endpoint | string | Authentication endpoint.                                         |
| static\_host   | string | Static host, which can be used to fetch public feeds.            |

{% tabs %}
{% tab title="200 Response on the instance handshake request." %}

```javascript
{
  "service_id": "demographics",
  "service_type": "demographics",
  "analytics": true,
  "listings_notifications": false,
  "elements_notifications": false,
  "event_feeds": [
    {
      "id": "results",
      "name": "Segments Results"
    },
    {
      "id": "player_stats",
      "name": "Player statistics"
    }
  ],
  "event_subscription": {
    "types": ["event_created", "event_template_created"],
    "path": "/events_endpoint"
  }
}
```

{% endtab %}
{% endtabs %}

## Example

{% tabs %}
{% tab title="cURL" %}

```bash
curl --request POST \
  --url https://example-extension.mic.io/lvis \
  --header 'Content-Type: application/vnd.api+json' \
  --data '{
    "id": "c068dd33-46c3-4789-a619-b14e4bcbe990",
    "name": "Development instance",
    "auth_endpoint": "https://environment.lvis.io",
    "static_host": "d3mssdvj2sslxw.cloudfront.net"
  }'
```

{% endtab %}

{% tab title="Response" %}

```javascript
{
  "service_id": "demographics",
  "service_type": "demographics",
  "analytics": true,
  "listings_notifications": false,
  "elements_notifications": false,
  "event_feeds": [
    {
      "id": "results",
      "name": "Segments Results"
    },
    {
      "id": "player_stats",
      "name": "Player statistics"
    }
  ],
  "event_subscription": {
    "types": ["event_created", "event_template_created"],
    "path": "/events_endpoint"
  }
}
```

{% endtab %}
{% endtabs %}

### Response parameters

|                         |                                                                                                             |
| ----------------------- | ----------------------------------------------------------------------------------------------------------- |
| service\_id             | 3rd party service identifier                                                                                |
| service\_type           | [Service type](/mic/platform-extensions/overview.md#service-types)                                          |
| analytics               | Optional boolean flag to enable/disable [Analytics API](/mic/platform-extensions/overview.md#analytics-api) |
| listings\_notifications | Flag shows whether [Listings notification](/mic/platform-extensions/overview.md#notifications) enabled      |
| elements\_notifications | Flag shows whether [Elements notification](/mic/platform-extensions/overview.md#notifications) enabled      |
| event\_feeds            | [Service feeds](/mic/platform-extensions/overview.md#service-feeds); Optional                               |
| event\_subscription     | Webhook events subscription configuration. Optional. When omitted, current subscriptions are removed.       |

## Webhook events subscription

In order to subscribe to certain [webhook events](/mic/platform-extensions/webhooks.md), handshake response must contain `event_subscription` object.

```javascript
"event_subscription": {
  "types": ["event_created", "event_template_created"],
  "path": "/events_endpoint"
}
```

`event_subscription.types` - array of supported event types to subscribe.\
`event_subscription.path` - path to the webhook endpoint of the service.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://products.monterosa.co/mic/platform-extensions/instance-handshake.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
