Skip to main content
With the Seam camera APIs, your application can react to what happens at a property’s doors and entryways. You use the same connected accounts, devices, events, and webhooks that you already use for locks and thermostats. Seam handles each camera provider’s cloud or local protocol for you. The camera APIs cover three things:
  • Events. Seam emits a camera.activated event when a camera detects motion and a device.doorbell_rang event when someone presses a video doorbell.
  • Event media. Each event lists the IDs of the clip and thumbnail captured for it. You exchange an ID for a short-lived URL with /media/get.
  • Live video. You play a camera’s live feed in your user’s browser over WebRTC with the /cameras/live_views endpoints.
Cameras are in public beta and available in every workspace. The request and response shapes for event media and live video may change before general availability.

Supported Providers

Each camera reports its capabilities on the device object. Check can_stream_live_video before you offer a live view. It’s true only for cameras whose provider supports live video and that are currently online. Ring cameras and doorbells always report false.

Event Media

When a camera detects motion or a doorbell is pressed, the event’s media_ids array lists one ID for each piece of media Seam expects for it, usually a video clip and a thumbnail image.
  1. Subscribe a webhook to camera.activated and device.doorbell_rang.
  2. Store each event’s media_ids with its event_id and device_id.
  3. When you need the media, call /media/get with a media_id. The response includes the media’s status and, once it’s available, a signed url that expires within minutes.
  4. To download the file from a server-side client, pass format=redirect. Seam responds with a 302 to the signed URL.
Store the media ID, not the URL. Call /media/get again whenever you need a fresh URL. See Retrieve Event Media for the full workflow, statuses, and errors.

Live Video

Live video streams straight from the camera to your user’s browser. Your servers never handle the video, and your API key never reaches the browser.
  1. On your backend, create a client session that has access to the camera’s connected account, and send its token to the browser.
  2. In the browser, call /cameras/live_views/create for a camera whose can_stream_live_video is true.
  3. Send the browser’s WebRTC offer to /cameras/live_views/offer, then apply the answer to play the video.
  4. Call /cameras/live_views/stop when your user closes the player.
See Stream Live Video for a complete browser example.

Next Steps