X Write
Twitter API Errors & X Write Action Status
Handle Twitter API errors by polling tweet, reply, DM, follow, like, repost, media, profile, and community writes. Check results, billing, and safe retries.
- 200
- 202
- 401
- 404
- 429
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. Trustterminal, 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
- Generate one unique
Idempotency-Keyfor the intended write. - Submit the write once.
- Store
id,request.hash,account,target,billing, andstatusUrl. - When
terminalisfalse, wait forRetry-AfterorpollAfterMs. - Poll
statusUrluntilterminalistrue. - Record
resultand settledbilling. - Retry only when
safeToRetryistrue, using a new key. - When
nextAction.typeisverify_result, verify the external state first.
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
- 200 Terminal
- 202 Active
- 401 Unauthenticated
- 404 Not Found
- 429 Rate Limited
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.
- 200
- 202
- 401
- 404
- 429
Twitter API Errors & X Write Action Status