> ## Documentation Index
> Fetch the complete documentation index at: https://docs.x.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CallsClient

> Methods for X API v2 Calls endpoints.

Access **Calls** endpoints via `client.Calls` (`CallsClient`).

## Methods

| Method | Endpoint | Behavior | Summary |
| :- | :- | :- | :- |
| [`CancelScheduledCallAsync`](#cancelscheduledcallasync) | `DELETE /2/calls/scheduled/{id}` | Standard | Cancel a Scheduled Call |
| [`CreateCallAsync`](#createcallasync) | `POST /2/calls` | Standard | Create a Call |
| [`GetCallAsync`](#getcallasync) | `GET /2/calls/{id}` | Standard | Get a Call |
| [`GetScheduledCallAsync`](#getscheduledcallasync) | `GET /2/calls/scheduled/{id}` | Standard | Get a Scheduled Call |
| [`JoinCallAsync`](#joincallasync) | `POST /2/calls/{id}/join` | Standard | Join a Call |
| [`LeaveCallAsync`](#leavecallasync) | `POST /2/calls/{id}/leave` | Standard | Leave a Call |
| [`ListScheduledAsync`](#listscheduledasync) | `GET /2/calls/scheduled` | Standard | List Scheduled Calls |
| [`RespondToScheduledCallAsync`](#respondtoscheduledcallasync) | `POST /2/calls/scheduled/{id}/rsvp` | Standard | Respond to a Scheduled Call |
| [`ScheduleCallAsync`](#schedulecallasync) | `POST /2/calls/scheduled` | Standard | Schedule a Call |
| [`UpdateScheduledCallAsync`](#updatescheduledcallasync) | `PUT /2/calls/scheduled/{id}` | Standard | Update a Scheduled Call |

## `CancelScheduledCallAsync`

DELETE `/2/calls/scheduled/{id}`

**Cancel a Scheduled Call**

Cancels a scheduled call the authenticated user organizes, and takes it off invitees' calendars. For a recurring call, scope and occurrence\_start\_time pick the occurrences: all of them (the default), one, or one and every one after it. Cancelling what is already cancelled succeeds.

```csharp theme={null}
using System;
using Xdk;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Calls.CancelScheduledCallAsync("1895000000000000000");
Console.WriteLine(response);
```

### Parameters

**id** `string` *required*

`id` (path parameter).

**Optional parameters (CallsClient.CancelScheduledCallOptions — 3)**

**options.Scope** `string`

Which occurrences: all (the default without occurrence\_start\_time), this (the default with it), or this\_and\_following.

**options.OccurrenceStartTime** `string`

Start of the occurrence that scope this or this\_and\_following refers to (RFC 3339).

**options.NotifyInvitees** `bool`

Whether invitees get an email about it. Defaults to true.

**Returns:** `Task<CancelScheduledCallResponse>`

***

## `CreateCallAsync`

POST `/2/calls`

**Create a Call**

Starts an X call hosted by the authenticated user (typically a bot). Pass an XChat conversation\_id to start the call in that conversation, or omit it for a standalone call anyone can join with the returned join\_url (subject to join\_policy). The call starts empty: put an agent in it with POST /2/calls/:id/join. When the host joins a conversation call, the other members are rung.

```csharp theme={null}
using System;
using Xdk;
using Xdk.Models;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Calls.CreateCallAsync(new CreateCallRequest { AudioOnly = true });
Console.WriteLine(response);
```

### Parameters

**body** `CreateCallRequest` *required*

Request payload.

**Returns:** `Task<CreateCallResponse>`

***

## `GetCallAsync`

GET `/2/calls/{id}`

**Get a Call**

Returns a call's title, join policy, host and participant count, and whether the authenticated user may join it without asking the host.

```csharp theme={null}
using System;
using Xdk;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Calls.GetCallAsync("1895000000000000000");
Console.WriteLine(response);
```

### Parameters

**id** `string` *required*

`id` (path parameter).

**Optional parameters (CallsClient.GetCallOptions — 3)**

**options.CallFields** `List\<string\>`

A comma separated list of Call fields to display.

**options.Expansions** `List\<string\>`

A comma separated list of fields to expand.

**options.UserFields** `List\<string\>`

A comma separated list of User fields to display.

**Returns:** `Task<GetCallResponse>`

***

## `GetScheduledCallAsync`

GET `/2/calls/scheduled/{id}`

**Get a Scheduled Call**

Returns a scheduled call the authenticated user organizes or is invited to, at its occurrence running now or its next one within a year: its time, call, recurrence and who is invited and how they answered. Changes can take a few seconds to show here. Use scheduled\_call.fields to select which fields are returned.

```csharp theme={null}
using System;
using Xdk;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Calls.GetScheduledCallAsync("1895000000000000000");
Console.WriteLine(response);
```

### Parameters

**id** `string` *required*

`id` (path parameter).

**Optional parameters (CallsClient.GetScheduledCallOptions — 4)**

**options.ScheduledCallFields** `List\<string\>`

A comma separated list of ScheduledCall fields to display.

**options.Expansions** `List\<string\>`

A comma separated list of fields to expand.

**options.CallFields** `List\<string\>`

A comma separated list of Call fields to display.

**options.UserFields** `List\<string\>`

A comma separated list of User fields to display.

**Returns:** `Task<GetScheduledCallResponse>`

***

## `JoinCallAsync`

POST `/2/calls/{id}/join`

**Join a Call**

Starts a media session that takes part in the call as the authenticated user. The response carries a media\_url and a short-lived media\_token: open a WebSocket to media\_url with the token as a Bearer credential to exchange PCM16 audio and events with the call; the user enters the call when the WebSocket connects. On a closed or trusted call the session asks the host first (admission: requires\_approval).

```csharp theme={null}
using System;
using Xdk;
using Xdk.Models;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Calls.JoinCallAsync("1895000000000000000", new JoinCallRequest());
Console.WriteLine(response);
```

### Parameters

**id** `string` *required*

`id` (path parameter).

**body** `JoinCallRequest` *required*

Request payload.

**Returns:** `Task<JoinCallResponse>`

***

## `LeaveCallAsync`

POST `/2/calls/{id}/leave`

**Leave a Call**

Ends the authenticated user's media session in the call (its WebSocket receives session.ended with reason left) and removes the user from the call.

```csharp theme={null}
using System;
using Xdk;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Calls.LeaveCallAsync("1895000000000000000");
Console.WriteLine(response);
```

### Parameters

**id** `string` *required*

`id` (path parameter).

**Returns:** `Task<LeaveCallResponse>`

***

## `ListScheduledAsync`

GET `/2/calls/scheduled`

**List Scheduled Calls**

Returns the X calls on the authenticated user's calendar, earliest first: events on their X Calls calendar, and events on the Microsoft Outlook calendars they linked to X whose conference is an X call. Calls still running at start\_time are included. The window defaults to the next 24 hours and may span at most 7 days. Use scheduled\_call.fields to select which fields are returned.

When both are provided, `start_time` must be earlier than `end_time`.

```csharp theme={null}
using System;
using Xdk;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Calls.ListScheduledAsync();
Console.WriteLine(response);
```

### Parameters

**Optional parameters (CallsClient.ListScheduledOptions — 7)**

**options.StartTime** `string`

Calls still running at this time or starting after it (RFC 3339). Defaults to now.

**options.EndTime** `string`

Calls starting before this time (RFC 3339). Defaults to 24 hours after start\_time.

**options.MaxResults** `int`

The most calls to return. Defaults to 20.

**options.ScheduledCallFields** `List\<string\>`

A comma separated list of ScheduledCall fields to display.

**options.Expansions** `List\<string\>`

A comma separated list of fields to expand.

**options.CallFields** `List\<string\>`

A comma separated list of Call fields to display.

**options.UserFields** `List\<string\>`

A comma separated list of User fields to display.

**Returns:** `Task<ListScheduledCallsResponse>`

***

## `RespondToScheduledCallAsync`

POST `/2/calls/scheduled/{id}/rsvp`

**Respond to a Scheduled Call**

Accepts, declines or tentatively accepts an invitation to a scheduled call for the authenticated user. For a recurring call, scope and occurrence\_start\_time pick the occurrences the answer is for: all of them (the default), one, or one and every one after it.

```csharp theme={null}
using System;
using Xdk;
using Xdk.Models;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Calls.RespondToScheduledCallAsync(
    "1895000000000000000",
    new RespondToScheduledCallRequest { Response = "accepted" }
);
Console.WriteLine(response);
```

### Parameters

**id** `string` *required*

`id` (path parameter).

**body** `RespondToScheduledCallRequest` *required*

Request payload.

**Returns:** `Task<RespondToScheduledCallResponse>`

***

## `ScheduleCallAsync`

POST `/2/calls/scheduled`

**Schedule a Call**

Puts an X call on the authenticated user's X Calls calendar, with them as its organizer, and invites people to it. The call exists right away: share its join\_url, or put an agent in it at start time with POST /2/calls/:id/join. A recurrence (an RFC 5545 RRULE) repeats it. Invitees get an email unless notify\_invitees is false.

```csharp theme={null}
using System;
using Xdk;
using Xdk.Models;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Calls.ScheduleCallAsync(new ScheduleCallRequest { StartTime = "2026-01-01T00:00:00Z" });
Console.WriteLine(response);
```

### Parameters

**body** `ScheduleCallRequest` *required*

Request payload.

**Returns:** `Task<ScheduleCallResponse>`

***

## `UpdateScheduledCallAsync`

PUT `/2/calls/scheduled/{id}`

**Update a Scheduled Call**

Moves, renames or re-invites a scheduled call the authenticated user organizes. Only the fields sent change. For a recurring call, scope and occurrence\_start\_time pick the occurrences: all of them (the default), one, or one and every one after it.

```csharp theme={null}
using System;
using Xdk;
using Xdk.Models;

using var client = new XClient(new XClientOptions
{
    AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"),
});

var response = await client.Calls.UpdateScheduledCallAsync(
    "1895000000000000000",
    new UpdateScheduledCallRequest { Description = "example" }
);
Console.WriteLine(response);
```

### Parameters

**id** `string` *required*

`id` (path parameter).

**body** `UpdateScheduledCallRequest` *required*

At least one of `start_time`, `duration_minutes`, `title`, `description`, `invitee_ids`, `recurrence`, `time_zone` is required.

**Returns:** `Task<UpdateScheduledCallResponse>`

***
