Usage
Use these types in 1 of 3 ways:- Copy curated types. Copy the “Response types”, “Request types”, and “Shared types” tabs into a single
xquik-types.tsfile - Copy individual interfaces. Grab only the types you need such as
TweetorEventList - Generate full coverage from OpenAPI. Use the OpenAPI spec with tools like
openapi-typescriptto auto-generate types:
- Response types
- Request types
Response objects returned by API endpoints.
REST API vs MCP field naming
REST examples show the default v1 response contract unless they send
xquik-api-contract: 2026-04-29. API MCP sends that contract
automatically. MCP results use snake_case, Unix timestamps, structured
errors, has_more, and next_cursor. Pass next_cursor as cursor on
tweet, profile, follower, reply, timeline, community, and list pages. Use
cursor for draws, extractions, and events. Use after for Radar. Use afterCursor for
drafts. A default createdAt field becomes created.Type reference
Account
GET /api/v1/account returns this shape. The API omits the creditInfo field when no credit balance record exists yet. creditInfo.balance shows the current credit count available for metered API calls.
API keys
API keys have 2 shapes. OnlyPOST /api/v1/api-keys returns ApiKeyCreated, which includes the fullKey field. This is the only time the API exposes the full key. GET /api/v1/api-keys returns ApiKey, which shows only the prefix (first 8 characters) for identification.
Monitors
Account monitor endpoints returnMonitor. The xUserId is the X (Twitter) user ID resolved from the username at creation time. Keyword monitor endpoints return KeywordMonitor with the normalized X search query. Both monitor types include eventTypes, isActive, createdAt, and nextBillingAt for active monitor billing.
Events
Event represents one tracked account or keyword action.
monitorType is account or keyword. monitorId points to the source monitor.
Account events include username. Keyword events include query and keywordMonitorId.
data contains the documented Tweet event fields.
EventList wraps paginated responses.
Use nextCursor with the cursor query parameter for subsequent pages.
Webhooks
Like API keys, webhooks have 2 shapes.WebhookCreated includes the secret field used for HMAC signature verification. Webhook (from list) never exposes the secret. If you lose the secret, delete and recreate the webhook.
Deliveries
EachDelivery tracks 1 event sent to 1 webhook endpoint. Status starts as pending and becomes delivered on success. A failed attempt sets failed. Xquik retries until your endpoint returns 2xx. A paused or deleted webhook marks its waiting deliveries exhausted. lastStatusCode and lastError help diagnose delivery failures.
Webhook payload
TheWebhookPayload type describes the JSON body your endpoint receives on each delivery. Normal monitor events include schemaVersion, deliveryId, streamEventId, occurredAt, eventType, and data. Account monitor events include username. Keyword monitor events include query. Verify authenticity with the X-Xquik-Signature header and your webhook secret. See Webhook Verification for implementation details.
webhook.test payloads include timestamp and omit monitor-only fields because no stored event backs them. Normal event payloads omit timestamp.Draws
Draw is the full draw object returned by GET /api/v1/draws/{id} with tweet metadata and engagement counts. DrawListItem is the compact shape returned in list responses. DrawWinner contains the position, username, tweet ID, and backup flag for each winner. Filter fields on CreateDrawRequest control which entries qualify for the draw.
Extractions
ExtractionJob represents a completed or failed extraction job. The target fields (targetTweetId, targetUsername) vary by toolType. ExtractionResult contains the core user and tweet data the API returns. The get endpoint paginates results with up to 1,000 results per page. Exports (CSV, XLSX, Markdown) include additional enrichment columns not present in the API response. See Export Extraction for the full column list. ExtractionEstimate previews the cost before running a job.
X API
Tweet, profile, and relationship lookup types.Tweet and TweetAuthor come
from tweet lookup. TweetSearchResult includes an inline author object.
UserProfile contains the full profile. FollowerCheck returns the
bidirectional follow relationship between 2 users. Tweet and
TweetSearchResult include an optional media array when media exists. Media
types are photo, video, or animated_gif.
Trends
Trend represents a single trending topic on X. The API omits the description, rank, and query fields when unavailable. TrendList wraps the GET /api/v1/trends response. total is the number of trends returned. woeid is the region ID.
Radar
RadarItem represents a single trending topic or news item that Xquik
collects. The source field identifies the Radar stream. Reddit metadata
can include post text, links, and media. It can also include public scores,
estimated vote counts, and comment counts. It never includes comment bodies.
Startup growth metadata can include reported growth and revenue. Company details
and a founder xHandle appear when available.
RadarList wraps paginated responses from GET /api/v1/radar. Use
nextCursor with the after query parameter for later pages.
Styles
The analyze style (POST /api/v1/styles) and get style (GET /api/v1/styles/{id}) endpoints return StyleProfile. It includes the cached tweets array with text, media, and timestamps. StyleListItem is the compact shape returned by GET /api/v1/styles (no tweets). StyleComparison wraps 2 full profiles for side-by-side comparison. PerformanceAnalysis adds engagement metrics (likes, retweets, replies, quotes, views, bookmarks) to each cached tweet. isOwnAccount is true when the analyzed username matches the authenticated user’s linked X identity.
Drafts
Draft represents a saved tweet draft. List, create, and get responses include id, text, createdAt, and updatedAt. The API omits optional topic and goal fields when unset. They are never null. DraftList wraps paginated responses. Use nextCursor with the afterCursor query parameter to fetch subsequent pages. Maximum 50 drafts per page.
X accounts
XAccount represents a linked X account. displayName is the user’s display name on X. isActive indicates whether the account is connected and usable for API operations.
Compose
ComposeRequest drives a 3-step writing flow. compose returns 10 source facts,
4 questions, published signal names, and a topic intentUrl.
radarRecommendations is always empty for compatibility. Production signal
weights remain null. refine returns request context and source guidance.
examplePatterns stays empty. score checks that the draft contains text.
It does not predict reach. styleUsername selects a cached style.
Compose responses may include savedStyles, styleTweets, or
styleNote.
X write
Write operations (post, retweet, like, reply) returnXWriteResponse. success indicates whether the operation completed. The optional data field contains platform-specific response data when available.
Support tickets
SupportTicket is the compact shape returned in list responses. SupportTicketDetail includes the full messages array. Each SupportMessage has a sender field indicating whether the message is from the user or support team. Status progresses from open through in_progress to resolved or closed.
Request bodies
All request body types use optional fields for update operations (PATCH) and required fields for creation (POST). The API validates request bodies and returns400 invalid_input for missing or malformed fields.