Content Triggers API Documentation
This guide explains how to integrate the Content Triggers App with external systems, allowing you to programmatically send content to your screens via the NowSignage API.
To understand the functionality of the Content Triggers App, please refer to this article.
Important: This API endpoint is compatible only with playlist triggers, not individual image or video triggers. Before using this API, you must set up the Content Triggers App in your CMS and configure your trigger rule to trigger a playlist. If you attempt to trigger individual images or videos through this endpoint, you will receive a 404 error. For help setting up the Content Triggers App, refer to the Content Triggers setup guide.
Quick Start:
In 3 simple steps, you can send your first trigger command:
1. Get your API Key from your NowSignage accountGo to My Account > API Keys and generate a new key with Read/Write access
2. Build your request with your trigger command namePOST https://api.nowsignage.com/v2/apps/triggers/events?trigger=YOUR_COMMAND_NAME
3. Add authorization header with your API keyAuthorization: Bearer YOUR_API_KEY
API Endpoint:
All trigger requests use this endpoint:
POST https://api.nowsignage.com/v2/apps/triggers/events
Request Parameters:
trigger (required)
The command key you set up in the Triggers App. This is case-sensitive and must match exactly. Example: ?trigger=menu_change
Setting Up Authorisation:
All API requests require authentication using your API key as a bearer token. Here's how to set it up:
- Sign in to your NowSignage account at secure.nowsignage.com
- Click My Account in the main navigation menu
- Select API Keys from the submenu
- Click +Generate API Key
- Give it a descriptive label (e.g., Triggers Integration API) and click Generate
- Click the ... (options) button on the right side of your new API key
- Select Set Read & Write Access. You should see the status change to Read/Write
- Click the ... (options) button on the read/write API key and click 'view complete key'
Using Your API Key:
Include your API key in every request using the Authorization header:
Authorization: Bearer YOUR_API_KEY
Testing Your API with Postman:
Postman is a popular tool for testing API requests. Here's how to test your trigger:
1. Download and install Postman from postman.com
2. Create a new request
3. Select POST as the request method
4. Enter the URL with your trigger name (e.g):
https://api.nowsignage.com/v2/apps/triggers/events?trigger=YOUR_COMMAND_NAME
5. Click the Headers tab
6. Add a new header:
Key: Authorization
Value: Bearer YOUR_API_KEY
7. Click Send and check the response
Understanding Response Codes:
The API returns different status codes to indicate the result of your request:
200 OK - Success
Your trigger command was successfully sent and queued. The screens will receive the command shortly.
404 Not Found
No trigger commands found with that name. Check that your trigger parameter matches the command key set up in the Triggers App exactly. Keys are case-sensitive.
401 Unauthorized - Invalid API Key
Your API key is incorrect or has expired. Verify you've copied the key correctly from your account.
401 Unauthorised - API Key Missing
The Authorization header was not included in your request. All requests must include the Authorization header with your API key.
403 Forbidden
Your API key doesn't have the required Read/Write permissions. Go to your account settings, find the API key, click options, and select Set Read & Write Access.
Example Success Response:
{ "status": "success", "description": "Event triggered", "data": { "triggeredAt": "2024-10-11T16:09:51Z", "triggerId": "abc123xyz789" }}
Troubleshooting:
I'm getting a 404 error
Verify that your trigger parameter matches the command key set up in the Triggers App. Check the spelling and capitalization carefully, as keys are case-sensitive. Also verify that your trigger rule is configured to trigger a playlist, not individual images or videos.
I'm getting a 401 error
Make sure your API key is correct and that your Authorization header is formatted as 'Bearer YOUR_API_KEY' (do not include 'Bearer' in the key value itself). Verify the key hasn't expired.
I'm getting a 403 error
Your API key lacks the required Read/Write permissions. Go to My Account > API Keys in your NowSignage account, click the options button (...) next to your key, and select Set Read & Write Access.
The request succeeds but content doesn't display on screens
Verify that your trigger command is properly configured in the Triggers App and is assigned to the correct screens or screen groups.