Exchange an authorization code for an API key
Exchange a code from `POST /connect/authorize`, together with its PKCE verifier, for a scoped API Key. The code is single-use and expires quickly.
/connect/exchangeExchange a code from POST /connect/authorize, together with its PKCE verifier, for a scoped API Key. The code is single-use and expires quickly.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Value in
- "chrome-extension"
- "raycast"
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/connect/exchange" \ -H "Content-Type: application/json" \ -d '{ "client": "chrome-extension", "code": "string", "codeVerifier": "string" }'{ "apiKey": "string", "scopes": [ "saved-items:capture" ], "label": "string"}{ "_tag": "ConnectError", "code": "unknown_client", "message": "string"}{ "_tag": "RateLimitExceeded", "message": "string"}Authorize a first-party client POST
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.
Create a folder POST
Create a Folder. The name must be unique within the account; a duplicate returns `409`. Send an `Idempotency-Key` header so a retried request cannot create a second Folder.