API reference

Sluice API v3

A REST API with JSON bodies, bearer authentication and predictable errors. Every endpoint has a curl example you can paste into a terminal.

Base URL

api.sluicehq.dev/v3

Base URL

api.sluicehq.dev/v3

Authentication

Bearer secret key

Format

JSON over HTTPS

Rate limit

100 requests/s per key

Authentication

Send your secret key in the Authorization header of every request. Keys starting with sk_test_ work in test mode and keys starting with sk_live_ in live mode. Requests without a valid key get a 401.

curl https://api.sluicehq.dev/v3/apps \
  -H "Authorization: Bearer sk_test_4f9a2c7e1b"

Errors

Errors come back as JSON with a stable code you can match on and a message written for people.

{
  "error": {
    "code": "event_type_unknown",
    "message": "No event type named invoice.payed. Did you mean invoice.paid?"
  }
}

400

Bad request

Bad request

A parameter is missing or has the wrong type.

A parameter is missing or has the wrong type.

401

Unauthorized

Unauthorized

The key is missing, revoked or from the other mode.

The key is missing, revoked or from the other mode.

404

Not found

Not found

The app, endpoint or event does not exist.

The app, endpoint or event does not exist.

409

Conflict

Conflict

An idempotency key was reused with a different body.

An idempotency key was reused with a different body.

422

Invalid event

Invalid event

The payload does not match the event type schema.

The payload does not match the event type schema.

429

Too many requests

Too many requests

Slow down and retry after the Retry-After header.

Slow down and retry after the Retry-After header.

500

Server error

Server error

Something broke on our side. Retrying is safe.

Something broke on our side. Retrying is safe.

Create a free website with Framer, the website builder loved by startups, designers and agencies.