---
title: "Analyze writing style from recent tweets"
method: POST
path: "/styles"
tags: ["Composition"]
---

# Analyze writing style from recent tweets

`POST /styles`

Builds a writing style profile from recent public posts.

## Request body

- object
  - `username` string, required — X username to analyze

## Response `200`

Fresh cached style profile returned

- StyleProfile — Style profile summary with tweet count and ownership flag.
  - `xUsername` string, required
  - `tweetCount` integer, required
  - `isOwnAccount` boolean, required
  - `fetchedAt` string, date-time, required
  - `tweets` object[], required
    - `id` string, required
    - `text` string, required
    - `createdAt` string
    - `authorUsername` string

## Other responses

- `201` — Style profile created or refreshed
- `400` — Invalid input
- `401` — Unauthenticated
- `402` — Payment required. MPP reads include `WWW-Authenticate`. Authenticated reads include balances and checkout. Guest keys expose guest top-up only. A failed request never creates checkout. Confirm first.
- `429` — Xquik tier rate limit exceeded. The response includes a `Retry-After` header with the number of seconds to wait before retrying.

## Changes

- **2026-08-24** `5b381ffca02c` — 13 breaking, 3 info
  - the response's body type/format changed from `object`/`` to ``/`` for status `200`
  - the response's body type/format changed from `object`/`` to ``/`` for status `201`
  - the `oneOf[subschema #4]/allOf[subschema #2]/` response's property type/format changed from ``/`` to `object`/`` for status `402`
  - removed the required property `fetchedAt` from the response with the `200` status
  - …12 more
- **2026-08-19** `73cd0a1d989c` — 72 warning
  - added the new `closed` enum value to the `allOf[#/components/schemas/Error]/error/oneOf[subschema #1: LegacyErrorCode]/` response property for the response status `429`
  - added the new `closed` enum value to the `allOf[#/components/schemas/Error]/error/oneOf[subschema #2: StructuredError]/code` response property for the response status `429`
  - added the new `closed` enum value to the `error/oneOf[subschema #1: LegacyErrorCode]/` response property for the response status `400`
  - added the new `closed` enum value to the `error/oneOf[subschema #1: LegacyErrorCode]/` response property for the response status `401`
  - …68 more
- …earlier changes not shown

[Full history](https://skmtc.dev/xquik-dev/apis/xquik-api-3/changes/styles/post.md)

---

[API](https://skmtc.dev/xquik-dev/apis/xquik-api-3.md) · [All operations](https://skmtc.dev/xquik-dev/apis/xquik-api-3/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/xquik-dev/xquik-api-3/revisions/5b381ffca02c/schema)
