Tightly Sandbox API
The sandbox API from Tightly — 1 operation(s) for sandbox.
Operations 1
POST
/api/v1/sandbox/seed
Fill this sandbox with a starter catalogue so every other operation has…
#
The sandbox API from Tightly — 1 operation(s) for sandbox.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/tightly-io:tightly-io-sandbox-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
description: 'The public Tightly API. Authenticate with an API key as a bearer token; the key carries the organisation, so no X-Organization-ID header is sent. Every operation below states the scopes a key needs.
Every response carries two headers, whatever it answers: `X-Request-Id`, the handle on that one call, and `X-Tightly-Region`, the home that served it.
Every write accepts an optional `Idempotency-Key` request header, any string up to 255 characters. Send the same key twice and the second request is answered with the first one''s status and body instead of writing again, so a client that retried after a timeout ends holding the record''s id rather than creating a second one. Reusing a key with a different body, or while the first request is still running, is refused `409`. A write that failed releases its key. Keys answer for 24 hours and belong to the API key that used them.
Any operation can answer `503`, and it is about Tightly rather than about the request: a database briefly out of reach, which is what a failover or a full connection pool looks like from outside, or an idempotency store that could not answer. `message.desc` says which, and most carry a `Retry-After` header naming the seconds to wait. Where the sentence says nothing was written, the same request is safe to send again. Otherwise a read is safe to repeat and a write is not certain either way, because the connection was lost in the middle of it: read the object back before sending it a second time. An `Idempotency-Key` does not settle that one, and deliberately: a write that raised releases its key so the retry is a fresh attempt rather than a refusal for the next day. Branch on the status rather than on `code`, which is `POSTGRES_UNAVAILABLE` or `SERVICE_UNAVAILABLE` depending on which seam refused.'
title: Tightly Sandbox API
version: 2026-11
servers:
- url: https://api.app.tightly.io
security:
- ApiKey: []
tags:
- name: Sandbox
paths:
/api/v1/sandbox/seed:
post:
description: 'Writes a small starter set into the sandbox the key belongs to: two locations, two sales channels, two suppliers, three products with two variants each, and a stock level for every variant at both locations. Enough that every published read answers rows and every published write has a real channel, location and variant to name.
Send it with a `tly_test_` key and no body. It answers `200` whether it wrote anything or not: `seeded` says whether this call wrote, `already_seeded` says whether an earlier one did, and `written` counts the rows this call inserted, per table, which is zero once the sandbox is filled. So a partner''s CI can call it before every run and read one shape back.
Nothing is truncated, updated or deleted: every row is inserted on conflict do nothing, so a sandbox somebody has since loaded their own data into keeps it. The ids it writes are stable and prefixed `sbx-`, and they are not ids to build against: read your ids off `variants/table` and `inventory/table` as the examples do, because a sandbox seeded with something else holds different ones.
This is not the multi-season demo book. That is composed from bundles by Tightly and comes through support; this is the starter set an integrator needs on their first afternoon.
A live organisation is refused `409`, whatever key was used, and nothing is written.
Scope: `sandbox:write`, which includes `sandbox:read`.'
operationId: seed_sandbox
parameters:
- $ref: '#/components/parameters/TightlyVersion'
- $ref: '#/components/parameters/IdempotencyKey'
requestBody:
content:
application/json:
example: {}
schema:
description: No fields. The sandbox is the key's own organisation and the set is fixed.
type: object
required: false
responses:
'200':
content:
application/json:
example:
data:
already_seeded: false
read_next: GET /api/v1/variants/table?limit=5
seeded: true
written:
inventory_levels: 12
locations: 2
product_categories: 1
product_variants: 6
products: 3
sales_channels: 2
suppliers: 2
variant_sales_channels: 6
variant_suppliers: 6
message:
desc: ''
service: sandbox
severity: SUCCESS
schema:
properties:
data:
properties:
already_seeded:
description: Whether an earlier call had already filled this sandbox.
type: boolean
read_next:
description: The read to make next, so the answer names the way on.
type: string
seeded:
description: Whether this call wrote anything.
type: boolean
written:
description: Rows this call inserted, keyed by table. Every count is zero on a repeat.
type: object
type: object
message:
description: severity, service and desc.
type: object
type: object
description: 'The sandbox as this call left it. `written` counts the rows this call inserted, per table, so the first call reports the starter set and every call after it reports zeros beside `already_seeded: true`. One success code either way, because a repeat creates nothing and a client should read what happened out of the body rather than out of the status.
'
headers:
X-RateLimit-Limit:
$ref: '#/components/headers/X-RateLimit-Limit'
X-RateLimit-Remaining:
$ref: '#/components/headers/X-RateLimit-Remaining'
X-RateLimit-Reset:
$ref: '#/components/headers/X-RateLimit-Reset'
X-Request-Id:
$ref: '#/components/headers/X-Request-Id'
X-Tightly-Region:
$ref: '#/components/headers/X-Tightly-Region'
'401':
content:
application/json:
example:
code: key_invalid
message:
code: key_invalid
desc: The API key is not valid.
doc_url: https://app.tightly.io/docs/api/guides/errors#key_invalid
request_id: req_8e3b603fdcf44993b618b5ff7a2868ad
service: UNKNOWN
severity: ERROR
schema:
properties:
code:
description: The same stable code as message.code, at the envelope's top level.
type: string
message:
description: severity, service, desc. A keyed refusal also carries code, doc_url and request_id.
type: object
type: object
description: 'No usable key: malformed, unknown, revoked, expired or stopped. One refusal covers all five, because telling a caller which is which maps the surface for them. A request with no Authorization header at all is refused 400 before any key is looked for.
'
headers:
X-Request-Id:
$ref: '#/components/headers/X-Request-Id'
X-Tightly-Region:
$ref: '#/components/headers/X-Tightly-Region'
'403':
content:
application/json:
example:
code: scope_missing
message:
code: scope_missing
desc: This key cannot write Sandbox.
doc_url: https://app.tightly.io/docs/api/guides/errors#scope_missing
request_id: req_391944cd161d4b5a97359d0d06d0b28d
service: UNKNOWN
severity: ERROR
schema:
properties:
code:
description: The same stable code as message.code, at the envelope's top level.
type: string
message:
description: severity, service, desc. A keyed refusal also carries code, doc_url and request_id.
type: object
type: object
description: 'The key may not reach this operation. `scope_missing` when the key does not hold Sandbox for writing; `plan_excludes` when the organisation''s plan does not include the public API; `ip_not_allowed` when the caller''s address is outside the key''s allowlist.
'
headers:
X-Request-Id:
$ref: '#/components/headers/X-Request-Id'
X-Tightly-Region:
$ref: '#/components/headers/X-Tightly-Region'
'409':
content:
application/json:
example:
data:
already_seeded: false
seeded: false
message:
desc: This is not a sandbox organisation, so it cannot be seeded. Make a sandbox with POST /api/v1/developer/sandbox, mint a test key in it, and send this with that key.
service: sandbox
severity: ERROR
schema:
properties:
data:
type: object
message:
description: severity, service and desc.
type: object
type: object
description: 'This organisation is not a sandbox, so it cannot be seeded, and nothing was written. The sentence names the way out: make a sandbox with POST /api/v1/developer/sandbox, mint a test key in it, and send this with that key.
'
headers:
X-Request-Id:
$ref: '#/components/headers/X-Request-Id'
X-Tightly-Region:
$ref: '#/components/headers/X-Tightly-Region'
'429':
$ref: '#/components/responses/RateLimited'
'503':
$ref: '#/components/responses/DatabaseUnavailable'
security:
- ApiKey: []
summary: Fill this sandbox with a starter catalogue so every other operation has…
tags:
- Sandbox
x-tightly-scopes:
- sandbox:write
components:
responses:
DatabaseUnavailable:
content:
application/json:
example:
code: POSTGRES_UNAVAILABLE
message:
code: postgres_unavailable
desc: The database is unavailable right now. Try again in a few seconds.
doc_url: https://app.tightly.io/docs/api/guides/errors#postgres_unavailable
request_id: req_2e7b41c0d9384fa6b15c8073ea92d1f4
service: UNKNOWN
severity: ERROR
schema:
properties:
code:
description: The same stable code as message.code, at the envelope's top level.
type: string
message:
description: severity, service, desc, and on a keyed refusal code, doc_url and request_id.
type: object
type: object
description: The database is briefly out of reach, which is what a failover or a full connection pool looks like from outside. Wait the seconds `Retry-After` names and send the request again. A read is safe to repeat. A write is not, because the connection was lost in the middle of it, so read the object back before sending it a second time. Branch on the status rather than on `code`, which is `POSTGRES_UNAVAILABLE` from one of the two seams that raise this and `SERVICE_UNAVAILABLE` from the other.
headers:
Retry-After:
$ref: '#/components/headers/Retry-After'
X-Request-Id:
$ref: '#/components/headers/X-Request-Id'
X-Tightly-Region:
$ref: '#/components/headers/X-Tightly-Region'
RateLimited:
content:
application/json:
example:
code: rate_limited
message:
code: rate_limited
desc: This key has reached its limit of 600 reads a minute; try again in 12 seconds.
doc_url: https://app.tightly.io/docs/api/guides/errors#rate_limited
request_id: req_5c1a9f47b0e34d8f9a2c6e10b3d4f785
service: UNKNOWN
severity: ERROR
schema:
properties:
code:
description: The same stable code as message.code, at the envelope's top level.
type: string
message:
description: severity, service, desc, and on a keyed refusal code, doc_url and request_id.
type: object
type: object
description: The key has spent its allowance for this minute. 600 reads and 120 writes a minute, counted per key, refused calls included. `Retry-After` says how long to wait.
headers:
Retry-After:
$ref: '#/components/headers/Retry-After'
X-RateLimit-Limit:
$ref: '#/components/headers/X-RateLimit-Limit'
X-RateLimit-Remaining:
$ref: '#/components/headers/X-RateLimit-Remaining'
X-RateLimit-Reset:
$ref: '#/components/headers/X-RateLimit-Reset'
X-Request-Id:
$ref: '#/components/headers/X-Request-Id'
X-Tightly-Region:
$ref: '#/components/headers/X-Tightly-Region'
parameters:
IdempotencyKey:
description: A string of your own, up to 255 characters, that makes this write safe to retry. Send the same key twice and the second request is answered with the first one's status and body instead of writing again, so a client that retried after a timeout ends holding the record's id rather than creating a second one. Reusing a key with a different body, or while the first request is still running, is refused `409`. A write that failed releases its key. Keys answer for 24 hours and belong to the API key that used them. A key longer than 255 characters is ignored and the write goes ahead without the guarantee.
in: header
name: Idempotency-Key
required: false
schema:
examples:
- b8f1c0d2-6a4e-4f39-9c21-0d5f2e7a1b44
maxLength: 255
type: string
TightlyVersion:
description: The date train to answer on. One train exists today, `2026-11`, the one this reference describes and the one every key is minted on, so the call answers on it with or without this header. Send it anyway, so a client built now names its train from the start.
in: header
name: Tightly-Version
required: false
schema:
examples:
- 2026-11
type: string
headers:
X-RateLimit-Reset:
description: Unix seconds. The moment the allowance is whole again.
schema:
examples:
- 1793491260
type: integer
X-Tightly-Region:
description: The home that served the call. `us` for every organisation today.
schema:
examples:
- us
type: string
Retry-After:
description: Seconds to wait before sending the request again.
schema:
examples:
- 12
type: integer
X-Request-Id:
description: The handle on this one call. Quote it in a support conversation, or find the call by it in the key's Usage.
schema:
examples:
- req_8f3c1d0a6b2e4a519c772e0a4b6d1f83
type: string
X-RateLimit-Limit:
description: The ceiling on the allowance this call spent, per key, per minute. Reads and writes are counted apart, so the number moves with the verb.
schema:
examples:
- 600
type: integer
X-RateLimit-Remaining:
description: What is left of that allowance, this call included. Never below zero.
schema:
examples:
- 597
type: integer
securitySchemes:
ApiKey:
description: 'An API key from Settings > Developer > API keys, sent as `Authorization: Bearer tly_live_...`. The key carries the organisation.'
scheme: bearer
type: http