> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xquik.com/llms.txt
> Use this file to discover all available pages before exploring further.

# X account connection API to retry failed accounts

> Clear temporary login failures for connected X accounts in one call. Credential, TOTP, passkey, locked, or suspended accounts need re-authentication or X fixes.

<Panel>
  <Tabs defaultTabIndex={0} sync={false}>
    <Tab title="200" id="response-x-accounts-bulk-retry-200">
      ```json theme={null}
      {
        "cleared": 3
      }
      ```
    </Tab>

    <Tab title="401" id="response-x-accounts-bulk-retry-401">
      ```json theme={null}
      {
        "error": "unauthenticated",
        "message": "Authentication required. Provide a valid API key or bearer token."
      }
      ```
    </Tab>

    <Tab title="429" id="response-x-accounts-bulk-retry-429">
      ```json theme={null}
      {
        "error": "rate_limit_exceeded",
        "message": "Too many requests. Try again later.",
        "retryAfter": 60
      }
      ```
    </Tab>
  </Tabs>
</Panel>

<blockquote className="agent-llms-directive">
  For the complete documentation index, see <a href="/llms.txt">llms.txt</a>.
</blockquote>

<Callout icon="circle-check" color="#16a34a">
  **Free.** This endpoint does not consume credits.
</Callout>

<Info>
  Bulk retry clears only `transient` and `automated` login-failure states. It does not update passwords, TOTP secret keys, passkeys, email challenges, locked accounts, or suspended accounts. Use re-authentication or reconnect for credential and 2FA fixes. Resolve locks or suspensions on X first.
</Info>

This route clears temporary login-failure state. Those accounts retry on the next read, write, monitor, or account action. Use it when the dashboard shows accounts with temporary issues.

## What gets retried

<CardGroup cols={1}>
  <Card title="Xquik clears temporary issues" icon="refresh-cw">
    Xquik clears accounts whose stored failure reason is `transient` or `automated`. These accounts become eligible to reconnect on their next use.
  </Card>

  <Card title="Xquik skips credential fixes" icon="key-round">
    Accounts that need fresh credentials or a security challenge stay unchanged. Use [Re-authenticate](/api-reference/x-accounts/reauth) or reconnect the account instead.
  </Card>

  <Card title="X restrictions stay blocked" icon="shield-alert">
    Locked and suspended accounts stay unchanged. Resolve the restriction on X first, then re-authenticate or reconnect if needed.
  </Card>

  <Card title="Response is an aggregate" icon="list-checks">
    The API returns only `cleared`, the number of accounts reset for retry. Call [List X Accounts](/api-reference/x-accounts/list) before and after if you need per-account status.
  </Card>
</CardGroup>

The dashboard button works the same way. It appears when accounts have temporary issues. After you confirm, it clears retryable failures and refreshes the account list. It does not reconnect the accounts immediately.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://xquik.com/api/v1/x/accounts/bulk-retry \
    -H "x-api-key: xq_YOUR_KEY_HERE" | jq
  ```

  ```javascript Node.js theme={null}
  const response = await fetch("https://xquik.com/api/v1/x/accounts/bulk-retry", {
    method: "POST",
    headers: {
      "x-api-key": "xq_YOUR_KEY_HERE",
    },
  });
  const data = await response.json();
  console.log(`Cleared ${data.cleared} accounts`);
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://xquik.com/api/v1/x/accounts/bulk-retry",
      headers={"x-api-key": "xq_YOUR_KEY_HERE"},
  )
  data = response.json()
  print(f"Cleared {data['cleared']} accounts")
  ```

  ```go Go theme={null}
  package main

  import (
      "encoding/json"
      "fmt"
      "net/http"
  )

  func main() {
      req, err := http.NewRequest("POST", "https://xquik.com/api/v1/x/accounts/bulk-retry", nil)
      if err != nil {
          panic(err)
      }
      req.Header.Set("x-api-key", "xq_YOUR_KEY_HERE")

      resp, err := http.DefaultClient.Do(req)
      if err != nil {
          panic(err)
      }
      defer resp.Body.Close()

      var data map[string]interface{}
      if err := json.NewDecoder(resp.Body).Decode(&data); err != nil {
          panic(err)
      }
      fmt.Printf("Cleared %.0f accounts\n", data["cleared"])
  }
  ```
</CodeGroup>

## Headers

<ParamField header="x-api-key" type="string" required>
  Your API key. Generate a key from the [dashboard](https://xquik.com/dashboard).
</ParamField>

## Response

### 200 OK

<ResponseField name="cleared" type="integer">
  Number of accounts cleared for retry.
</ResponseField>

```json theme={null}
{
  "cleared": 3
}
```

### 401 Unauthenticated

```json theme={null}
{ "error": "unauthenticated", "message": "Missing or invalid API key" }
```

Missing or invalid API key.

### 429 Rate limited

```json theme={null}
{
  "error": "rate_limit_exceeded",
  "message": "Too many requests. Try again later.",
  "retryAfter": 60
}
```

Wait for the `Retry-After` value before retrying account recovery again.

<Note>
  **Related.** [List X Accounts](/api-reference/x-accounts/list) to check account statuses, or [Re-authenticate](/api-reference/x-accounts/reauth) to fix one account.
</Note>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.