Skip to main content
GET
Twitter API Errors & X Write Action Status
Every X write returns a durable x_write_action record. Store its id or writeActionId. Poll statusUrl whenever terminal is false.

Handle Twitter API Errors

Use this endpoint for Twitter API error handling after an Xquik write. Xquik adds a durable write record beside ordinary HTTP response codes. An error message does not prove that a write failed. A timeout can occur after dispatch. Trust terminal, safeToRetry, sendDispatched, and nextAction. Review X’s response codes and errors. Xquik’s write status record uses different fields.
Trust terminal, safeToRetry, and nextAction. Never infer retry safety from an HTTP status or error name alone.

Agent Algorithm

  1. Generate one unique Idempotency-Key for the intended write.
  2. Submit the write once.
  3. Store id, request.hash, account, target, billing, and statusUrl.
  4. When terminal is false, wait for Retry-After or pollAfterMs.
  5. Poll statusUrl until terminal is true.
  6. Record result and settled billing.
  7. Retry only when safeToRetry is true, using a new key.
  8. When nextAction.type is verify_result, verify the external state first.
Reuse the original Idempotency-Key only to replay the same account, action, target, and payload. The replay returns the same durable action.

Lifecycle

Active actions return 202, Location, and Retry-After. Terminal actions return 200 from this endpoint.

Request

Headers

string
Send your Xquik API key in this header.
string
Send an OAuth 2.1 bearer token instead of x-api-key.

Path Parameters

string
required
Durable action ID returned by the original write.

Response

Polling is complete. Store result and settled billing. Follow safeToRetry and nextAction before any new attempt.
string
Always x_write_action.
string
Durable action ID.
string
This field aliases id.
string
Exact write operation.
string
Current lifecycle status.
boolean
This field is true when polling can stop.
boolean
This field is true when a later attempt could succeed.
boolean
This field is true when a new attempt is safe.
string
Relative polling URL.
number | null
Recommended polling delay.
boolean
true after billing settles as charged.
string
Settled credits charged.
object
Planned and settled billing state.
object
Stable hash and exact sanitized payload.
object
Connected account selected for this write.
object | null
Target type and ID.
string | null
Target ID alias.
object | null
Confirmed result or desired state.
object | null
Required poll, retry, or verification step.
string
Stable request fingerprint.
string
Correlation ID echoed in X-Request-Id.
boolean
true when this response replays an action.
string
Machine-readable error code.
string
Actionable status or error message.
boolean
This field is true after dispatch.
string
ISO 8601 dispatch time.
string
ISO 8601 creation time.
string
ISO 8601 latest update time.
string
ISO 8601 terminal time.
string
Nonterminal resolution deadline.
string
ISO 8601 confirmation time.
string
ISO 8601 latest confirmation check.
number
Confirmation attempt count.
string
Confirmed tweet ID when available.
string
Confirmed direct message ID when available.
string
Confirmed media ID when available.
string
Public media URL when available.
string
Confirmed community ID when available.
string
Confirmed community name when available.
string
Result ID alias.
object
Media details when used.
object
Structured recovery context.
boolean
This field is true when status equals success.

Retry Rules

  • retryable: false, safeToRetry: false: do not retry.
  • retryable: true, safeToRetry: false: verify the result first.
  • safeToRetry: true: request approval and retry using a new key.
  • terminal: false: poll, even when the original HTTP response was an error.
Idempotency replay protection remains active for at least 90 days.