Webhook API - basics and guidelines

Webhook API Basics

Webhook API allows controlling your Luxafor device by sending HTTP POST requests to API endpoints, allowing you to integrate Luxafor with your own applications and services.

  • All API method endpoints are HTTPS URLs. 
  • The parameters to methods are passed as JSON in HTTP POST body. 
  • HTTP request header “Content-Type: application/json” is required.
  • The response body is JSON. It is possible to receive server error as HTTP status code other than 200 in response.
  • “userId” is your Luxafor ID and can be found on the “Webhook” tab in Luxafor software.
  • To turn Luxafor device off, use “Solid custom color” and send the following code: 000000

Available Methods

Solid base color

API endpoint: https://api.luxafor.com/webhook/v1/actions/solid_color

Request parameters:

{
  "userId": "<your Luxafor ID>",
  "actionFields":{
    "color": "<color from list below>"
  }
}

Accepted colors: “red”, “green”, “yellow”, “blue”, “white”, “cyan”, “magenta”

Solid custom color

API endpoint: https://api.luxafor.com/webhook/v1/actions/solid_color

Request parameters:

{
  "userId": "<your Luxafor ID>",
  "actionFields":{
    "color": "custom",
    "custom_color": "<6 symbol hex color code>"
  }
}

Blink

API endpoint: https://api.luxafor.com/webhook/v1/actions/blink

Request parameters:

{
  "userId": "<your Luxafor ID>",
  "actionFields":{
    "color": "<color from list below>"
  }
}

Accepted colors: “red”, “green”, “yellow”, “blue”, “white”, “cyan”, “magenta”.

Pattern

API endpoint: https://api.luxafor.com/webhook/v1/actions/pattern

Request parameters:

{
  "userId": "<your Luxafor ID>",
  "actionFields":{
    "pattern": "pattern from list below"
  }
}

Accepted patterns: “police”, “traffic lights”, “random 1”, “random 2”, “random 3”, “random 4”, “random 5”. Additional patterns accepted on Windows only: “rainbow”, “sea”, “white wave”, “synthetic”.

Basic Troubleshooting

  • Make sure, that the correct form of the quotation marks is being used in the body (" instead of )
  • Check that your Luxafor ID, as well as color name and code, are put in quotation marks.
  • Although it does not apply to all environments it is possible that your input body is case sensitive, therefore, we would suggest for you to use lower case letters when entering the 6-symbol hexadecimal color code. 
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us