Skip to content
Docs

Retrieve a write receipt

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

GETapi.lempile.com/api/v1/writes/{key}

What became of one write, by its Idempotency-Key. state is done (sent: response is the answer), failed (nothing was sent: response is the problem), pending (still running, or not sure; response is null) or none (no write with that key: a dry run, for example). The browser's answer is kept 48 hours, also after the request stopped waiting.

After a not-sure post, Lempile checks the account's own profile itself: the post is there (done, with its post_id), or two complete reads of the profile, 15 and 30 minutes after the post, find nothing new (failed, 422 errors/not_sent: it can be sent again). While it checks, for 90 minutes at most, the receipt is pending with a detail and check_ends_by. When the check can't tell, it stays pending: check on Instagram, then mark it not sent if it isn't there.

Scope: accounts.read.

Authentication

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

Path parameters

  • keystringrequired

    The write's Idempotency-Key.

Responses

200

The receipt.

›

application/json

  • objectany
    AlwaysWriteStatus
  • keystring
  • statestring
    One ofnonependingdonefailed
  • statusinteger
  • responseobject | null
  • detailstring

    Only while Lempile checks the account's profile for a not-sure post: its next look and when it ends.

  • check_ends_bystring · date-time

    Only while Lempile checks the account's profile for a not-sure post: it settles the write by then at the latest.

401

A missing or invalid API key answers { "error": "unauthorized", "message" }. errors/disconnected_account (problem JSON): Instagram signed the account out; connect it again.

›

application/json

  • errorstringrequired
  • messagestring
402

subscription_required (in error): the workspace has no active trial or subscription.

›

application/json

  • errorstringrequired
  • messagestring
403

errors/insufficient_permissions (the key lacks the scope), errors/account_restricted (Instagram blocked the action, restricted the account or asks for a check: someone has to look at it on Instagram) or errors/action_required (the account waits for something done on Instagram itself; account_status and reason say what).

›

application/problem+json

  • typestringrequired
  • titlestring
  • statusintegerrequired
  • detailstring

    What happened, in words, and whether anything was done.

  • codestring

    On a 429: too_fast, daily_limit or hourly_limit.

  • retry_afterinteger

    Seconds to wait.

  • retry_atstring · date-time

Was this page helpful?