# Import group events

> **POST** `https://api.us.nylas.com/v3/scheduling/configurations/{configuration_id}/import-group-events`

Source: https://developer.nylas.com/docs/reference/api/group-events/import-group-events/

Imports existing events to your group events Configuration. You can import up to 20 events per
request.

**Authentication:** NYLAS_API_KEY

## Parameters

### Path parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `configuration_id` | string | Yes | The ID of the Configuration object to access. |

## Request body

Import group event

Content-Type: application/json

- Array of object
  - `calendar_id` (string) **(required)** - The ID of the calendar to access.
  - `capacity` (number) - The maximum number of attendees allowed in the event. If not specified, Nylas uses the
default capacity for your Configuration.
  - `event_id` (string) **(required)** - ID of the event to import.
  - `exceptions` (array) - An array of events to create exceptions for.
    - `capacity` (number) - The maximum number of attendees allowed in the event. You must specify a `capacity`
for all events in `exceptions`.
    - `event_id` (string) - ID of the to create an exception for.
  - `participants` (array) - An array of participants to include in the event booking. If you don't specify at least
one participant, Nylas uses the event organizer instead.
    - `name` (string) - The participant's full name.
    - `email` (string) - The participant's email address.

## Responses

### 200 - Group events imported

- `request_id` (string) - The request ID.
- `data` (array)
  - `imported_events` (array) - A list of event IDs representing successfully imported group events.
    - `event_id` (string) - The group event ID.
  - `import_failed` (array) - A list of event IDs representing group events that Nylas couldn't import.
    - `event_id` (string) - The group event ID.
    - `reason` (string) - The reason the event wasn't imported.

## Code samples

### cURL

```bash
curl --compressed --request POST \
  --url "https://api.us.nylas.com/v3/scheduling/configurations/<SCHEDULER_CONFIG_ID>/import-group-events" \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <NYLAS_API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '{
    "calendar_id": "<CALENDAR_ID>",
    "event_id": "<EVENT_ID>",
    "capacity": 10,
    "exceptions": [{
      "event_id": "<EVENT_ID>",
      "capacity": 5
    }],
    "participants": [{
      "name": "Leyah Miller",
      "email": "leyah@example.com"
    }]
  }'
```
