---
title: "Create Device Events"
method: POST
path: "/devices/{deviceId}/events"
tags: ["Devices"]
---

# Create Device Events

`POST /devices/{deviceId}/events`

## Request

- Base URL: `https://api.smartthings.com/v1`
- URL: `https://api.smartthings.com/v1/devices/{deviceId}/events`
- Auth: OAuth 2
  - Implicit: `https://auth-global.api.smartthings.com`
  - Scopes: `i:deviceprofiles`
- TypeScript: <https://skmtc.dev/smartthings/apis/smartthings-api/docs/devices/:deviceId/events/post.ts> (a function with typed inputs; its response is checked against the schema)

Create events for a Device.

When a Device is managed by a SmartApp, the Device is responsible for creating events to update the Device attributes on the SmartThings Platform.

The OAuth token used must be for the SmartApp that created the Device.

## Request body

- DeviceEventsRequest
  - `deviceEvents` DeviceStateEvent[]: An array of attribute state updates.
    - `component` string: The name of the component on this device, default is 'main'.
    - `capability` string: Capability that this event relates to.
    - `attribute` string: Name of the capability attribute that this event relates to.
    - `value` object, required: Value associated with the event. The valid value depends on the capability.
    - `unit` string: Unit of the value field.
    - `data` object: Key value pairs about the state of the device. Valid values depend on the capability.
    - `commandId` string: The id on the command that triggered this event, if applicable. Used for correlation of commands to events.

## Response `200`

Created events.

- CreateDeviceEventsResponse

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: Forbidden
- `422`: Unprocessable Entity
- `429`: Too many requests
- `default`: Unexpected error

## Changes

- **2026-07-27** `145c21700100`: 2 info
  - the security scope `i:deviceprofiles` was added to the endpoint's security scheme `Bearer`
  - the security scope `w:devices:*` was removed from the endpoint's security scheme `Bearer`

[Operation history](https://skmtc.dev/smartthings/apis/smartthings-api/changes/devices/:deviceId/events/post.md)

---

[API](https://skmtc.dev/smartthings/apis/smartthings-api.md) - [All operations](https://skmtc.dev/smartthings/apis/smartthings-api/llms.txt) - [OpenAPI document](https://skmtc.dev/smartthings/apis/smartthings-api/revisions/2788a4236800?raw)
