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

# Best Practices

> Follow these best practices to build reliable, secure, and user-friendly integrations that scale with your users.

Follow these best practices to build reliable, secure, and user-friendly integrations that scale with your users.

## API Usage

<CardGroup cols={1}>
  <Card title="Respect Rate Limits" icon="zap">
    Implement exponential backoff when you hit rate limits. Cache responses when possible to reduce API calls.
  </Card>

  <Card title="Handle Pagination" icon="list">
    Use cursor-based pagination for large result sets. Don't request more data than you need.
  </Card>

  <Card title="Secure Token Storage" icon="shield">
    Store access tokens and refresh tokens securely. Never log tokens or expose them in client-side code.
  </Card>
</CardGroup>

## Webhook Handling

<Steps>
  <Step title="Respond quickly">
    Return a 2xx response within 5 seconds. Queue processing for later if needed.
  </Step>

  <Step title="Implement idempotency">
    Store webhook IDs to handle duplicate deliveries gracefully.
  </Step>

  <Step title="Verify signatures">
    Always validate webhook signatures before processing payloads.
  </Step>

  <Step title="Handle failures">
    Log failed processing and implement retry mechanisms.
  </Step>
</Steps>

## Error Handling

| Error Type              | Recommended Action                                            |
| ----------------------- | ------------------------------------------------------------- |
| `400 Bad Request`       | Check your request parameters and payload format              |
| `401 Unauthorized`      | Refresh the access token and retry                            |
| `403 Forbidden`         | Request additional scopes from the user                       |
| `404 Not Found`         | Verify the resource ID exists                                 |
| `429 Too Many Requests` | Implement exponential backoff                                 |
| `500 Server Error`      | Retry with exponential backoff, contact support if persistent |

## User Experience

* **Clear onboarding** — Guide users through setup with clear instructions and progress indicators.
* **Helpful error messages** — Show actionable error messages that help users resolve issues.
* **Sync status** — Show sync status and last successful sync time.
* **Easy disconnection** — Provide a clear way for users to disconnect your app.

## Next Steps

<CardGroup cols={2}>
  <Card title="App Guidelines" icon="settings" href="/apps/guidelines">
    Review listing requirements.
  </Card>

  <Card title="Submit for Review" icon="check-circle" href="/apps/app-review">
    Get your app approved.
  </Card>
</CardGroup>
