---
title: "Activate new service"
method: POST
path: "/billing/active-services/"
tags: ["active-service"]
---

# Activate new service

`POST /billing/active-services/`

## Request

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

Purchase and activate a new service for your account. After activation, [assign the service to a camera](#tag/active-service/PUT/billing/active-services/{active_service_id}/usage/) using the returned active service `id`.

## Request body

- object
  - `code` string, required: Code of service, this code together with type is unique identifier of service
  - `period` 'P1M' | 'P1Y', duration, required: Billing period — `P1M` for monthly, `P1Y` for annual.

## Response `201`

Newly activated service

- ActiveServiceObject
  - `id` integer, required
  - `current_service` ServiceObject, required
    - `type` 'cloud-recording' | 'broadcasting' | 'timelapse' | 'user-service' | 'event-recording' | 'live-view', required: Type of service
    - `code` string, required: Code of service, this code together with type is unique identifier of service
  - `renew_service` ServiceObject, required
    - `type` 'cloud-recording' | 'broadcasting' | 'timelapse' | 'user-service' | 'event-recording' | 'live-view', required: Type of service
    - `code` string, required: Code of service, this code together with type is unique identifier of service
  - `renew_period` string, duration, nullable, required
  - `valid_until` string, datetime, required
  - `in_use` boolean, required: Says if service is in use for example by a camera
  - `usage_detail` UsageDetailObject, required: In case of camera service show info for what camera the service is used.
    - `camera_id` integer
    - `camera_name` string

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