# Introduction

{% hint style="warning" %}
The InEvent API URL is now hosted under the **api** subdomain. Requests like `https://inevent.com/api/`should now be sent to `https://api.inevent.com/`

For other regions, please refer to our [Regions guide](/introduction/regions).

**Please change your environment to reflect this change by December 1st, 2024.**
{% endhint %}

InEvent philosophy is "if there's no REST documentation for this module, it doesn't exist". Since the very beginning of InEvent, every single module has been documented and has its own endpoint available to be used, meaning that you can rebuild the entire platform on top of our REST API.

Before we get started, there are a few concepts of the API we must go through. The API was originally built as an RPC API, a procedural look and feel, that later on got updated to a RESTful API - a simplified version with only `GET` and `POST` methods. Here are two examples for the RPC API and for the RESTful API:

#### RPC way

```sh
curl --request GET \
     --url 'https://api.inevent.com/?action=activity.find&tokenID=YOUR_TOKEN_HERE&eventID=YOUR_EVENT_ID_HERE' \
     --header 'Accept: application/json'
```

#### RESTful way

```sh
curl --request GET \
     --url 'https://api.inevent.com/activity/find?tokenID=YOUR_TOKEN_HERE&eventID=YOUR_EVENT_ID_HERE' \
     --header 'Accept: application/json'
```

All endpoints are supported on both **RPC** and **RESTful** and there are no plans for deprecation. Our `SDK` uses the **RPC** way and this will be the way we will follow throughout the entire documentation.

Once you decide your preferred way to integrate, you must know how to authenticate to our **API**, but to do that, you must know how to run a `POST` operation with contents on the InEvent API. Here is a code example of a `POST` operation and its response:

#### `POST` operation example

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

```sh
curl --request POST \
     --url 'https://api.inevent.com/?action=event.person.operate&tokenID=YOUR_TOKEN_HERE&eventID=YOUR_EVENT_ID_HERE&key=FIELD_HERE' \
     --header 'Accept: application/json' \
     --header 'Content-Type: application/x-www-form-urlencoded' \
     --data value=NEW_VALUE
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.inevent.com/?action=event.person.operate&tokenID=YOUR_TOKEN_HERE&eventID=YOUR_EVENT_ID_HERE&key=FIELD_HERE",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "value=NEW_VALUE",
  CURLOPT_HTTPHEADER => [
    "Accept: application/json",
    "Content-Type: application/x-www-form-urlencoded"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
var axios = require("axios").default;

var options = {
  method: 'POST',
  url: 'https://api.inevent.com/',
  params: {
    action: 'event.person.operate',
    tokenID: 'YOUR_TOKEN_HERE',
    eventID: 'YOUR_EVENT_ID_HERE',
    key: 'YOUR_KEY_HERE'
  },
  headers: {
    Accept: 'application/json',
    'Content-Type': 'application/x-www-form-urlencoded'
  },
  data: {
    value: 'NEW_VALUE'
  }
};

axios.request(options).then(function (response) {
  console.log(response.data);
}).catch(function (error) {
  console.error(error);
});
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.inevent.com/"

querystring = {
  "action": "event.person.operate",
  "tokenID":"YOUR_TOKEN_HERE",
  "eventID":"YOUR_EVENT_ID_HERE",
  "key":"YOUR_KEY_HERE"
}

payload = "value=NEW_VALUE"
headers = {
    "Accept": "application/json",
    "Content-Type": "application/x-www-form-urlencoded"
}

response = requests.request("POST", url, data=payload, headers=headers, params=querystring)

print(response.text)
```

{% endtab %}
{% endtabs %}

Note that the request body `Content-Type` is always of type `application/x-www-form-urlencoded` and the response will always be of type `application/json`. The response will always respect the structure provided on the example below (with a few exceptions). Here is a response example:

#### Response example

```json
{
  "count": 1,
  "data": [{
    "personID": "string",
    "name": "string",
    "email": "string",
    "headline": "string",
    "image": "string",
    "telephone": "string",
    "city": "string",
    "facebookID": "string",
    "linkedInID": "string",
    "enrollmentID": "string",
    "approved": "string",
    "level": "string",
    "paid": "string",
    "present": "string",
    "private": "string"
  }]
}
```


# Company environment

The company environment is any page that is limited to a single `namespace` (or `nickname`) on its URL that its dashboard will give a full company level view and its public page will give you the **Company directory**.

Within this environment you can control your company admins, billing of your account, all tools and permissions for your entire account, all hosted events within that account, your project manager information, global cross-event reports and setting pages for all your third-party connectors like `Salesforce` or `Marketo`.

<br>


# Event environment

The event environment is any page that is limited to a double `namespace` (or `nickname`) on its URL that its dashboard will give a full event level view and its public page will give you pages like the **Virtual Lobby**, **Public Website** and others.

Within this environment you can control your event admins and attendees, all tools and permissions for your event, event registration, event schedule, event interactive modules (questions, chat and others), emails, reports, among others.


# Regions

InEvent support multiple regions, to use the API in the right region your data is hosted, simply pay attention to the TLD (Top Level Domain). For example:

* InEvent Americas API Url: `api.inevent`**`.com`**
* InEvent Europe API Url: `api.inevent`**`.uk`**


# Best practices

#### Response type

The InEvent API will always give you a consistent `response` when successful and a `bodiless` response in case it fails. Here is an example of a successful response:

```json
{
  "count": 1,
  "data": [
    {
      "personID": "1",
      "firstName": "Mauricio",
      "lastName": "Giordano",
      "name": "Mauricio Giordano",
      "username": "giordano@inevent.com",
      "email": "giordano@inevent.com",
      "image": "",
      "timezone": "",
      "telephone": "",
      "facebookID": "",
      "linkedInID": "",
      "twitterID": "",
      "date": "1593719050",
      "tokenID": "YOUR_TOKEN_HERE",
      "scope": "system",
      "targetID": "0"
    }
  ]
}
```

And here is an example of a unsuccessful one:

```
400 attribute cannot be empty
```

#### Pagination

To paginate on `.get` and `.find` endpoints, you must use the `limit` and `offset` query attributes. The `limit` query attribute is set to **20** by default and can go up to **100**. The `offset` query attribute is an integer that describes the index of the last item on the previous page.

#### Rate limit

You might get blocked if you exceed **10** API calls per second on a single `tokenID` or **100** API calls per second on the same machine.


# Data types

The InEvent API accepts multiple types of data and we will describe it here for you.

* **String**: regular strings that may or may not allow HTML content (depends on the attribute);
* **Boolean**: boolean values are always stored as 0 or 1;
* **Date Time**: dates and times are always stored as Unix timestamps;

All values are always sent as Strings (cast), even when they are numbers.


# Spreadsheet reports

Spreadsheet reports can be generated on selected endpoints -- usually the ones ending with `.find` -- and can be triggered by sending a query attribute `format` with value `excel-daemon`. They take a while to generate -- can be several minutes depending on the data size -- and can be accessed via company dashboard on **Reports > Download center** or via API.

To access spreadsheet reports via API, you can run the following API call:

```sh
curl --request GET \
     --url 'https://api.inevent.com/?action=download.find&tokenID=YOUR_TOKEN_HERE&companyID=YOUR_COMPANY_ID_HERE' \
     --header 'Accept: application/json'
```


# How it works

To access the InEvent API, you'll need an access token. How you get this token depends on if your app is for your own usage or for the public's usage.

Generate an **Access Token** if you're using the API to access data in your own InEvent workspace.\
Use OAuth if you're building a publicly-available app that accesses other people's InEvent data (in construction).

To access endpoints that require authentication you must send the `tokenID` **query parameter** in your API call, like the example below:

```sh
curl -X GET "https://api.inevent.com/?action=api.describe&tokenID=YOUR_TOKEN_HERE"
```

Every time you see a `tokenID` parameter, it means the endpoint requires authentication and that you must use your encrypted **Access Token** as value for that parameter. Also, every token has a *scope* and we have a couple of different *scopes* you can use, and for a given *scope*, you may have different *permission levels* for that **Access Token**.


# Permission levels

Your user may have different **Permission levels** on `Companies` and `Events`, and the **Permission level** will determine what operation your user can do and what information it can access. Here we will describe the **Permission levels** and its functionalities for each environment.

### Company environment

On the Company environment, there are two **Permission levels**: `Admin` and `External user`.

* The `Admin` permission level gives the user **FULL ACCESS** to the entire Company environment, **including** all its contained Event environments.
* The `External user` permission level has multiple layers that can be set-up using the `Profiles` API module. By default, the `External user` permission level has only access to *Event Booking Forms* and *Custom Forms*.

### Event environment

On the Event environment, there are six **Permission levels**: `Admin`, `Staff`, `Speaker`, `Data Collector`, `Translator` and `User`.

* The `Admin` permission level gives the user **FULL ACCESS** to the entire Event environment.
* The `Staff` permission level gives the user **FULL ACCESS** to all public pages and functions of the Event environment, but blocks access to the dashboard.
* The `Presenter` permission level gives the user special access to all *Sessions* on the Event environment, and it's often used to give Camera and Microphone access across all sessions inside the **Virtual Lobby**.
* The `Data Collector` permission level gives the user API access to certain endpoints with quicker & condensed data, specially the `event.person.find` endpoint with unlimited pagination limit.
* The `Interpreter` permission level gives the user access to the *Audio Interpretation* and *Manual Transcription* consoles on the **Virtual Lobby** inside the Event environment.
* The `User` permission level gives access to all the event content tailored to the user inside the Event environment.

### Permission level API mapping

Here is a mapping of permission levels that our API will give you:

| Level name     | Level key         | Level numeric value |
| -------------- | ----------------- | ------------------- |
| User           | LEVEL\_USER       | 1                   |
| Admin          | LEVEL\_ADMIN      | 4                   |
| Staff          | LEVEL\_STAFF      | 64                  |
| Presenter      | LEVEL\_SPEAKER    | 128                 |
| Data Collector | LEVEL\_COLLECTOR  | 256                 |
| Interpreter    | LEVEL\_TRANSLATOR | 32768               |


# Token scopes

The InEvent **Access Token** has a few different scopes that limits its usage for certain endpoints and operations. Depending on the scope in use, you might get different responses for the same `API call`, usually with limited information for the given scope.

### System scope

This is the scope that gives full access to all your **Access Token** capabilities, essentially allowing it to do all operations that **Access Token** is allowed to. If you are an administrator of a `Company` or an `Event`, this scope will give full access to all data contained in those modules.

### Event scope

This scope gives you limited access to a single `Event` your **Access Token** can access. When accessing it using credentials limited to the **Event scope**, in case your user has `Admin` permission level on the Event environment, it will be automatically downgraded to `User` permission level. To gain full `Admin` permission level on the Event environment, you must use credentials associated to the **System scope**.

### How to differentiate scopes

The **System scope** is accessible through the `person.signIn` endpoint without using the `eventID` query attribute. Also, it has its own password specific for its scope.

The **Event scope** is accessible through the `person.signIn` endpoint while using the `eventID` query attribute. It has a different password than the **System scope**. In case you use the same password as the **System scope**, you will get a **System scope** access token.

**PS:** Event `Magic Links` are always limited to the **Event scope**.


# Access token

To retrieve your access token you can simply run the following `API call` with your **System scope** password. In case you want to retrieve your **Event scope** token, you must include the `eventID` query attribute and use your **Event scope** password.

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

```sh
curl --request POST \
     --url 'https://api.inevent.com/?action=person.signIn&username=YOUR_USERNAME_HERE' \
     --header 'Accept: application/json' \
     --header 'Content-Type: application/x-www-form-urlencoded' \
     --data password=YOUR_PASSWORD_HERE
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.inevent.com/?action=person.signIn&username=YOUR_USERNAME_HERE",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "password=YOUR_PASSWORD_HERE",
  CURLOPT_HTTPHEADER => [
    "Accept: application/json",
    "Content-Type: application/x-www-form-urlencoded"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
var axios = require("axios").default;

var options = {
  method: 'POST',
  url: 'https://api.inevent.com/',
  params: {
    action: 'person.signIn',
    username: 'YOUR_USERNAME_HERE'
  },
  headers: {
    Accept: 'application/json',
    'Content-Type': 'application/x-www-form-urlencoded'
  },
  data: {
    password: 'YOUR_PASSWORD_HERE'
  }
};

axios.request(options).then(function (response) {
  console.log(response.data);
}).catch(function (error) {
  console.error(error);
});
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.inevent.com/"

querystring = {"action":"person.signIn","username":"YOUR_USERNAME_HERE"}

payload = "password=YOUR_PASSWORD_HERE"
headers = {
    "Accept": "application/json",
    "Content-Type": "application/x-www-form-urlencoded"
}

response = requests.request("POST", url, data=payload, headers=headers, params=querystring)

print(response.text)
```

{% endtab %}
{% endtabs %}

Here is an example of response you will get if successful:

```json
{
  "count": 1,
  "data": [
    {
      "personID": "1",
      "firstName": "Mauricio",
      "lastName": "Giordano",
      "name": "Mauricio Giordano",
      "username": "giordano@inevent.com",
      "email": "giordano@inevent.com",
      "image": "",
      "timezone": "",
      "telephone": "",
      "facebookID": "",
      "linkedInID": "",
      "twitterID": "",
      "date": "1593719050",
      "tokenID": "YOUR_TOKEN_HERE",
      "scope": "system",
      "targetID": "0"
    }
  ]
}
```

The `tokenID` value will be accessible through the following path: `response["data"][0]["tokenID"]`.

<br>


# Creating events

To create events you must have a **System scope** access token with full access to a company environment. You must have in hands the following query attributes: `tokenID` `companyID`, and the following body attributes: `name` and `nickname`.

* `name` is the Event name;
* `nickname` is the string that will be used in the browser URL to access the event;

#### Example

The endpoint that you should use is `company.event.bind` on RCP or `company/event/bind` on RESTful.

Here is how to create an event:

```sh
curl --request POST \
     --url 'https://api.inevent.com/?action=company.event.bind&companyID=YOUR_COMPANY_ID' \
     --header 'Accept: application/json' \
     --header 'Content-Type: application/x-www-form-urlencoded' \
     --data name=This%20is%20a%20test%20event&nickname=my-test-event-1632854490
```

If you want to copy data from a previous event you can use the `siblingID` query attribute with the previous `eventID` as the value.

If you want to create an event based on a template you can use the `templateID` query attribute with the id of the template as the value.

If you want this event to be a template you can use the `isTemplate` query attribute with `1` as the value. Templates have limited functionality and its purpose is only to create the bare essentials for your events.

#### Response

Once you create the event, you will get a response similar to the following one:

JSON

```json
{
  "count": 1,
  "data": [{
    "eventID": "73565",
    "name": "This is a test event",
    "nickname": "my-test-event-1632854490",
    "emailAddress": "",
    "emailName": "",
    "emailDNS": "0",
    "emailReplyTo": "",
    "description": "",
    "background": "",
    "cover": "https://inevent.com/images/default/default_event.png",
    "coverVideo": "",
    "welcomeOverlay": "1",
    "activityLayout": "small",
    "fontFamily": "",
    "page": "",
    "contentPage": "",
    "ownerID": "",
    "creatorID": "1330",
    "dateCreated": "1632854490",
    "dateBegin": "1632840090",
    "dateEnd": "1634064090",
    "enrollmentBegin": "1616942490",
    "enrollmentEnd": "1660329690",
    "accessEnd": "1790606490",
    "quarter": "Q3",
    "eventDays": "14",
    "month": "September",
    "capacity": "0",
    "invites": "0",
    "guestsForMember": "1",
    "keywords": "",
    "timezone": "America/New_York",
    "currency": "USD",
    "latitude": "0",
    "longitude": "0",
    "spot": "",
    "placeID": "",
    "address": "",
    "city": "",
    "state": "",
    "fugleman": "",
    "ebEventID": "",
    "ticketURL": "",
    "language": "",
    "contentLanguage": "",
    "googleAnalytics": "",
    "googleTagManager": "",
    "facebookPixel": "",
    "linkedInPixel": "",
    "intercomTag": "",
    "website": "",
    "faq": "",
    "agreement": "",
    "facebook": "",
    "instagram": "",
    "twitter": "",
    "rss": "",
    "cname": "",
    "archived": "0",
    "visible": "1",
    "published": "1",
    "public": "1",
    "presential": "0",
    "budget": "0",
    "automaticEnrollment": "1",
    "sandbox": "0",
    "vlTemplate": "neo",
    "vlControlRoomLayout": "",
    "vlBackgroundIdle": "",
    "vlJoinBeforeStarts": "0",
    "vlJoinAfterEnds": "0",
    "vlNetworkingRouletteTimer": "00:00:00",
    "meetingStartTime": "8:00",
    "meetingEndTime": "20:00",
    "meetingDurationTime": "30",
    "accessCode": "0000",
    "wireless": "",
    "templateID": "",
    "companyID": "918",
    "hasTag": "0",
    "hasFeedback": "1",
    "hasPhoto": "0",
    "hasMaterial": "0",
    "hasSponsor": "0",
    "systemLevel": "8251",
    "companyLevel": "4",
    "personID": "1330",
    "role": "",
    "company": "",
    "level": "4",
    "approved": "1",
    "templateName": "",
    "templateColor": "",
    "isSponsor": "0",
    "placeName": "",
    "happeningNow": "1",
    "happeningAfter": "0",
    "peopleCount": "1"
  }]
}
```

The URL to access the event will then be the following:

* <https://inevent.com/en/YOUR_COMPANY_NICKNAME/my-test-event-163285449/>

Once the event is created, you can now manage it accessing the URL above or manage it entirely through the API.


# Editing events

To edit event details, such as name, location, description, visibility and more, you must use the `event.edit` endpoint operation. Any edit will reflect the event pages right away and data that is not intrinsic to the event model can't be edited over here (like tools, forms, emails and others), they will be discussed on their own API model guide.

#### Keys allowed

```json
{
    "name": "event name",
    "nickname": "event url path",
    "email": "organization email",
    "description": "general description (summary of event) - accepts HTML content",
    "cover": "cover image url",
    "dateBegin": "begin date (timestamp)",
    "dateEnd": "end date (timestamp)",
    "enrollmentBegin": "timestamp from begin of enrollment",
    "enrollmentEnd": "timestamp from end of enrollment",
    "latitude": "latitude",
    "longitude": "longitude",
    "address": "address on google map",
    "fugleman": "organization name",
    "website": "website url",
    "accessCode": "event access code (in case it's private)",
    "facebook": "facebook page url",
    "twitter": "twitter profile url",
    "wireless": "wireless network information (wifi)",
    "visible": "visibility (boolean - 0 & 1)",
    "public": "privacy (boolean - 0 & 1)",
    "automaticEnrollment": "automatic enrollment (mobile app - boolean - 0 & 1)"
}
```

#### Example

This endpoint allows you to edit one field at a time and it expects the following query attributes: `tokenID`, `eventID` and `key` and the following body attribute: `value`. Please see the example below.

```sh
curl --request POST \
     --url 'https://api.inevent.com/?action=event.edit&tokenID=YOUR_TOKEN_HERE&eventID=YOUR_EVENT_ID&key=name' \
     --header 'Accept: application/json' \
     --header 'Content-Type: application/x-www-form-urlencoded' \
     --data value=NewName!
```


# Listing events

To list all events in your company environment you may use the `company.event.find` endpoint with multiple filters and pagination. The required query attributes for this endpoint are `tokenID`, `companyID` and `selection`, and we have several optional attributes for filtering and pagination.

#### `Selection` query attribute

The `selection` query attribute accepts the following values:

```json
{
    "my-events-created": "Events I've created",
    "my-events": "Events I'm the host",
    "next-events": "Next events",
    "past-events": "Past events",
    "current-events": "Current events",
    "single-day-events": "Single day events",
    "multi-day-events": "Multi day events",
    "online-events": "Online events",
    "presential-events": "Presential events",
    "tags": "Tags",
    "archived": "Archived",
    "not-archived": "Not archived",
    "all": "All",
    "best-fit": "Best fit",
    "approved": "Approved",
    "enrolled": "Enrolled",
    "denied": "Denied",
    "paid": "Paid",
    "present": "Present",
    "working": "Working"
}
```

The `selection` query attribute allows *stacking* (AND operation) by separating values with a pipe. Example: `selection=my-events|next-events`. It also allows complex stacking for a certain key, like `tags`. Example: `selection=my-events|next-events|tags:29124,4255`.

#### Key-value filtering

We also have the following optional query attributes as filters:

```json
{
    "name": "event name",
    "city": "city name",
    "dateBegin": "event's begin date",
    "dateEnd": "event's end date",
    "presential": "face-to-face event",
    "public": "public event",
    "visible": "visible event",
    "archived": "show archived events",
    "templateID": "template event",
    "placeID": "place for event",
    "order": "results order",
    "timezone": "timezone to search the dates of the event",
    "tags": "tag ids separated by commas"
}
```

You can also use `query` and `queryKey` instead of using the field name as the query attribute directly if you prefer.

#### Pagination

To paginate you can use `limit` and `offset` query attributes and to get the total amount of events listed in your account (used to build pagination UI and calculate the amount of pages) you should send the `paginated` query attribute with value `1`.

#### Ordering

To order the events you can use the following query attributes: `order` and `orderOrientation`. The `orderOrientation` attribute accepts `ASC` (ascending) and `DESC` (descending) as values\
and the `order` query attribute accepts the following values:

```json
[
    "eventID",
    "name",
    "nickname",
    "dateBegin",
    "dateEnd",
    "city",
    "entries",
    "approved",
    "placeName"
]
```

#### Example

Here is an example of this API call:

```sh
curl --request GET \
     --url 'https://api.inevent.com/?action=company.event.find&tokenID=YOUR_TOKEN_HERE&companyID=YOUR_COMPANY_ID_HERE&limit=100&offset=0&paginated=1' \
     --header 'Accept: application/json'
```

#### Spreadsheet reports

To generate a spreadsheet report out of that API call, you can send the `format` attribute with the value `excel-daemon`. Excel spreadsheets takes a while to generate and they will show up in your `Report center`, but you can also retrieve them using the `download.find` endpoint.


# Custom domain

To setup a custom domain for your event you must first have a DNS provider that allows `CNAME` for root and subdomains. Some DNS providers don't allow using `CNAME` for root domains (@), so in that case you must get the IP Address of our **Load Balancer**, however, we don't guarantee that the IP Address will not change, so we encourage you to always use a `CNAME` instead of `A` record.

#### CNAME

Your `CNAME` must point to the following address:

* North America region: `pages.inevent.com`;
* Europe region: `pages.inevent.uk`;

Once you have your `CNAME` set, you can now enable it using the API or using your admin dashboard. If you open your domain without setting up in your event, you will get an error message in the loaded page.

#### Using the Admin Dashboard

To setup a custom using the admin dashboard, please refer to our [FAQ Article](https://faq.inevent.com/l/en/in-event-registration/custom-domain#event_level).

#### Using the API

You can setup the custom domain by using the `event.edit` endpoint (please check [Editing events](https://developers.inevent.com/docs/editing-events) article) and the `cname` key with your domain as the `value`.

#### SSL Certificate

The SSL Certificate will be generated automatically (may take a couple of minutes) and will only support TLSv1.2.


# Creating attendees

There are two scopes that can be used to create Event Attendees:

* Admin scope (using the **System scope** access token);
* Anonymous scope (without using any access tokens);

### Admin scope

To create event attendees using the admin scope, you must have a **System scope** access token with full access to the company or event environment. You must have in hands the following query attributes: `tokenID` `eventID`, and the following body attributes: `name` and `username`.

* `name` is the Attendee name;
* `username` is an username, its value can be an email address -- recommended in case you have `username` disabled in your event settings;

#### Example

The endpoint that you should use is `event.person.bind` on RCP or `event/person/bind` on RESTful.

Here is how to create an attendee:

```sh
curl --request POST \
     --url 'https://api.inevent.com/?action=event.person.bind&eventID=YOUR_EVENT_ID' \
     --header 'Accept: application/json' \
     --header 'Content-Type: application/x-www-form-urlencoded' \
     --data name=Mauricio%20Giordano&username=mauriciogior&company=InEvent
```

You can also provide extra parameters to be added directly in the creation of the attendee (they are all optional):

| Field name    | Description                                                                                                                                                                                                                          |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| email         | The attendee email address. If you leave this field empty **and** the username is an email, it will be used the username as its value automatically.                                                                                 |
| role          | The attendee job title.                                                                                                                                                                                                              |
| company       | The attendee company.                                                                                                                                                                                                                |
| telephone     | The attendee telephone.                                                                                                                                                                                                              |
| origin        | The origin of the creation (can be any string -- "my-api-integration" for instance). Useful to track where attendees came from.                                                                                                      |
| createSpeaker | Should it create a speaker profile for this attendee (accepts boolean **0** or **1**, defaults to 0).                                                                                                                                |
| level         | A numeric representation of the attendee permission level within the event environment. Defaults to `LEVEL_USER`. You can find a mapping [here](https://developers.inevent.com/docs/permission-levels#permission-level-api-mapping). |

#### Response

Once you create the attendee, you will get a response similar to the following one:

```json
{
  "count": 1,
  "data": [
    {
      "username": "mauriciogior",
      "facebookID": "0",
      "linkedInID": "",
      "twitterID": "",
      "email": "",
      "telephone": "",
      "qrCode": "31cb6bbc7e13bb9b5e1d2eb4e403f59d77fda4b004da0c82fdf1ed5d71d97d8c",
      "ebQrCode": "",
      "nfc": "",
      "eventID": "5",
      "personID": "185",
      "firstName": "Mauricio",
      "lastName": "Giordano",
      "name": "Mauricio Giordano",
      "personName": "Mauricio Giordano",
      "role": "",
      "company": "InEvent",
      "summary": "",
      "image": "",
      "headline": " @ InEvent",
      "personHeadline": " @ InEvent",
      "city": "",
      "facebook": "",
      "linkedIn": "",
      "twitter": "",
      "instagram": "",
      "website": "",
      "position": "42",
      "level": "1",
      "ebUserID": "",
      "mkUserID": "0",
      "approved": "1",
      "paid": "0",
      "rsvp": "-1",
      "present": "0",
      "message": "",
      "private": "0",
      "meetingQuotaID": "0",
      "meetingAutoConfirm": "1",
      "engagement": "0",
      "language": "en",
      "personLanguage": "en",
      "origin": "panel",
      "salesforceID": "",
      "salesforceType": "",
      "hubspotID": "",
      "enrollmentDate": "1634691218",
      "updatedDate": "",
      "meetingQuotaName": "",
      "meetingQuotaAmount": "0",
      "device": "none",
      "downloaded": "0",
      "favorite": "0",
      "ally": "0",
      "isSponsor": "0",
      "prints": "0",
      "profileID": "",
      "ticketID": "",
      "assistantEmail": "",
      "ticketName": "",
      "ticketEntrance": "",
      "tags": [],
      "speakerID": ""
    }
  ]
}
```

### Anonymous scope

To create an attendee using the anonymous scope, you will need an event with proper settings that allows users to enroll without a **ticket** or an **invite** (although it's doable using the **invite** attribute as long as the email is on your Invitees List). You must have in hands the following query attribute: `eventID`, and the following body attributes: `firstName`, `lastName`, `email` and `feedbackContent`.

* `firstName` is the Attendee first name;
* `lastName` is the Attendee last name;
* `email` is the Attendee email;
* `feedbackContent` is an Array with custom fields (accepts empty array in case no required custom fields exist);

{% hint style="info" %}

### Custom fields

In case you have **required** custom fields, you must send them through the **feedbackContent** as an Array of Objects with the following attributes: *feedbackID* and *value*.

**Example:**\
`[ {"feedbackID": "1234", "value": "My answer 1"}, {"feedbackID": "2345", "value": "My answer 2"} ]`

In case you have an `API Field` key set for your custom field, you can use the following format:\
`{"f_question_1": "My answer 1", "f_question_2": "My answer 2"}`

Please note that in this case, it should be an Object instead of an Array.
{% endhint %}

#### Example

The endpoint that you should use is `form.respondRegistration` on RCP or `form/respondRegistration` on RESTful.

Here is how to create an attendee:

```sh
curl --request POST \
     --url 'https://api.inevent.com/?action=form.respondRegistration&eventID=YOUR_EVENT_ID' \
     --header 'Accept: application/json' \
     --header 'Content-Type: application/x-www-form-urlencoded' \
     --data firstName=Mauricio&lastName=Giordano&email=example@email.com&company=InEvent&feedbackContent=[]
```

You can also provide extra parameters to be added directly in the creation of the attendee (they are all optional):

| Field name | Description                                                                                                          |
| ---------- | -------------------------------------------------------------------------------------------------------------------- |
| username   | If you leave it blank, it will be the same as the email address.                                                     |
| invite     | In case you have the **Invite Requirement** setting enabled, you must send the email here as well.                   |
| image      | The URL of the attendee profile picture.                                                                             |
| password   | The attendee password to access the platform -- if you leave it blank, it will generate a random password.           |
| role       | The attendee job title.                                                                                              |
| company    | The attendee company.                                                                                                |
| telephone  | The attendee telephone.                                                                                              |
| rsvp       | A numeric boolean 0 or 1 (defaults to 0) to indicate if the attendee RSVPed to the event.                            |
| login      | A numeric boolean 0 or 1 (defaults to 0) to indicate if the response should contain the user access token `tokenID`. |
| tagIDs     | A list of `tagIDs` separated by comma (only Attendee-type tags are allowed).                                         |
| private    | A numeric boolean 0 or 1 (defaults to 0) to indicate if this user has its profile set as private.                    |

#### Response

Once you create the attendee, you will get a response similar to the following one:

```json
{
  "count": 1,
  "data": [
    {
      "username": "example@email.com",
      "facebookID": "0",
      "linkedInID": "",
      "twitterID": "",
      "email": "",
      "telephone": "",
      "qrCode": "31cb6bbc7e13bb9b5e1d2eb4e403f59d77fda4b004da0c82fdf1ed5d71d97d8c",
      "ebQrCode": "",
      "nfc": "",
      "eventID": "5",
      "personID": "185",
      "firstName": "Mauricio",
      "lastName": "Giordano",
      "name": "Mauricio Giordano",
      "personName": "Mauricio Giordano",
      "role": "",
      "company": "InEvent",
      "summary": "",
      "image": "",
      "headline": " @ InEvent",
      "personHeadline": " @ InEvent",
      "city": "",
      "facebook": "",
      "linkedIn": "",
      "twitter": "",
      "instagram": "",
      "website": "",
      "position": "42",
      "level": "1",
      "ebUserID": "",
      "mkUserID": "0",
      "approved": "1",
      "paid": "0",
      "rsvp": "-1",
      "present": "0",
      "message": "",
      "private": "0",
      "meetingQuotaID": "0",
      "meetingAutoConfirm": "1",
      "engagement": "0",
      "language": "en",
      "personLanguage": "en",
      "origin": "panel",
      "salesforceID": "",
      "salesforceType": "",
      "hubspotID": "",
      "enrollmentDate": "1634691218",
      "updatedDate": "",
      "meetingQuotaName": "",
      "meetingQuotaAmount": "0",
      "device": "none",
      "downloaded": "0",
      "favorite": "0",
      "ally": "0",
      "isSponsor": "0",
      "prints": "0",
      "profileID": "",
      "ticketID": "",
      "assistantEmail": "",
      "ticketName": "",
      "ticketEntrance": "",
      "tags": [],
      "speakerID": ""
    }
  ]
}
```


# Editing attendees

### Editing regular fields

To edit attendee details, such as first name, last name, job title and more, you must use the `event.person.operate` endpoint operation. To access this API, you must have in hands an access token with full Event Environment (or Company Environment) permission on **System scope** or the attendee's own access token.

#### Keys allowed

```json
{
    "name": "attendee full name",
    "firstName": "attendee first name",
    "lastName": "attendee last name",
    "email": "attendee email",
    "password": "attendee password",
    "role": "attendee job title",
    "company": "attendee company name",
    "summary": "attendee bio",
    "image": "attendee profile picture (url)",
    "telephone": "attendee telephone",
    "city": "attendee city",
    "facebook": "attendee facebook profile (url)",
    "linkedin": "attendee linkedin profile (url)",
    "twitter": "attendee twitter profile (url)",
    "instagram": "attendee instagram profile (url)",
    "website": "attendee website (url)",
    "message": "attendee itinerary message (only admin access token)",
    "language": "attendee preferred language (ISO 639-1 format)",
    "private": "attendee profile privacy (0 or 1)",
    "rsvp": "attendee rsvp status (0 or 1)",
    "present": "attendee attendance status (0 or 1)",
    "level": "attendee permission level (numeric)",
    "nfc": "attendee nfc base64 tag",
    "ticketID": "attendee ticket in use (only admin access token)",
    "profileID": "attendee custom permission profile (only admin access token)",
    "assistantEmail": "the assistant email this attendee will get emails from (only admin access token)",
    "tagIDs": "attendee tags (separated by comma)"
}
```

If you are using an admin access token with **System scope** and Event Environment (or Company Environment) full access, you must provide the `personID` query attribute in the request, otherwise you will edit your own user credentials (as long as you are an attendee).

#### Operation modes

You can either operate on attendee fields using one field at a time (one update per request) or several fields at the same time. To update one field at a time, you must provide the field key on the `key` query attribute and its value on the `value` body attribute. To update several fields at a time, you must provide a `content` body attribute with an Array of Objects `{key:value}` as demonstrated below:

```json
[
    {"key": "firstName", "value": "Mauricio"},
    {"key": "lastName", "value": "Giordano"}
]
```

#### Example

This endpoint allows you to edit the attendee regular fields and it expects the following query attributes: `tokenID`, `eventID`, `personID` and `key` and the following body attribute: `value`. Please see the example below.

```sh
curl --request POST \
     --url 'https://api.inevent.com/?action=event.person.operate&tokenID=YOUR_TOKEN_HERE&eventID=YOUR_EVENT_ID&key=firstName&personID=PERSON_ID' \
     --header 'Accept: application/json' \
     --header 'Content-Type: application/x-www-form-urlencoded' \
     --data value=NewName!
```

#### Response

```json
{
  "count": 1,
  "data": [
    {
      "username": "example@email.com",
      "facebookID": "",
      "linkedInID": "",
      "twitterID": "",
      "email": "example@email.com",
      "telephone": "+1 999-999-9999",
      "qrCode": "7d288b89132c2623411306de5eb8150c7f152f1b7e96e094df6ddf35d12c6f37",
      "ebQrCode": "",
      "nfc": "",
      "eventID": "5",
      "personID": "1",
      "firstName": "NewName",
      "lastName": "Giordano",
      "name": "NewName Giordano",
      "personName": "NewName Giordano",
      "role": "CTO",
      "company": "InEvent",
      "summary": "",
      "image": "https://cdn.inevent.com/1/0/c98558f90829a4c99569808e255c682f6874ac72.png",
      "headline": "CTO @ InEvent",
      "personHeadline": "CTO @ InEvent",
      "city": "",
      "facebook": "",
      "linkedIn": "",
      "twitter": "",
      "instagram": "",
      "website": "",
      "position": "34",
      "level": "4",
      "ebUserID": "",
      "mkUserID": "0",
      "approved": "1",
      "paid": "0",
      "rsvp": "-1",
      "present": "1",
      "message": "",
      "private": "0",
      "meetingQuotaID": "0",
      "meetingAutoConfirm": "1",
      "engagement": "0",
      "language": "en",
      "personLanguage": "en",
      "origin": "panel",
      "salesforceID": "003f40000150VhbAAE",
      "salesforceType": "Contact",
      "hubspotID": "",
      "enrollmentDate": "1626126916",
      "updatedDate": "1634693525",
      "meetingQuotaName": "",
      "meetingQuotaAmount": "0",
      "device": "none",
      "downloaded": "0",
      "favorite": "0",
      "ally": "0",
      "isSponsor": "1",
      "prints": "0",
      "profileID": "",
      "ticketID": "3",
      "assistantEmail": "",
      "ticketName": "Ticket 125",
      "ticketEntrance": "",
      "tags": [
        {
          "tagID": "50",
          "eventID": "5",
          "name": "Artificial Intelligence",
          "color": "#9F0F4F",
          "type": "person"
        },
        {
          "tagID": "4",
          "eventID": "5",
          "name": "Machine Learning",
          "color": "#FF0000",
          "type": "person"
        }
      ],
      "speakerID": ""
    }
  ]
}
```

### Editing custom fields

To edit custom fields, you must use the endpoint `feedback.respond`. You must provide the `tokenID` and `eventID` query attributes, the `personID` query attribute in case you are an admin with Event Environment (or Company Environment) access on **System scope** access token trying to edit a specific attendee of the event, and the `content` body attribute.

The `content` body attribute consists of either an Array of Objects `[{feedbackID, value}]` or an Object `{feedbackKey:value}` (in case you have the `API Field` set for your custom fields).

Here is an example using the Array of Objects option:

```json
[
  { "feedbackID": "1", "value": "A" },
  { "feedbackID": "2", "value": "B" },
  { "feedbackID": "3", "value": "C" }
]
```

Here is an example using the Object option (`API Field` enabled):

```json
{
  "f_field_1": "A",
  "f_field_2": "B",
  "f_field_3": "C"
}
```

The advantage of using the `API Field` option is when you copy your event or when you create a template, the API call will be the exact same, whereas the `feedbackID` option will change the IDs.

#### Example

This endpoint allows you to edit the attendee custom fields and it expects the following query attributes: `tokenID`, `eventID`, `personID` and the following body attribute: `content`. Please see the example below.

```sh
curl --request POST \
     --url 'https://api.inevent.com/?action=feedback.respond&tokenID=YOUR_TOKEN_HERE&eventID=YOUR_EVENT_ID&personID=PERSON_ID' \
     --header 'Accept: application/json' \
     --header 'Content-Type: application/x-www-form-urlencoded' \
     --data content={"f_field_1":"A","f_field_2":"B"}
```

#### Response

```json
{
  "count": 0,
  "data": []
}
```

The response is always empty for this request.


# Removing attendees

To remove an attendee, you must use the `event.person.dismiss` endpoint with an admin `tokenID` on **Global Scope** and access to the Event Environment (or Company Environment). You must provide your `tokenID`, `eventID` and `personID` as query attributes.

#### Example

```sh
curl --request GET \
     --url 'https://api.inevent.com/?action=event.person.dismiss&tokenID=YOUR_TOKEN_HERE&eventID=YOUR_EVENT_ID&personID=PERSON_ID' \
     --header 'Accept: application/json'
```

#### Response

```json
{
  "count": 0,
  "data": []
}
```


# Listing attendees

To list all event attendees in your event environment you may use the `event.person.find` endpoint with multiple filters and pagination. The required query attributes for this endpoint are `tokenID`, `eventID` and `selection`, and we have several optional attributes for filtering and pagination.

To retrieve the full profile of the attendee (including custom fields), you must send the `fullProfile` query attribute with value **1**.

#### `Selection` query attribute

The `selection` query attribute accepts the following values:

```json
{
    "all": "All",
    "admin": "Complete event admin power",
    "not-admin": "Standard event attendees",
    "speakers": "Linked speakers",
    "permission": "Specific event power",
    "collector": "Lead retrievals collectors",
    "custom-list": "Custom list",
    "tags": "Tags",
    "with-email": "Emails sent",
    "without-email": "Emails not sent",
    "approved": "Enrollment approved",
    "denied": "Enrollment denied",
    "nfc-synced": "NFC synced",
    "nfc-not-synced": "NFC not synced",
    "printed": "Badge printed",
    "not-printed": "Badge not printed",
    "accepted-rsvp": "RSVP accepted",
    "declined-rsvp": "RSVP declined",
    "waiting-rsvp": "RSVP waiting",
    "downloaded": "App downloaded",
    "not-downloaded": "App not downloaded",
    "incomplete-profile": "Missing role, company or image",
    "present": "Attendee present in-person",
    "not-present": "Attendee absent in-person",
    "virtual": "Attendee present online",
    "not-virtual": "Attendee absent online",
    "now-virtual": "Attendee present online right now",
    "public": "Attendee public for chats",
    "private": "Attendee private for chats",
    "favorited": "Attendee favorited by personID"
}
```

The `selection` query attribute allows *stacking* (AND operation) by separating values with a pipe. Example: `selection=printed|present`. It also allows complex stacking for a certain key, like `tags`. Example: `selection=printed|present|tags:29124,4255`.

#### Key-value filtering

We also have the following optional query attributes as filters:

```json
{
    "name": "Attendee name",
    "username": "Attendee username",
    "email": "Attendee email",
    "role": "Attendee job title",
    "company": "Attendee company",
    "assistantEmail":  "Assistant email",
    "updatedBeforeDate": "Updated before (unix timestamp)",
    "updatedAfterDate": "Updated after (unix timestamp)",
    "ticket":  "Ticket",
}
```

You can also use `query` and `queryKey` instead of using the field name as the query attribute directly if you prefer.

You can also search by custom fields using the `feedback_$feedbackID` format. Example:

```json
{
    "feedback_1234": "Query for custom field 1234"
}
```

#### Pagination

To paginate you can use `limit` and `offset` query attributes and to get the total amount of events listed in your account (used to build pagination UI and calculate the amount of pages) you should send the `paginated` query attribute with value `1`.

#### Ordering

To order the events you can use the following query attributes: `order` and `orderOrientation`. The `orderOrientation` attribute accepts `ASC` (ascending) and `DESC` (descending) as values\
and the `order` query attribute accepts the following values:

```json
[
    "level",
    "memberID",
    "name",
    "firstName",
    "lastName",
    "username",
    "role",
    "company",
    "email",
    "assistantEmail",
    "private",
    "rsvp",
    "present",
    "origin",
    "ticket",
    "language",
    "enrollmentDate",
    "updatedDate",
    "printed",
    "device",
    "downloaded",
    "rand"
]
```

#### Example

Here is an example of this API call:

```sh
curl --request GET \
     --url 'https://api.inevent.com/?action=event.person.find&tokenID=YOUR_TOKEN_HERE&eventID=YOUR_EVENT_ID_HERE&limit=100&offset=0&paginated=1' \
     --header 'Accept: application/json'
```

#### Spreadsheet reports

To generate a spreadsheet report out of that API call, you can send the `format` attribute with the value `excel-daemon`. Excel spreadsheets takes a while to generate and they will show up in your `Report center`, but you can also retrieve them using the `download.find` endpoint.


