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

# ComplianceClient

> Reference for the ComplianceClient class in the X API TypeScript SDK. Methods, parameters, and return types for the X API v2 compliance endpoints.

Client for compliance operations

This client provides methods for interacting with the compliance endpoints
of the X API. It handles authentication, request formatting, and response
parsing for all compliance related operations.

## Constructors

### constructor

• **new ComplianceClient**(`client`): [`ComplianceClient`](/xdks/typescript/reference/classes/ComplianceClient)

Creates a new compliance client instance

#### Parameters

| Name     | Type                                                  | Description                    |
| :------- | :---------------------------------------------------- | :----------------------------- |
| `client` | [`Client`](/xdks/typescript/reference/classes/Client) | The main X API client instance |

#### Returns

[`ComplianceClient`](/xdks/typescript/reference/classes/ComplianceClient)

#### Defined in

[compliance/client.ts:93](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/compliance/client.ts#L93)

## Methods

### getJobsById

▸ **getJobsById**(`id`, `options`): `Promise`\<`Response`>

Get Compliance Job by ID
Retrieves details of a specific Compliance Job by its ID.

#### Parameters

| Name      | Type                                                               | Description                               |
| :-------- | :----------------------------------------------------------------- | :---------------------------------------- |
| `id`      | `string`                                                           | The ID of the Compliance Job to retrieve. |
| `options` | `GetJobsByIdOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -                                         |

#### Returns

`Promise`\<`Response`>

Promise resolving to the API response, or raw Response if requestOptions.raw is true

#### Defined in

[compliance/client.ts:138](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/compliance/client.ts#L138)

▸ **getJobsById**(`id`, `options?`): `Promise`\<[`Get2ComplianceJobsIdResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2ComplianceJobsIdResponse)>

#### Parameters

| Name       | Type                 |
| :--------- | :------------------- |
| `id`       | `string`             |
| `options?` | `GetJobsByIdOptions` |

#### Returns

`Promise`\<[`Get2ComplianceJobsIdResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2ComplianceJobsIdResponse)>

#### Defined in

[compliance/client.ts:151](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/compliance/client.ts#L151)

***

### getJobs

▸ **getJobs**(`type`, `options`): `Promise`\<`Response`>

Get Compliance Jobs
Retrieves a list of Compliance Jobs filtered by job type and optional status.

#### Parameters

| Name      | Type                                                           | Description                     |
| :-------- | :------------------------------------------------------------- | :------------------------------ |
| `type`    | `string`                                                       | Type of Compliance Job to list. |
| `options` | `GetJobsOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -                               |

#### Returns

`Promise`\<`Response`>

Promise resolving to the API response, or raw Response if requestOptions.raw is true

#### Defined in

[compliance/client.ts:273](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/compliance/client.ts#L273)

▸ **getJobs**(`type`, `options?`): `Promise`\<[`Get2ComplianceJobsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2ComplianceJobsResponse)>

#### Parameters

| Name       | Type             |
| :--------- | :--------------- |
| `type`     | `string`         |
| `options?` | `GetJobsOptions` |

#### Returns

`Promise`\<[`Get2ComplianceJobsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2ComplianceJobsResponse)>

#### Defined in

[compliance/client.ts:286](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/compliance/client.ts#L286)

***

### createJobs

▸ **createJobs**(`body`, `options`): `Promise`\<`Response`>

Create Compliance Job
Creates a new Compliance Job for the specified job type.

#### Parameters

| Name                         | Type                                                                                                     | Description                                     |
| :--------------------------- | :------------------------------------------------------------------------------------------------------- | :---------------------------------------------- |
| `body`                       | [`CreateComplianceJobRequest`](/xdks/typescript/reference/interfaces/Schemas.CreateComplianceJobRequest) | A request to create a new batch compliance job. |
| `options`                    | `Object`                                                                                                 | -                                               |
| `options.requestOptions`     | `Object`                                                                                                 | -                                               |
| `options.requestOptions.raw` | `true`                                                                                                   | -                                               |

#### Returns

`Promise`\<`Response`>

Promise resolving to the API response, or raw Response if requestOptions.raw is true

#### Defined in

[compliance/client.ts:430](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/compliance/client.ts#L430)

▸ **createJobs**(`body`): `Promise`\<[`CreateComplianceJobResponse`](/xdks/typescript/reference/interfaces/Schemas.CreateComplianceJobResponse)>

#### Parameters

| Name   | Type                                                                                                     |
| :----- | :------------------------------------------------------------------------------------------------------- |
| `body` | [`CreateComplianceJobRequest`](/xdks/typescript/reference/interfaces/Schemas.CreateComplianceJobRequest) |

#### Returns

`Promise`\<[`CreateComplianceJobResponse`](/xdks/typescript/reference/interfaces/Schemas.CreateComplianceJobResponse)>

#### Defined in

[compliance/client.ts:441](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/compliance/client.ts#L441)
