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

# Synq REST API Reference: Endpoints, Auth, and Error Codes

> Explore the Synq REST API: base URL, request and response formats, authentication, HTTP status codes, and rate limits for every resource.

The Synq REST API gives you programmatic access to every resource on the platform — products, orders, inventory, channels, integrations, and more. All communication happens over HTTPS using JSON. Before making your first request, read the [Authentication](/api/authentication) page to learn how to obtain and attach your credentials.

## Base URL

Every API request targets the following base URL:

```
https://api.synq.io
```

All resource endpoints are prefixed with `/api/v1/`. Webhook endpoints delivered by Synq to your infrastructure use the `/unified/` prefix instead.

## Request Format

Send all request bodies as JSON and include the `Content-Type` header on any request that carries a body:

```http theme={null}
Content-Type: application/json
```

Requests with a body larger than **10 MB** are rejected with `413 Content Too Large`.

## Response Format

Every response body is JSON. Successful responses contain the requested or mutated resource. Error responses follow a consistent shape:

```json theme={null}
{
  "error": "A human-readable description of what went wrong."
}
```

## Authentication

Every protected endpoint requires a valid Bearer token in the `Authorization` header. The token encodes your identity, tenant, and organization so that each request is automatically scoped to your data. See the [Authentication](/api/authentication) guide for the full details.

## API Resources

<CardGroup cols={2}>
  <Card title="Products" icon="tag" href="/api/products">
    Create and manage your product catalog, variants, and attributes.
  </Card>

  <Card title="Orders" icon="cart-shopping" href="/api/orders">
    Place, track, fulfill, and return orders across all your channels.
  </Card>

  <Card title="Inventory" icon="warehouse" href="/api/inventory">
    Query stock levels, reserve units, and adjust inventory in real time.
  </Card>

  <Card title="Channels" icon="globe" href="/api/channels">
    Configure the sales channels that feed orders into Synq.
  </Card>

  <Card title="Integrations" icon="plug" href="/api/integrations">
    Connect third-party platforms and manage OAuth callbacks.
  </Card>

  <Card title="Organization" icon="building" href="/api/organization">
    Manage your organization profile, members, and roles.
  </Card>

  <Card title="Settings" icon="gear" href="/api/settings">
    Read and update tenant-level configuration and preferences.
  </Card>

  <Card title="Audit" icon="clock-rotate-left" href="/api/audit">
    Query the immutable audit log for all actions taken in your tenant.
  </Card>
</CardGroup>

## HTTP Status Codes

Synq uses standard HTTP status codes. The table below covers every code you may encounter.

| Code                        | Meaning                  | When you see it                                                                                                                         |
| --------------------------- | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------- |
| `200 OK`                    | Request succeeded        | The resource was retrieved or updated successfully.                                                                                     |
| `201 Created`               | Resource created         | A new resource was persisted. The response body contains the created object.                                                            |
| `202 Accepted`              | Request queued           | The request was accepted for asynchronous processing (for example, a bulk import). Poll the relevant status endpoint for the result.    |
| `400 Bad Request`           | Invalid request          | The request body is malformed, a required field is missing, or a value fails validation. Inspect the `error` field for details.         |
| `401 Unauthorized`          | Missing or invalid token | The `Authorization` header is absent or the Bearer token has expired or is invalid. Refresh your token and retry.                       |
| `403 Forbidden`             | Insufficient permissions | Your token is valid but your role does not permit this action, or a required claim is missing from your token.                          |
| `404 Not Found`             | Resource missing         | The requested resource does not exist or is not visible to your tenant.                                                                 |
| `429 Too Many Requests`     | Rate limit exceeded      | You have sent too many requests in a short window. Wait for the number of seconds in the `Retry-After` response header before retrying. |
| `500 Internal Server Error` | Server error             | An unexpected error occurred on Synq's side. Retry the request using exponential backoff. If the problem persists, contact support.     |

## Rate Limiting

The API enforces a **sliding-window rate limit of 100 requests per minute** per IP address. Every response includes the following headers so you can track your usage:

| Header                  | Description                                                        |
| ----------------------- | ------------------------------------------------------------------ |
| `X-RateLimit-Limit`     | The maximum number of requests allowed in the current window.      |
| `X-RateLimit-Remaining` | The number of requests you have left in the current window.        |
| `Retry-After`           | Seconds to wait before retrying (only present on `429` responses). |

<Note>
  When you exceed the limit, the API returns `429 Too Many Requests`. Wait for the number of seconds indicated in the `Retry-After` header before sending your next request.
</Note>
