> ## 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.

# ArticlesClient

> Methods for X API v2 Articles endpoints.

Access **Articles** endpoints via `client.Articles` (`ArticlesClient`).

## Methods

| Method | Endpoint | Behavior | Summary |
| :- | :- | :- | :- |
| [`ArticleCreateDraftAsync`](#articlecreatedraftasync) | `POST /2/articles/draft` | Standard | Create Draft Article |
| [`ArticlePublishAsync`](#articlepublishasync) | `POST /2/articles/{article_id}/publish` | Standard | Publish Article |

## `ArticleCreateDraftAsync`

POST `/2/articles/draft`

**Create Draft Article**

Creates a new Article draft that can later be published.

```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.Articles.ArticleCreateDraftAsync(new ArticleCreateDraftRequest { Title = "example" });
Console.WriteLine(response);
```

### Parameters

**body** `ArticleCreateDraftRequest` *required*

Create a draft Article.

**Returns:** `Task<ArticleCreateDraftResponse>`

***

## `ArticlePublishAsync`

POST `/2/articles/{article_id}/publish`

**Publish Article**

Publishes a draft Article, making it publicly visible.

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

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

var response = await client.Articles.ArticlePublishAsync("1895000000000000000");
Console.WriteLine(response);
```

### Parameters

**articleId** `string` *required*

`article_id` (path parameter).

**Returns:** `Task<ArticlePublishResponse>`

***
