---
title: "Connect new camera"
method: POST
path: "/cameras/"
tags: ["camera"]
---

# Connect new camera

`POST /cameras/`

## Request

- Base URL: `https://api.angelcam.com/v1`
- URL: `https://api.angelcam.com/v1/cameras/`
- Auth: one of:
  - OAuth 2
    - Authorization code: `https://my.angelcam.com/oauth/authorize/`, token URL `https://my.angelcam.com/oauth/token/`
    - Password, token URL `https://api.angelcam.com/oauth/token/`
    - Scopes: `camera_create`
  - API key in header `Authorization`
- TypeScript: <https://skmtc.dev/angelcam/apis/angelcam-api/docs/cameras/post.ts> (a function with typed inputs; its response is checked against the schema)

## Request body

- object
  - `name` string, required: Camera name
  - `type` 'h264' | 'h265' | 'mjpeg', required: Camera type. We currently support H.264/H.265 over RTSP and MJPEG over HTTP cameras.
  - `connection_type` 'direct' | 'arrow', required: How is the camera connected to Angelcam. The `direct` connection means that the camera stream is available on a public IP address. The `arrow` option can be used for connecting cameras that can be accessed via an Arrow client. Please note that cameras connected via an Arrow client use URL in a specific format. You will need to use the [stream detection](#tag/camera-stream-detection) endpoints to obtain the URL first.
  - `url` string, url, required: Complete URL of a camera stream. H.264 and H.265 cameras must use "rtsp" scheme, for MJPEG cameras it's allowed to use "http" and "https" schemes. The "https" scheme is valid only for cameras using the `direct` connection type.
  - `enable_status_checks` boolean: Enable periodic online/offline checks for the camera.
  - `enable_periodical_snapshots` boolean: Refresh camera snapshot automatically once every 24h.
  - `tags` string[]: List of tags assigned to the camera. Tags can be used for filtering.

## Response `201`

Newly created camera object

- CameraObject
  - `id` integer, required: Camera ID
  - `name` string, required: Camera name
  - `location` integer, nullable, required: ID of the location the camera belongs to
  - `site` integer, nullable, required: ID of the location the camera belongs to. **Deprecated:** use `location` instead.
  - `type` 'h264' | 'h265' | 'mjpeg', required: Camera type
  - `snapshot` SnapshotObject, nullable, required: Snapshot is created by Angelcam when certain types of events are received
    - `url` string, uri, nullable, required: URL of the snapshot image
    - `created_at` string, date-time, required: The date and time when the snapshot was created for the first time
  - `status` 'offline' | 'online' | 'unknown', required
  - `event_api_hash` string: Event API hash - unique token for posting events to camera timeline from embedded devices without authentication (do not disclose)
  - `live_snapshot` string, uri, nullable, required: Live snapshot URL
  - `streams` StreamObject[], required: Available camera streams. [Read about stream URLs expirations.](http://help.angelcam.com/en/articles/3952149-how-to-deal-with-stream-url-expiration) Please note that the amount of stream consumers per camera is limited to 10 concurrent consumers. Angelcam web app and Angelcam mobile app also count to this limit. Recording is excluded. If you need more concurrent stream consumers, use the broadcasting service.
    - `url` string, uri, required: Stream URL
    - `format` 'hls' | 'mp4' | 'mpegts' | 'mjpeg', required
    - `refresh_rate` number, float: Stream refresh rate
  - `applications` ApplicationObject[], required
    - `code` 'LSA' | 'CRA' | 'VVA' | 'VPA' | 'TLA', required
  - `low_latency_enabled` boolean, required: Indicates if user enabled [low latency streaming](http://help.angelcam.com/en/articles/372634-enabling-low-latency-streaming) in camera settings.
  - `audio_enabled` boolean, required: Indicates if audio is enabled for given camera.
  - `enable_status_checks` boolean, required: Indicates if periodic online/offline checks for the camera are enabled.
  - `enable_periodical_snapshots` boolean, required: Indicates if camera snapshot is being refreshed automatically once every 24h.
  - `tags` string[], required: List of tags assigned to the camera. Tags can be used for filtering.

## Other responses

- `400`: Body payload is invalid.
- `401`: Missing or invalid authorization.
- `403`: Missing permission.

---

[API](https://skmtc.dev/angelcam/apis/angelcam-api.md) - [All operations](https://skmtc.dev/angelcam/apis/angelcam-api/llms.txt) - [OpenAPI document](https://skmtc.dev/angelcam/apis/angelcam-api/revisions/dd1cdc3f2c23?raw)
