> For the complete documentation index, see [llms.txt](https://popin.gitbook.io/popin-developer-hub/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://popin.gitbook.io/popin-developer-hub/1-many-integration-api-guide.md).

# 1:Many Integration API Guide

This API supports the following core functions:

* Capturing customer leads
* Retrieving available conference slots
* Registering a user for an event
* Canceling (unregistering) a user’s event registration

All requests **must be authenticated** using API headers.

***

### Base URL

```
https://widget01.popin.to
```

***

### Authentication

All API requests require the following headers:

```
X-API-KEY: your-api-key  
X-TOKEN: seller-id
```

If the API key is missing or invalid, the API responds with:

**401 — Unauthorized**

***

### Endpoints Overview

All endpoints below are consistent across vendors.

***

## 1. Capture Customer Lead

**POST** `/api/v1/external/conference/capture`

Used to add a new customer lead into the system.

#### Request Body

```json
{
  "name": "John Doe",
  "mobile": "+919544510895"
}
```

#### Success Response — 200

```json
{
  "status": 1,
  "user_id": 12345
}
```

#### Error Responses

* **401** Unauthorized
* **422** Validation Error

  ```json
  {
    "message": "Validation failed",
    "errors": {
      "mobile": ["Invalid phone number"]
    }
  }
  ```

***

## 2. Get Available Conference Slots

**GET** `/api/v1/external/conference/slots`

Used to fetch available conference events for a customer.

#### Two Usage Modes

**A. Customer-specific slots (pass user\_id)**

Example:

```
https://widget01.popin.to/api/v1/external/conference/slots?user_id=68806
```

This returns slots relevant to the specified user, including registered events.

**B. General slots (no user\_id required)**

If you need a **general event-slots link** that can be shared with **any customer**,\
**you can call the same endpoint&#x20;*****without*****&#x20;passing `user_id`.**

Example:

```
https://widget01.popin.to/api/v1/external/conference/slots
```

This returns **generic available slots** that are not user-specific.

***

#### Success Response — 200

```json
{
  "status": 1,
  "events": [
    {
      "id": 2195,
      "name": "Public Macbook demo",
      "date": "02",
      "month": "Dec",
      "time": "04:05 pm",
      "end_time": "04:20 pm",
      "can_join": false,
      "join_url": "https://test-meet.popin.to/rooms/5f3d-b5ca/Njg4MDY="
    },
    {
      "id": 2853,
      "name": "iPhone demo",
      "date": "02",
      "month": "Dec",
      "time": "05:30 pm",
      "end_time": "05:45 pm",
      "can_join": false,
      "join_url": "https://test-meet.popin.to/rooms/30fd-d333/Njg4MDY="
    }
  ],
  "registeredEvents": []
}
```

#### Error Responses

* **401** Unauthorized
* **422** Validation Error

***

## 3. Register User for Event

**POST** `/api/v1/external/conference/register`

Registers a customer for a selected event.

#### Request Body

```json
{
  "user_id": 12345,
  "event_id": 678
}
```

#### Success Response — 200

```json
{
  "status": 1,
  "contact": "+919544510895"
}
```

#### Error Responses

* **401** Unauthorized
* **422** Validation Error

***

## 4. Cancel User Event Registration

**POST** `/api/v1/external/conference/cancel`

Cancels a user's registration from an event.

#### Request Body

```json
{
  "user_id": 12345,
  "event_id": 678
}
```

#### Success Response — 200

```json
{
  "status": 1
}
```

#### Error Responses

* **401** Unauthorized
* **422** Validation Error

***

## Data Models

#### CaptureRequest

```json
{
  "name": "string",
  "mobile": "string"
}
```

#### CaptureResponse

```json
{
  "status": 1,
  "user_id": 12345
}
```

#### SlotsResponse

```json
{
  "status": 1,
  "events": [ConferenceEvent],
  "registeredEvents": [1]
}
```

#### RegisterRequest

```json
{
  "user_id": 123,
  "event_id": 456
}
```

#### RegisterResponse

```json
{
  "status": 1,
  "contact": "string"
}
```

#### ValidationError

```json
{
  "message": "string",
  "errors": {
    "field": ["validation message"]
  }
}
```
