Skip to main content
Lettuce Stream APIs are organized around REST conventions and use JSON for request and response payloads.

Authentication

Use a bearer token with every request:
Authorization: Bearer YOUR_API_KEY

Base URL

https://www.lettucestream.com

API catalog

The following endpoints are available today. Unless noted, endpoints live under the base URL above.

Core & configuration

EndpointMethodsPurpose
/api/runtime-configGETReturn public runtime configuration (relay URL, app base URL, public API key).
/api/api-keysGET, POST, DELETEList, create, or revoke API keys tied to a user.

Billing & onboarding

EndpointMethodsPurpose
/api/create-payment-intentPOSTCreate a Stripe payment intent for plan checkout.
/api/create-seat-addon-intentPOSTCreate a Stripe payment intent for seat add-ons.
/api/cancel-subscriptionPOSTCancel a Stripe subscription.
/api/send-invite-emailPOSTSend an organization invitation email.

Webhooks

EndpointMethodsPurpose
/api/webhooks/subscriptionsGET, POST, PATCH, DELETEManage webhook subscriptions.

Streaming status & spotlights

EndpointMethodsPurpose
/api/status/is-livePOSTCheck whether a channel or broadcast is live.
/api/spotlights/listGETList active spotlights.
/api/spotlights/readyGETConfirm spotlight readiness.

OAuth

EndpointMethodsPurpose
/api/oauth/kick-startPOSTStart Kick OAuth flow.
/api/oauth/kick-callbackGETHandle Kick OAuth callback.
/api/oauth/twitch-startPOSTStart Twitch OAuth flow.
/api/oauth/twitch-callbackGETHandle Twitch OAuth callback.
/api/oauth/youtube-startPOSTStart YouTube OAuth flow.
/api/oauth/youtube-callbackGETHandle YouTube OAuth callback.
/api/oauth/linkedin-startPOSTStart LinkedIn OAuth flow.
/api/oauth/linkedin-callbackGETHandle LinkedIn OAuth callback.
/api/oauth/disconnectPOSTDisconnect a linked OAuth account.
/api/linkedin/startPOSTLinkedIn OAuth start alias.
/api/linkedin/callbackGETLinkedIn OAuth callback alias.

YouTube

EndpointMethodsPurpose
/api/youtube/resolve-channelGETResolve a YouTube channel based on input.
/api/youtube/analyticsPOSTFetch analytics for a YouTube broadcast.
/api/youtube/broadcast-statusPOSTRead the current broadcast status.
/api/youtube/scheduled-listPOSTList scheduled YouTube broadcasts.
/api/youtube/scheduled-createPOSTCreate a scheduled YouTube broadcast.
/api/youtube/scheduled-updatePOSTUpdate a scheduled YouTube broadcast.
/api/youtube/start-broadcastPOSTStart a YouTube broadcast.
/api/youtube/transition-broadcastPOSTTransition a YouTube broadcast state.

GraphQL

A working GraphQL endpoint is available at:
POST /api/graphql
Current operations include:
  • runtimeConfig
  • apiKeys and webhookSubscriptions
  • createApiKey, revokeApiKey
  • createWebhookSubscription, updateWebhookSubscription, deleteWebhookSubscription
See docs/graphql-schema.graphql for the executable SDL.
"""
Executable GraphQL schema exposed by POST /api/graphql.

This schema is intentionally scoped to currently implemented server behavior:
- runtimeConfig query (public)
- apiKeys + webhookSubscriptions queries (API key required)
- API key and webhook subscription mutations (API key required)
"""

type RuntimeConfig {
  relayUrl: String!
  captionsRelayUrl: String!
  rtmpIngestUrl: String!
  appBaseUrl: String!
  publicApiKey: String!
}

type ApiKey {
  id: ID!
  label: String!
  prefix: String!
  createdAt: String
  lastUsedAt: String
  revokedAt: String
}

type WebhookSubscription {
  id: ID!
  url: String!
  events: [String!]!
  description: String!
  enabled: Boolean!
  createdAt: String
  updatedAt: String
}

type CreateApiKeyPayload {
  key: String!
  keyId: ID!
  keys: [ApiKey!]!
}

type WebhookSubscriptionPayload {
  subscription: WebhookSubscription!
  secret: String
}

type Query {
  runtimeConfig: RuntimeConfig!
  apiKeys: [ApiKey!]!
  webhookSubscriptions: [WebhookSubscription!]!
}

type Mutation {
  createApiKey(label: String!): CreateApiKeyPayload!
  revokeApiKey(keyId: ID!): [ApiKey!]!

  createWebhookSubscription(
    url: String!
    events: [String!]!
    description: String
    secret: String
  ): WebhookSubscriptionPayload!

  updateWebhookSubscription(
    subscriptionId: ID!
    url: String
    events: [String!]
    description: String
    enabled: Boolean
    rotateSecret: Boolean
    secret: String
  ): WebhookSubscriptionPayload!

  deleteWebhookSubscription(subscriptionId: ID!): Boolean!
}

Next steps

  • Build your first integration using the webhook guide.