Skip to content
Docs

Pin a post

Early access. Tell us what you're building and we'll set you up. Contact us

POSTapi.lempile.com/accounts/{account_id}/posts/{status_id}/pin

Pins one of the account's own posts to its profile. X keeps one pinned post: a new pin replaces it (previous_pinned_id). Answers only once the profile shows it. {"dry_run": true} opens X's menu, reads it and closes it.

Scope: accounts.write.

Authentication

X-API-KEY header·A Lempile API key, made in the dashboard under Access tokens.

Path parameters

  • account_idstringrequired

    Lempile id, X user id or handle.

  • status_idstringrequired

    The post's id (5–25 digits).

Headers

  • Idempotency-Keystring

    Optional. With a key, the write gets a receipt (GET /writes/{key}) and a repeat replays the first answer.

    ≤ 200 chars

Request body

  • dry_runboolean

Responses

200

Done, or already so.

›

application/json

  • objectstring
    One ofPostPinPostPinDryRun
  • providerany
    AlwaysX
  • statusstring
    One ofpinnedunpinnedalready_pinnedalready_unpinned
  • status_idstring
  • previous_pinned_idstring | null
  • alreadyboolean
  • wouldstring
  • not_sentboolean
400

errors/not_own_post.

›

application/problem+json

  • typestringrequired
  • titlestring
  • statusintegerrequired
  • detailstring
  • retry_atstring · date-time
  • codestring

    The browser's own reason, when it refused before the click: replies_limited, post_not_accepted, gif_not_found, browser_busy…

401

Missing or invalid API key ({error, message}), errors/disconnected_account, or errors/reauth_required when X is signed out in the account's browser.

›

application/problem+json

  • typestringrequired
  • titlestring
  • statusintegerrequired
  • detailstring
  • retry_atstring · date-time
  • codestring

    The browser's own reason, when it refused before the click: replies_limited, post_not_accepted, gif_not_found, browser_busy…

402

subscription_required: the workspace has no active trial or subscription.

›

application/problem+json

  • typestringrequired
  • titlestring
  • statusintegerrequired
  • detailstring
  • retry_atstring · date-time
  • codestring

    The browser's own reason, when it refused before the click: replies_limited, post_not_accepted, gif_not_found, browser_busy…

404

errors/post_not_found.

›

application/problem+json

  • typestringrequired
  • titlestring
  • statusintegerrequired
  • detailstring
  • retry_atstring · date-time
  • codestring

    The browser's own reason, when it refused before the click: replies_limited, post_not_accepted, gif_not_found, browser_busy…

422

errors/pin_unavailable or errors/profile_not_loaded.

›

application/problem+json

  • typestringrequired
  • titlestring
  • statusintegerrequired
  • detailstring
  • retry_atstring · date-time
  • codestring

    The browser's own reason, when it refused before the click: replies_limited, post_not_accepted, gif_not_found, browser_busy…

423

errors/x_account_locked: X shows the account its lock page (x.com/account/access). Nothing was done; someone has to pass X's check.

›

application/problem+json

  • typestringrequired
  • titlestring
  • statusintegerrequired
  • detailstring
  • retry_atstring · date-time
  • codestring

    The browser's own reason, when it refused before the click: replies_limited, post_not_accepted, gif_not_found, browser_busy…

502

errors/pin_unconfirmed: check the profile.

›

application/problem+json

  • typestringrequired
  • titlestring
  • statusintegerrequired
  • detailstring
  • retry_atstring · date-time
  • codestring

    The browser's own reason, when it refused before the click: replies_limited, post_not_accepted, gif_not_found, browser_busy…

503

errors/service_unavailable (the account isn't ready, or the browser runner can't be reached), errors/no_client_session, or errors/maintenance with retry_at.

›

application/problem+json

  • typestringrequired
  • titlestring
  • statusintegerrequired
  • detailstring
  • retry_atstring · date-time
  • codestring

    The browser's own reason, when it refused before the click: replies_limited, post_not_accepted, gif_not_found, browser_busy…

504

errors/timeout.

›

application/problem+json

  • typestringrequired
  • titlestring
  • statusintegerrequired
  • detailstring
  • retry_atstring · date-time
  • codestring

    The browser's own reason, when it refused before the click: replies_limited, post_not_accepted, gif_not_found, browser_busy…

Was this page helpful?