Skip to main content
PATCH
/
devices
/
{id}
Update a device
curl --request PATCH \
  --url https://api.flatpeak.com/devices/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "reference_id": "DEV1234567890"
}
'
{
  "id": "dev_63a6087272941ef077a8fd3e",
  "object": "device",
  "live_mode": true,
  "reference_id": "DEV1234567890",
  "time_created": "2022-01-24T14:15:22Z",
  "account_id": "acc_661677911f2197045e6cf1b1",
  "last_seen": "2022-03-22T11:12:21Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.flatpeak.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Authenticate with bearer you obtained from authentication endpoint.

Path Parameters

id
string
required

Flatpeak device_id.

Example:

"dev_6563a6757360a6d6a628e839"

Body

application/json

Updates a Device

reference_id
string

A reference that is meaningful to you, for example, an ID from your system.

Example:

"DEV1234567890"

Response

This object represents a device or another asset of a compatible type.

id
string
required
read-only

Flatpeak unique object id.

Example:

"dev_63a6087272941ef077a8fd3e"

object
string
required
read-only

Represents the object’s type.

Example:

"device"

live_mode
boolean
required

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

reference_id
string
required
read-only

A reference that is meaningful to you, for example, an ID from your system.

Example:

"DEV1234567890"

time_created
string
required

Time when the object was created, in UTC.

Example:

"2022-01-24T14:15:22Z"

account_id
string
required
read-only

Flatpeak account ID.

Example:

"acc_661677911f2197045e6cf1b1"

last_seen
string<date-time>

Timestamp of when the device has last queried the service.

Example:

"2022-03-22T11:12:21Z"