---
title: "Post a tweet"
method: POST
path: "/v1/x/tweets"
tags: ["x"]
---

# Post a tweet

`POST /v1/x/tweets`

## Request

- Base URL: `https://chatterapi.com`
- URL: `https://chatterapi.com/v1/x/tweets`
- Auth: HTTP bearer

Post a tweet or a reply from a connected X account. Needs accountId, text (up to 280 characters) and an idempotencyKey; pass replyToTweetId to reply. Costs 5 credits on success. Tip: never post the same text twice; X rejects duplicates and that reply fails. Costs 5 credits.

## Headers

- `Idempotency-Key` string, required

## Request body

- object
  - `accountId` string, uuid, required: Id of an X account you connected in the dashboard.
  - `text` string, required: Tweet text, up to 280 characters.
  - `replyToTweetId` string: Tweet id or URL to reply to.

## Response `200`

Success

- object
  - `data` XWriteResult, required (unresolved $ref)
  - `credits` Credits, required
    - `charged` integer, required
    - `remaining` integer, required
  - `requestId` string, required
  - `cached` boolean, required
  - `warnings` Warning[]
    - `code` 'partial_data' | 'stale_data' | 'platform_unavailable' | 'source_unavailable', required
    - `platform` 'reddit' | 'x'
    - `source` string
    - `fields` string[]

## Other responses

- `400`: Bad request: invalid_input
- `401`: Unauthorized: missing_key, invalid_key, key_revoked
- `402`: Payment required: insufficient_credits
- `403`: Forbidden: account_suspended, scope_denied
- `404`: Not found: not_found
- `409`: Conflict: x_account_required, x_account_needs_reconnect
- `429`: Too many requests: rate_limited
- `500`: Internal error: internal
- `502`: Bad gateway: upstream_error
- `504`: Gateway timeout: upstream_timeout

---

[API](https://skmtc.dev/chatterapi/apis/chatterapi-api.md) · [All operations](https://skmtc.dev/chatterapi/apis/chatterapi-api/llms.txt) · [OpenAPI document](https://skmtc.dev/chatterapi/apis/chatterapi-api/revisions/74036d6f908a?raw)
