# HTTP Device API

## Provision Device

Vui lòng xem bài viết tương ứng để biết thêm thông tin về tính năng [Provision Device](/innoway/tinh-nang/tinh-nang-khac/provision-device.md).

Để bắt đầu Provision Device, gửi POST request tới URL sau:

```http
http(s)://api.innoway.vn/api/provision
```

Đinh dạng bản tin gửi đi:

```json
{
  "device_name": "DEVICE_NAME", //required
  "device_key": "DEVICE_KEY", //optional
  "provision_key": "u7piawkboq8v32dmcmpp", //required
  "provision_secret": "jpmwdn8ptlswmf4m29bw" //required
}
```

Nếu thành công, bản tin trả về sẽ có dạng:

```json
{
  "device_id": "bb56e5d7-96bc-4339-8780-6ebb67e5ac44",
  "status": "SUCCESS",
  "token": "zD8zxMrMaRVnhZhiGEVuRw2jid3oW721"
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://innoway.gitbook.io/innoway/tai-lieu/api/http-device-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
