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

# X (Twitter) API TypeScript create request types

> Copy TypeScript request types for monitors, webhooks, API keys, draws, extractions, drafts, and compose calls. Use them to type each body you send to Xquik.

> For the complete documentation index, see [llms.txt](https://docs.xquik.com/llms.txt).

These types belong to the [X API TypeScript types](https://docs.xquik.com/guides/x-api-typescript-types.md) set. Copy them into your `xquik-types.ts` file.

## Types

```typescript theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/bash.json","/languages/csharp.json","/languages/go.json","/languages/java.json","/languages/javascript.json","/languages/kotlin.json","/languages/php.json","/languages/python.json","/languages/ruby.json","/languages/typescript.json"]}}
interface CreateMonitorRequest {
  username: string;
  eventTypes: EventType[];
}

interface UpdateMonitorRequest {
  eventTypes?: EventType[];
  isActive?: boolean;
}

interface CreateWebhookRequest {
  url: string;
  eventTypes: EventType[];
}

interface UpdateWebhookRequest {
  url?: string;
  eventTypes?: EventType[];
  isActive?: boolean;
}

interface CreateApiKeyRequest {
  name?: string;
}

interface CreateDrawRequest {
  tweetUrl: string;
  winnerCount?: number;
  backupCount?: number;
  uniqueAuthorsOnly?: boolean;
  mustRetweet?: boolean;
  mustFollowUsername?: string;
  filterMinFollowers?: number;
  filterAccountAgeDays?: number;
  filterLanguage?: string;
  requiredKeywords?: string[];
  requiredHashtags?: string[];
  requiredMentions?: string[];
}

interface CreateExtractionRequest {
  toolType: ExtractionToolType;
  targetTweetId?: string;
  targetUsername?: string;
  targetCommunityId?: string;
  targetListId?: string;
  targetSpaceId?: string;
  searchQuery?: string;
  resultsLimit?: number;
}

interface CreateDraftRequest {
  text: string;
  topic?: string;
  goal?: "engagement" | "followers" | "authority" | "conversation";
}

interface ComposeRequest {
  step: "compose" | "refine" | "score";
  topic?: string;
  goal?: ComposeTweetGoal;
  styleUsername?: string;
  tone?: string;
  additionalContext?: string;
  callToAction?: string;
  hasLink?: boolean;
  /** @deprecated Accepted for compatibility. Text checks ignore it. */
  hasMedia?: boolean;
  mediaType?: MediaType;
  draft?: string;
}
```

## Next steps

* [X API TypeScript types](https://docs.xquik.com/guides/x-api-typescript-types.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.