---
title: "Create or change a service subscription"
method: POST
path: "/api/services/{service_id}/subscription"
tags: ["billing"]
---

# Create or change a service subscription

`POST /api/services/{service_id}/subscription`

## Request

- Base URL: `https://api.monacloud.vn`
- URL: `https://api.monacloud.vn/api/services/{service_id}/subscription`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Token`

Tạo dữ liệu hoặc thực thi thao tác tại `/api/services/{service_id}/subscription`. Phản hồi dùng JSON và tuân theo schema được công bố bên dưới.

## Path parameters

- `service_id` string, required

## Request body

- SubscriptionUpdateRequest
  - `plan_code` string, nullable
  - `period` 'month' | 'year', nullable
  - `auto_renew` boolean, nullable
  - `cancel_action` 'hourly' | 'stop', nullable

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/monacloud/apis/mona-cloud-api-compute-truoc-ay-vibecloud.md) · [All operations](https://skmtc.dev/monacloud/apis/mona-cloud-api-compute-truoc-ay-vibecloud/llms.txt) · [OpenAPI document](https://skmtc.dev/monacloud/apis/mona-cloud-api-compute-truoc-ay-vibecloud/revisions/34a120ed37ce?raw)
