The LIFX HTTP API lets you control LIFX devices over the internet. To communicate directly with a LIFX device over the local Wi-Fi network, see the LIFX LAN Protocol documentation.
The LIFX HTTP API is REST inspired API for interacting with LIFX devices. Where other APIs may be concerned with managing resources, our API has been designed around messaging physical lights to perform actions.
We use familiar HTTP conventions such as verbs, meaningful URLs, authentication and status codes for easily consuming the API with off-the-shelf clients. When sending JSON data you must also send a header of
Content-Type: application/json . All responses are returned as JSON.
Cross-Origin Resource Sharing (CORS) is supported allowing you to consume the API entirely from client-side web applications. This document uses CORS for allowing you to test endpoints right from your browser. Special care should be taken to prevent leaking access tokens when using CORS.
While experimenting with our API, you may find features that can be accessed other than those we document here. Any undocumented features are liable to change without versioning changes, so we strongly encourage use of the API only as per the documentation. Of course, we will not change the interface or behaviour of any documented features of the API without releasing a new version.
As with all online services, there are occasionally disruptions which may cause the API to be unavailable. These can occur for both planned maintenance or unplanned incidents. To follow the latest status of our API please see our status page.
If you have any feedback or questions, we'd love to hear from you on our community forum!
All examples in this document use non-genuine access tokens and serial numbers.
Terms and Conditions
© LIFX Inc. All rights reserved. Usage of this documentation is bound by the LIFX Developer Terms.