# Đặt nhãn dịch vụ

`POST /v1/service/@id/label` · quyền `services:write`

Đặt nhãn tự đặt để nhận ra dịch vụ.

## HTTP request

| Mục | Giá trị |
| --- | --- |
| URL | `https://api.tino.vn/v1/service/@id/label` |
| Method | `POST` |
| Quyền (scope) | `services:write` |
| Header | `Authorization: Bearer <token>` |
| Content-Type | `application/json` |
| Token gọi được | token ứng dụng (`tinoat_`), token API cá nhân (`tinopat_`) |

## Tham số

| Tên | Vị trí | Kiểu | Bắt buộc | Mô tả |
| --- | --- | --- | --- | --- |
| `id` | đường dẫn | string | có | ID dịch vụ |
| `label` | body | string | không | New label |

## Example request

```bash
curl -X POST "https://api.tino.vn/v1/service/100001/label" \
  -H "Authorization: Bearer $TINO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "label": "<label>"
}'
```

`$TINO_TOKEN` là token có quyền `services:write`. Tham số đường dẫn trong ví dụ là giá trị mẫu.

SDK ([SDK & Ví dụ](/docs/sdk)): Python `client.services.set_label(id, id=...)`, Node.js `await client.services.setLabel(id, { id: ... });`, PHP `$client->services->setLabel($id, ['id' => ...]);`.

## Example response

```json
{
 "success": true,
 "info": [
  "service_label_updated"
 ]
}
```

Mẫu thật từ tài khoản thử, đã che dữ liệu cá nhân; mảng và chuỗi dài được rút gọn (`… N more item(s)`, `… N more line(s)`).
