The ShingleAI API provides programmatic access to your business communication data, including messages, contacts, customers, and businesses. Use it to build integrations, automate workflows, and extend ShingleAI’s capabilities.Documentation Index
Fetch the complete documentation index at: https://docs.shingleai.com/llms.txt
Use this file to discover all available pages before exploring further.
Base URL
All API requests should be made to:Do not include a trailing slash in the base URL. Endpoints are appended directly, e.g.,
https://api.shingleai.com/v1/contacts.v1 being the current stable version. When breaking changes are introduced, a new version will be released.
Request Format
The API accepts JSON-encoded request bodies and returns JSON-encoded responses.Required Headers
| Header | Value | Description |
|---|---|---|
Authorization | Bearer <api-key> | Your API key for authentication |
Content-Type | application/json | Required for POST, PUT, and PATCH requests |
Response Headers
Every API response includes these headers:| Header | Description |
|---|---|
X-Request-ID | Unique identifier for the request. Include this when contacting support for debugging |
Rate limit response headers (
X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset) are not yet emitted. See Rate Limits for the current enforcement behavior.Shared conventions
Every endpoint in the API follows the same conventions for response shape, pagination, errors, timestamps, and IDs. Once you’ve learned them here, you can skim the resource-specific reference pages without rediscovering them each time.Response envelope
All successful responses wrap the payload in adata field:
meta.pagination block:
hasMore is computed server-side. total is included when the underlying query can provide it cheaply; otherwise it is omitted and you should rely on hasMore to know when to stop paginating. The request identifier is returned in the X-Request-ID response header, not in the body.
When
total is omitted, hasMore is inferred from whether the page returned exactly limit items. This means a page that happens to fill exactly to limit will report hasMore: true even if it is the last page — your next request will simply return an empty data array. Always stop paginating when you receive an empty page, not just when hasMore becomes false.Pagination
List endpoints accept three query parameters:| Parameter | Default | Accepted values | Description |
|---|---|---|---|
limit | 10 | 1–100 | Number of items to return |
offset | 0 | ≥ 0 | Number of items to skip |
sortOrder | desc | asc | desc | Sort direction, typically by createdAt |
Error responses
Errors use a single consistent shape:details is present on validation errors and omitted otherwise. Validation errors are returned as a tree mirroring the request body: each node has an errors array (issues that apply at that path), and object nodes additionally have a properties map keyed by field name. The top-level errors array carries issues that apply to the request as a whole. Status codes you’ll see:
| Status | Meaning |
|---|---|
400 | Validation error or malformed request |
401 | Missing or invalid API key |
402 | Insufficient credits for the requested operation |
403 | API key lacks the permissions required for this endpoint |
404 | Resource does not exist (or is soft-deleted) |
500 | Unexpected server error |
503 | Temporarily unavailable (e.g., database outage) |
Soft deletes
DELETE endpoints perform soft deletes: the record is retained with a deletedAt timestamp set. Soft-deleted records are filtered out of list and get responses — there is currently no query flag to include them. If you need to recover a record, contact support.
Timestamps and IDs
- Timestamps are ISO 8601 UTC strings, e.g.,
2024-01-15T09:30:00Z. Every resource returnscreatedAtandupdatedAt, plus a nullabledeletedAt. - Identifiers are UUID v4 strings (for example,
550e8400-e29b-41d4-a716-446655440000). Every resource usesidas its primary key, and foreign keys follow the<resource>Idconvention (contactId,businessId, etc.).
SDKs
Official SDKs for TypeScript and Python are coming soon. In the meantime, you can use the REST API directly with any HTTP client.
OpenAPI Specification
The ShingleAI API is documented using OpenAPI 3.1. You can access the specification at:Next Steps
Authentication
Learn how to create and use API keys
Error Handling
Understand error responses and codes