Signals
Signals allow you to remotely control your CaptionKit dashboard or app. You can use signals to start and stop captions, set the language, control caption visibility and more.
Before you get started make sure to create an API key in your CaptionKit dashboard and read up on the API authentication.
Signal types
captions:stream:start
- Start streaming captionscaptions:stream:stop
- Stop streaming captionscaptions:stream:clear
- Clear caption textcaptions:pending:on
- Turn on "Starting soon" messagecaptions:pending:off
- Turn off "Starting soon" messagecaptions:visibility:hide
- Temporarily hide captionscaptions:visibility:show
- Show captionslanguage:select
- Set transcription language- This signal requires an additional
value={language}
parameter. Read further down for details.
- This signal requires an additional
Get ready to receive signals
To receive signals in your CaptionKit dashboard, add ?signals=true
to the end of the dashboard URL:
https://app.captionkit.com?signals=true (opens in a new tab)
Sending a signal
Signals can be sent using either a POST
or GET
request to the following URL:
https://api.captionkit.io/me/signal
For the below examples, the API_KEY
will be included in a query param, but this can also be included in the request headers.
GET /me/signal
Using curl
curl https://api.captionkit.io/v1/me/signal?key={API_KEY}&event=captions:stream:start
Using fetch in JS or Node
fetch(
'https://api.captionkit.io/v1/me/signal?key={API_KEY}&event=captions:stream:start'
);
POST /me/signal
Using curl
curl -X POST https://api.captionkit.io/v1/me/signal?key={API_KEY}
-H 'Content-Type: application/json'
-d '{"event":"captions:stream:start"}'
Using fetch in JS or Node
fetch('https://api.captionkit.io/v1/me/signal?key={API_KEY}', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
event: 'captions:stream:start',
}),
});
Language selection
When using the language:select
signal, you must include a value
parameter in the request, with a validlanguage code. For example, to set the language to English, you would use the language code en
.
The available language codes are:
en
English,en-US
English (United States),en-AU
English (Australia),en-GB
English (Great Britain),en-NZ
English (New Zealand),fr
French,fr-CA
French (Canada),de
German,de-CH
German (Switzerland),it
Italian,ja
Japanese,ko
Korean,es
Spanish,es-419
Spanish (Latin America),
curl https://api.captionkit.io/v1/me/signal?key={API_KEY}&event=language:select&value=en