Sleevy

Authorize a first-party client

Issue a short-lived authorization code for a first-party Sleevy client, such as the iOS app or the Raycast extension, using PKCE. Requires an App Session. Third-party integrations use the OAuth 2.1 endpoints under `/api/auth/oauth2` instead.

POST/connect/authorize

Issue a short-lived authorization code for a first-party Sleevy client, such as the iOS app or the Raycast extension, using PKCE. Requires an App Session. Third-party integrations use the OAuth 2.1 endpoints under /api/auth/oauth2 instead.

AuthorizationBearer <token>

Personal API Key or App Session bearer token.

In: header

Header Parameters

Idempotency-Key?string

A unique value identifying this write. The first response for a given key is recorded for 24 hours and replayed for every later request that repeats it, so a retry after a timeout cannot create a duplicate. Replayed responses carry Idempotent-Replay: true. A key whose original request is still running gets 409. Use a UUID or a ULID, and reuse a key only when retrying the same request.

Lengthlength <= 255

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

client*string

Value in

  • "chrome-extension"
  • "raycast"
redirectUri*string
codeChallenge*string
codeChallengeMethod*"S256"

Value in

  • "S256"
scopes*array<>
label*string
deviceHint?string|null

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/connect/authorize" \  -H "Idempotency-Key: 8f14e45f-ea4e-4a1f-9c2b-6f0a1d3c5e77" \  -H "Content-Type: application/json" \  -d '{    "client": "chrome-extension",    "redirectUri": "string",    "codeChallenge": "string",    "codeChallengeMethod": "S256",    "scopes": [      "saved-items:capture"    ],    "label": "string"  }'
{  "code": "string"}
{  "_tag": "ConnectError",  "code": "unknown_client",  "message": "string"}
{  "_tag": "Unauthorized",  "message": "string"}
{  "_tag": "RateLimitExceeded",  "message": "string"}