Sources

Connect an app to record (metadata only; secrets follow one at a time).

Creates an app connection from its https origin (a URL is cut to its origin; private and reserved addresses are refused) and optional metadata. The body never carries a secret: a secret field is refused by name and nothing is stored. Save each secret with PUT /story-projects/{projectId}/app-connections/{connectionId}/secrets/{kind}. Demo account only: use a demo or test account, never a real customer's account or production data. 409 app_connection_limit_reached past 20 per project. Requires Idempotency-Key. Free. A story project is refused with 409 project_not_product (nothing is stored or started): app connections are for product projects. Listing, reading and deleting a story project's existing connections still work.

post/story-projects/{projectId}/app-connections

Request

  • Base URL: https://docs.sleeperhit.studio/api/v1
  • URL: https://docs.sleeperhit.studio/api/v1/story-projects/{projectId}/app-connections
  • Auth: HTTP bearer

Headers

Idempotency-Keystring required

Customer-generated stable identifier for safe retries of idempotent POST requests.

Request body

originstring required

The app's https origin (a URL is cut to its origin).

labelstring
extraOriginsstring[]

Other https origins the app calls; they get the same header.

loginUrlstring

The sign-in page, on one of the connection's origins.

loginMethod'form' | 'storageState' | 'provider' | 'none'

form (username, password, optional TOTP secret), storageState (a saved session), provider (a Sleeper capture grant for the app's sleeper.capture/1 endpoint) or none.

providerEndpointstring

Required with loginMethod: provider, refused otherwise: the full address of the app's sleeper.capture/1 API (the apiBaseUrl its /.well-known/sleeper-capture.json names), over https on the public internet, on the app's origin or one of its extraOrigins. Only Sleeper's own host may be named by its origin alone.

loggedInWhenobject[]

Capture preconditions: { visible }, { absent } or { url }.

headerKind'none' | 'cloudflareAccess' | 'vercelBypass'
maskSelectorsstring[]
retentionDaysinteger

Delete it, sealed secrets and all, after this many days unused. Leave out to keep it until it is deleted.

Response

The new connection (no secrets saved yet).

Changes

No recorded changes to this operation across all 1 revision of this API.