Skip to main content
POST https://xquik.com/api/v1/styles
Free from cache. A refresh costs 1 credit per tweet returned.

Build a reusable tweet writing profile

Send one X (Twitter) username. Xquik saves the account’s recent posts as writing samples. Each sample keeps its Tweet ID, text, author, and time. This route manages cache creation and refreshes. It does not generate a tone label, vocabulary summary, sentence score, or engagement analysis. Use the returned samples for your approved writing review. Use Analyze Performance for current likes, replies, reposts, quotes, bookmarks, and views.

Understand cached and refreshed responses

The HTTP status explains the cache action. Always inspect fetchedAt too.A 200 response does not guarantee a recent refresh. Compare fetchedAt with your freshness policy before using the samples. The route has no force parameter. Repeating POST on a fresh profile returns the same cache without another X request.

Send a normalized X (Twitter) username

Send a non-empty X (Twitter) username without @, spaces, or a profile URL. Xquik lowercases the value before lookup and storage.
The request body accepts one field only.Missing, empty, or non-string values return 400 invalid_input. Keep the returned xUsername value for Get, Compare, Delete, and Performance requests.

Read the cached tweet writing samples

The profile response contains exact cached examples. It does not contain derived writing conclusions.isOwnAccount compares the username with the saved X identity during a refresh. A cached 200 response does not recompute that flag.

Parse every cached tweet

Each public tweets[] entry contains these fields.Keep Tweet IDs as strings. JavaScript numbers cannot represent every X Tweet ID exactly. The public Style Profile contract does not include cached media objects. Use a Tweet or media endpoint when your workflow requires images, videos, or GIFs.

Review observable tweet writing features

The response provides source text for your analysis. Start with observable features before assigning subjective voice or tone labels.Do not infer future engagement from writing samples. Refresh public metrics through Analyze Performance when outcome comparisons are required.

Build a Twitter brand voice workflow

  1. Set the X identity before refreshing.
  2. Send one public X (Twitter) username to this endpoint.
  3. Branch on HTTP 200 or 201.
  4. Store xUsername, fetchedAt, and tweetCount.
  5. Store every Tweet ID and text value.
  6. Review observable patterns with a human editor.
  7. Keep current product claims out of copied historical tweets.
Use cached examples as references. Never copy another person’s distinctive phrasing without authorization.

Analyze another public X account

You can cache recent public tweets from another username. The resulting profile belongs only to the authenticated Xquik account. This route does not expose drafts, private posts, or private analytics. It also does not expose followers, following, profile visits, or direct messages.

Budget a style refresh

Cached 200 responses are free. A 201 refresh costs 1 credit per Tweet returned and stored. Use tweetCount to reconcile the refresh. The endpoint accepts no limit parameter, date range, pagination cursor, or requested sample count. When a stale cache exists without enough credits, Xquik returns that cache with 200. It does not delete the existing writing samples.

Handle style cache errors

The response widget lists every status in the OpenAPI contract.

Headers

Send x-api-key with an Xquik API key. OAuth clients can send a bearer token through the Authorization header instead.

Body

Response

200 OK

Returns a cached profile. It can be fresh, or stale when credits cannot cover a refresh.

201 Created

Returns a newly fetched and stored profile.

400 Invalid input

Username is missing, empty, or not a string. Send one username string.

401 Unauthenticated

{ "error": "unauthenticated", "message": "Missing or invalid API key" } Authentication failed. Replace the missing or invalid credential.

402 No cached style

{ "error": "no_cached_style", "message": "No cached style for @username. Share 5-10 example tweet texts, then save via PUT /api/v1/styles/username." } No cache exists, and credits cannot cover a refresh. Top up through the billing page. Or save approved tweet examples with Save Custom Style.

429 Rate limited

Too many requests. Wait for Retry-After, then retry once.

How do I analyze a Twitter writing style?

Cache one public username, then review the returned tweet text. This endpoint supplies writing samples. Your application performs any voice or tone analysis.

Does analyze style return tone or vocabulary scores?

No. It returns Tweet IDs, text, authors, timestamps, and cache metadata. It does not return generated style labels or scores.

Why did analyze style return 200 instead of 201?

The route reused an existing cache. Check fetchedAt. A 200 can also return a stale cache when credits cannot cover a refresh.

Can I force a Twitter style refresh?

No force parameter exists. Fresh profiles return from cache. To refresh early, delete the profile and create it again. Deletion is permanent.

Can I analyze another Twitter account?

Yes, for recent public tweets. Only your authenticated Xquik account can read the cached profile.
Next. Get Style reads samples without a refresh. Compare Styles retrieves 2 profiles.

Response examples

200 example

201 example

  • 400 { "error": "invalid_input", "message": "Invalid input. Check the request body." }
  • 401 { "error": "unauthenticated", "message": "Authentication required. Provide a valid API key or bearer token." }
  • 402 { "error": "insufficient_credits", "message": "Insufficient credits. Top up or subscribe to continue." }
  • 403 { "error": "api_key_paused", "message": "This API key is paused. Resume it at dashboard.xquik.com/api-keys to use it again." }
  • 429 { "error": "rate_limit_exceeded", "message": "Too many requests. Try again later.", "retryAfter": 60 }