---
title: "Follow / unfollow"
method: POST
path: "/v1/x/actions/follow"
tags: ["x"]
---

# Follow / unfollow

`POST /v1/x/actions/follow`

## Request

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

Follow or unfollow an X account from a connected account. Needs accountId, a target (handle or user id), action follow or unfollow, and an idempotencyKey. Costs 5 credits on success. Tip: following a lead before a DM makes the DM land in their main inbox more often, but pace it; accounts have a daily action limit. 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.
  - `action` 'follow' | 'unfollow': Follow or unfollow.
  - `targetHandle` string: Handle to act on. Pass this or targetId.
  - `targetId` string: User id to act on. Pass this or targetHandle.

## 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)
