---
title: "Start recording"
method: POST
path: "/recording/{recording_id}/start/"
tags: ["recording"]
---

# Start recording

`POST /recording/{recording_id}/start/`

## Request

- Base URL: `https://api.angelcam.com/v1`
- URL: `https://api.angelcam.com/v1/recording/{recording_id}/start/`
- 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: `recording_start_stop`
  - API key in header `Authorization`
- TypeScript: <https://skmtc.dev/angelcam/apis/angelcam-api/docs/recording/:recording_id/start/post.ts> (a function with typed inputs; its response is checked against the schema)

### Event recording

If you only wish to record events instead of 24/7 coverage, you can use a combination of the `start_from` and `stop_at` or `duration` parameters. Setting `start_from` a few seconds before now will ensure that any buffered media starting from the given timestamp will be recorded. Note that this means that Angelcam Cloud is already connected to the media source (e.g. IP camera) or that the media source itself is able to hold media in an internal buffer for some amount of time (RTSP/2.0 media source with Time-Duration media property is required).

The `stop_at` or `duration` parameters can be used then to stop the recording automatically at some point. To extend a recording, call this endpoint repeatedly with the same `duration` parameter or with an increased `stop_at` parameter. For example, let's assume that the current time is `2024-07-10 10:00:00.000Z`. Calling this endpoint with `start_from=2024-07-10T09:59:30.000Z` and `duration=60` will tell Angelcam Cloud to record all available media starting from 30 seconds ago and to keep recording until 60 seconds from now. Calling this endpoint again after 30 seconds with the same parameters will extend the recording duration to 90 seconds from now.

## Path parameters

- `recording_id` string, uuid, required

## Query parameters

- `start_from` string, date-time
- `stop_at` string, date-time
- `duration` integer

## Response `204`

Empty response.

## Other responses

- `401`: Missing or invalid authorization.
- `403`: Missing permission.
- `404`: The specified resource was not found

---

[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)
