---
title: "Save style profile with custom tweets"
method: PUT
path: "/api/v1/styles/{id}"
tags: ["Composition"]
---

# Save style profile with custom tweets

`PUT /api/v1/styles/{id}`

Creates or replaces a style profile from supplied posts.

## Path parameters

- `id` string, required

## Request body

- object
  - `label` string, required — Display label. Must match the path ID, ignoring case.
  - `tweets` object[], required — Array of tweet objects
    - `text` string, required

## Response `200`

Style profile saved

- 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

- `400` — Invalid input
- `401` — Unauthenticated
- `429` — Xquik tier rate limit exceeded. The response includes a `Retry-After` header with the number of seconds to wait before retrying.
- `default` — Unexpected error.

## Changes

- **2026-08-21** `18302a60cfee` — 6 breaking, 1 info
  - the response's body type/format changed from `object`/`` to ``/`` for status `200`
  - removed the required property `fetchedAt` from the response with the `200` status
  - removed the required property `isOwnAccount` from the response with the `200` status
  - removed the required property `tweetCount` from the response with the `200` status
  - …3 more
- **2026-08-12** `5d4938bb7de3` — 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-2/changes/api/v1/styles/:id/put.md)

---

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