# VideoCallsResource

Canonical page: https://docs.ovok.com/java-sdk/reference/video-calls-resource

```java
public final class VideoCallsResource
```

Runs LiveKit video calls under `/video-call/livekit`. Get it from [`Ovok.videoCalls()`](/java-sdk/reference/ovok#videocalls).

## Methods [#methods]

### appointments [#appointments]

```java
public VideoCallsResource.AppointmentsResource appointments()
```

Returns the video-call appointments.

**Returns:** the appointments resource

### access [#access]

```java
public VideoCallsResource.AccessResource access()
```

Returns call access for users and guests.

**Returns:** the access resource

### emails [#emails]

```java
public VideoCallsResource.EmailsResource emails()
```

Returns the call invitation emails.

**Returns:** the emails resource

### notifyActive [#notifyactive]

```java
public JsonNode notifyActive(String appointmentId) throws IOException, InterruptedException
```

Notifies participants that a call is active (`POST /video-call/livekit/notification/active-call/{appointmentId}`).

**Parameters:**

- `appointmentId`: the appointment ID

**Returns:** the response body

**Throws:**

- `IOException`: if the request cannot be sent or the response cannot be read
- `InterruptedException`: if the thread is interrupted while waiting for the response

```java
public JsonNode notifyActive(
        String appointmentId,
        RequestOptions options) throws IOException, InterruptedException
```

Notifies participants that a call is active (`POST /video-call/livekit/notification/active-call/{appointmentId}`).

**Parameters:**

- `appointmentId`: the appointment ID
- `options`: per-request options, such as the timeout

**Returns:** the response body

**Throws:**

- `IOException`: if the request cannot be sent or the response cannot be read
- `InterruptedException`: if the thread is interrupted while waiting for the response

## VideoCallsResource.AppointmentsResource [#videocallsresourceappointmentsresource]

```java
public static final class AppointmentsResource
```

Video-call appointments. Get it from [`VideoCallsResource.appointments()`](#appointments).

### AppointmentsResource.list [#appointmentsresourcelist]

```java
public JsonNode list(Map<String, ?> parameters) throws IOException, InterruptedException
```

Lists appointments (`GET /video-call/livekit/appointment`).

**Parameters:**

- `parameters`: query parameters

**Returns:** the response body

**Throws:**

- `IOException`: if the request cannot be sent or the response cannot be read
- `InterruptedException`: if the thread is interrupted while waiting for the response

```java
public JsonNode list(
        Map<String, ?> parameters,
        RequestOptions options) throws IOException, InterruptedException
```

Lists appointments (`GET /video-call/livekit/appointment`).

**Parameters:**

- `parameters`: query parameters
- `options`: per-request options, such as the timeout

**Returns:** the response body

**Throws:**

- `IOException`: if the request cannot be sent or the response cannot be read
- `InterruptedException`: if the thread is interrupted while waiting for the response

### AppointmentsResource.create [#appointmentsresourcecreate]

```java
public JsonNode create(Object body) throws IOException, InterruptedException
```

Creates an appointment (`POST /video-call/livekit/appointment`).

**Parameters:**

- `body`: the appointment

**Returns:** the response body

**Throws:**

- `IOException`: if the request cannot be sent or the response cannot be read
- `InterruptedException`: if the thread is interrupted while waiting for the response

```java
public JsonNode create(Object body, RequestOptions options) throws IOException, InterruptedException
```

Creates an appointment (`POST /video-call/livekit/appointment`).

**Parameters:**

- `body`: the appointment
- `options`: per-request options, such as the timeout

**Returns:** the response body

**Throws:**

- `IOException`: if the request cannot be sent or the response cannot be read
- `InterruptedException`: if the thread is interrupted while waiting for the response

### AppointmentsResource.update [#appointmentsresourceupdate]

```java
public JsonNode update(String appointmentId, Object body) throws IOException, InterruptedException
```

Updates an appointment (`PUT /video-call/livekit/appointment/{appointmentId}`).

**Parameters:**

- `appointmentId`: the appointment ID
- `body`: the updated appointment

**Returns:** the response body

**Throws:**

- `IOException`: if the request cannot be sent or the response cannot be read
- `InterruptedException`: if the thread is interrupted while waiting for the response

```java
public JsonNode update(
        String appointmentId,
        Object body,
        RequestOptions options) throws IOException, InterruptedException
```

Updates an appointment (`PUT /video-call/livekit/appointment/{appointmentId}`).

**Parameters:**

- `appointmentId`: the appointment ID
- `body`: the updated appointment
- `options`: per-request options, such as the timeout

**Returns:** the response body

**Throws:**

- `IOException`: if the request cannot be sent or the response cannot be read
- `InterruptedException`: if the thread is interrupted while waiting for the response

## VideoCallsResource.AccessResource [#videocallsresourceaccessresource]

```java
public static final class AccessResource
```

Call access for users and guests. Get it from [`VideoCallsResource.access()`](#access).

### AccessResource.permission [#accessresourcepermission]

```java
public JsonNode permission(String appointmentId) throws IOException, InterruptedException
```

Checks the caller's access to a call (`GET /video-call/livekit/access-permission/{appointmentId}`).

**Parameters:**

- `appointmentId`: the appointment ID

**Returns:** the response body

**Throws:**

- `IOException`: if the request cannot be sent or the response cannot be read
- `InterruptedException`: if the thread is interrupted while waiting for the response

```java
public JsonNode permission(
        String appointmentId,
        RequestOptions options) throws IOException, InterruptedException
```

Checks the caller's access to a call (`GET /video-call/livekit/access-permission/{appointmentId}`).

**Parameters:**

- `appointmentId`: the appointment ID
- `options`: per-request options, such as the timeout

**Returns:** the response body

**Throws:**

- `IOException`: if the request cannot be sent or the response cannot be read
- `InterruptedException`: if the thread is interrupted while waiting for the response

### AccessResource.createGuest [#accessresourcecreateguest]

```java
public JsonNode createGuest(
        String appointmentId,
        Object body) throws IOException, InterruptedException
```

Creates guest access to a call (`POST /video-call/livekit/guest-access/{appointmentId}`).

**Parameters:**

- `appointmentId`: the appointment ID
- `body`: the guest details

**Returns:** the response body

**Throws:**

- `IOException`: if the request cannot be sent or the response cannot be read
- `InterruptedException`: if the thread is interrupted while waiting for the response

```java
public JsonNode createGuest(
        String appointmentId,
        Object body,
        RequestOptions options) throws IOException, InterruptedException
```

Creates guest access to a call (`POST /video-call/livekit/guest-access/{appointmentId}`).

**Parameters:**

- `appointmentId`: the appointment ID
- `body`: the guest details
- `options`: per-request options, such as the timeout

**Returns:** the response body

**Throws:**

- `IOException`: if the request cannot be sent or the response cannot be read
- `InterruptedException`: if the thread is interrupted while waiting for the response

### AccessResource.createUser [#accessresourcecreateuser]

```java
public JsonNode createUser(String appointmentId) throws IOException, InterruptedException
```

Creates the caller's access to a call (`POST /video-call/livekit/user-access/{appointmentId}`).

**Parameters:**

- `appointmentId`: the appointment ID

**Returns:** the response body

**Throws:**

- `IOException`: if the request cannot be sent or the response cannot be read
- `InterruptedException`: if the thread is interrupted while waiting for the response

```java
public JsonNode createUser(
        String appointmentId,
        RequestOptions options) throws IOException, InterruptedException
```

Creates the caller's access to a call (`POST /video-call/livekit/user-access/{appointmentId}`).

**Parameters:**

- `appointmentId`: the appointment ID
- `options`: per-request options, such as the timeout

**Returns:** the response body

**Throws:**

- `IOException`: if the request cannot be sent or the response cannot be read
- `InterruptedException`: if the thread is interrupted while waiting for the response

## VideoCallsResource.EmailsResource [#videocallsresourceemailsresource]

```java
public static final class EmailsResource
```

Call invitation emails. Get it from [`VideoCallsResource.emails()`](#emails).

### EmailsResource.invite [#emailsresourceinvite]

```java
public JsonNode invite(Object body) throws IOException, InterruptedException
```

Sends a call invitation (`POST /video-call/livekit/mail/invite`).

**Parameters:**

- `body`: the invitation

**Returns:** the response body

**Throws:**

- `IOException`: if the request cannot be sent or the response cannot be read
- `InterruptedException`: if the thread is interrupted while waiting for the response

```java
public JsonNode invite(Object body, RequestOptions options) throws IOException, InterruptedException
```

Sends a call invitation (`POST /video-call/livekit/mail/invite`).

**Parameters:**

- `body`: the invitation
- `options`: per-request options, such as the timeout

**Returns:** the response body

**Throws:**

- `IOException`: if the request cannot be sent or the response cannot be read
- `InterruptedException`: if the thread is interrupted while waiting for the response

### EmailsResource.update [#emailsresourceupdate]

```java
public JsonNode update(Object body) throws IOException, InterruptedException
```

Sends a call update (`POST /video-call/livekit/mail/update`).

**Parameters:**

- `body`: the update

**Returns:** the response body

**Throws:**

- `IOException`: if the request cannot be sent or the response cannot be read
- `InterruptedException`: if the thread is interrupted while waiting for the response

```java
public JsonNode update(Object body, RequestOptions options) throws IOException, InterruptedException
```

Sends a call update (`POST /video-call/livekit/mail/update`).

**Parameters:**

- `body`: the update
- `options`: per-request options, such as the timeout

**Returns:** the response body

**Throws:**

- `IOException`: if the request cannot be sent or the response cannot be read
- `InterruptedException`: if the thread is interrupted while waiting for the response

### EmailsResource.cancel [#emailsresourcecancel]

```java
public JsonNode cancel(Object body) throws IOException, InterruptedException
```

Sends a call cancellation (`POST /video-call/livekit/mail/cancel`).

**Parameters:**

- `body`: the cancellation

**Returns:** the response body

**Throws:**

- `IOException`: if the request cannot be sent or the response cannot be read
- `InterruptedException`: if the thread is interrupted while waiting for the response

```java
public JsonNode cancel(Object body, RequestOptions options) throws IOException, InterruptedException
```

Sends a call cancellation (`POST /video-call/livekit/mail/cancel`).

**Parameters:**

- `body`: the cancellation
- `options`: per-request options, such as the timeout

**Returns:** the response body

**Throws:**

- `IOException`: if the request cannot be sent or the response cannot be read
- `InterruptedException`: if the thread is interrupted while waiting for the response
