---
title: "Create a Session"
method: POST
path: "/v1/sessions"
tags: ["Sessions"]
---

# Create a Session

`POST /v1/sessions`

There are some further options you are able to pass through a "feature_flags" field when creating a session. These allow some customisation of the interface

## Custom features for Sessions

Custom feature can be added while creating a Session and it can be done by passing values into the feature_flags array.

**Example Feature Flags option** 

```text
feature_flags: [

    '-plugin;coviu-waiting-room-plugin',

    '-plugin;coviu-stripe-payments-resource-plugin',

    'customisation;disable-menu',

    'customisation;exit-url;https://your-exit-url',

    'customisation;return-url;https://your-return-url',

    'customisation;return-label;Your return label',

    'customisation;auto-return',

    'session;enforce-participant-uniqueness',

    'customisation;favicon-url;https://yourdomain.com/favicon.ico'
]
```

**What do they do?** 

| Feature Flag                                                   | What it does ?                                                                                                                                                               |
| :------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| \-plugin                                                       | Removes standard Coviu plugins from the session room                                                                                                                         |
| customisation;disable-menu                                     | Removes the menu from the session room                                                                                                                                       |
| customisation;exit-url                                         | Add a specific URL to wherever you would like to redirect to if the user exits the call interface using the "Exit call interface" button prior to other participants joining |
| customisation;return-url                                       | Add a specific URL to wherever you would like to redirect to after the call has completed from the exit screen                                                               |
| customisation;return-label                                     | To label the button that does the return URL navigation.                                                                                                                     |
| customisation;auto-return                                      | Automatically redirect to the return-url after hitting the "end call" button                                                                                                 |
| session;enforce-participant-uniqueness                         | Allow for the unique use of the participant's URL - it can't be re-used after first entry                                                                                    |
| customisation;favicon-url;<https://yourdomain.com/favicon.ico> | Allow for the use of your favicon in the call                                                                                                                                |
| customisation;background-color;{value}                         | Allows for using a custom background colour in the Coviu call window                                                                                                         |
| customisation;button-primary;{value}                           | Allows for using a custom button colour in the Coviu call window                                                                                                             |
| customisation;button-secondary;{value}                         | Allows for using a custom colour for the content inside the button in the Coviu call window                                                                                  |

## Request body

- CreateSession
  - `session_name` string, required
  - `start_time` string, date-time, required
  - `end_time` string, date-time, required
  - `actual_end_time` string, date-time
  - `picture` string
  - `participants` Participant[]
    - `client_id` string, uuid, required
    - `display_name` string, uuid, required
    - `entry_url` string, uuid
    - `participant_id` string, uuid, required
    - `picture` string, uuid
    - `role` 'GUEST' | 'HOST' | 'PARTICIPANT', required
    - `session_id` string, uuid, required
    - `state` string
    - `user_hint` string
    - `deleted_at` string, date-time
    - `coviu_user_id` string, uuid
    - `phone` string

## Response `200`

Session created

- Session
  - `session_id` string, uuid, required
  - `session_name` string
  - `start_time` string, date-time
  - `end_time` string, date-time
  - `actual_end_time` string, date-time
  - `picture` string
  - `team_id` string, uuid
  - `client_id` string, uuid
  - `participants` Participant[], required
    - `client_id` string, uuid, required
    - `display_name` string, uuid, required
    - `entry_url` string, uuid
    - `participant_id` string, uuid, required
    - `picture` string, uuid
    - `role` 'GUEST' | 'HOST' | 'PARTICIPANT', required
    - `session_id` string, uuid, required
    - `state` string
    - `user_hint` string
    - `deleted_at` string, date-time
    - `coviu_user_id` string, uuid
    - `phone` string

## Other responses

- `400` — 400

---

[API](https://skmtc.net/coviu/apis/coviu-rest-api-2.md) · [All operations](https://skmtc.net/coviu/apis/coviu-rest-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/coviu/coviu-rest-api-2/revisions/916aea0ed1a1/schema)
