API Documentation

Programatically send yourself Hyperlink push notifications with 3 lines of Javascript or a single curl command.

Try entering Hello world in the Notification title field below and click Send test! to try it out.

Notification Builder

Available substitutions include {city}, {region}, {device}, {platform}, {person}
Available substitutions include {city}, {region}, {device}, {platform}, {person}
Allowed values are default. This will play the default system sound.
Value must be a number. Setting 0 will clear badge count.
Download the Hyperlink app, tap the icon in the top left, tap Copy HyperKey
Destination that the URL will redirect to if opened in a web browser.
Post messages to a Slack channel. Get a Slack webhook URL for your channel here.
This is your Hyperlink. Making a GET request for it will trigger a push to be sent.

Raw URL

https://usehyperlink.com/api?action=send


curl Command

curl "https://usehyperlink.com/api?action=send"


Javascript

var request = new XMLHttpRequest(); request.open('GET', 'https://usehyperlink.com/api?action=send'); request.send();


Documentation

Base URL

The base url for all api requests is https://usehyperlink.com/api. All parameters are passed in as query parameters. The api is accessed by sending GET requests to the url.

You can use the Notification Builder above to construct a properly formatted URL with your desired parameters and see the associated raw link, curl command or Javascript snippet.

Parameters

Parameters are passed in as standard URL query parameters. The first query parameter is preceded by a question mark character ?, while the following are delimited by the ampersand character &.

For more information on the query parameter format, click here.

action parameter

The action parameter specifies what action should be taken. The default value is send.

Currently, the there is only one acceptable value for this parameter, and it can be omitted, but more actions may be added in the future.

key parameter

The key parameter contains your personal HyperKey. This is an alphanumeric string that tells Hyperlink which device to send the push notification to.

In order to get your HyperKey, you must download the Hyperlink app, tap the icon in the top left, then tap the Copy HyperKey key. This will copy your HyperKey to your clipboard, which can then be pasted into the builder above.

title parameter

The title parameter contains the title for the push notification you want to send. This is a string that should ideally fit in one line and will be truncated by the system if it doesn't.

If your title parameter contains any characters that are not url safe, including , / ? : @ & = + $ # you should url-encode the value of the parameter. In Javascript this can be done with a function like encodeURIComponent(value).

Available substitutions include {city}, {region}, {device}, {platform}, {person}. See the Substitutions section for more information.

body parameter

The body parameter contains the body text for the push notification you want to send. This is a string that can wrap to multiple lines.

If your body parameter contains any characters that are not url safe, including , / ? : @ & = + $ # you should url-encode the value of the parameter. In Javascript this can be done with a function like encodeURIComponent(value).

Available substitutions include {city}, {region}, {device}, {platform}, {person}. See the Substitutions section for more information.

sound parameter

The sound parameter controls which sound is played when a notification is recieved. The only currently supported value is default. Support for more values may be added in the future. Omitting this parameter send the push notification silently.

badgeCount parameter

The badgeCount parameter controls the red badge counter for the Hyperlink app. This must be a numeric integer value. Omitting this parameter leaves the app's badge count unchanged. Sending a value of 0 clears the app's badge count.

redirectUrl parameter

The redirectUrl parameter controls the url that the user will be redirected to if this link is visited in a web browser. The value of this url should be url-encoded. In Javascript this can be done with a function like encodeURIComponent(value). If the value does not begin with http:// or https:// - a prefix of http:// will be added automatically.

slackWebhookUrl parameter

The slackWebhookUrl parameter enables clicks on this url to post messages to a Slack channel. This webhook url can be obtained for your desired channel here. For now this requires you to create a Slack app (lightweight process explained in link), but support for one-click Slack support will be added in a future version of the API.

Substitutions

The title and body parameters support the following substitutions which will be replaced when the push notification is sent:

  • {city} - an approximation of the city that this request was sent from. This is based on the IP address from which the request is made. Example value: San Francisco, New York.
  • {region} - an approximation of the country or region that this request was sent from. This is based on the IP address from which the request is made. Example values: US, FR.
  • {device} - an approximation of the device that this request was sent from. This is based on theuser-agent request header. Example value: iPhone.
  • {platform} - an approximation of the platform that this request was sent from. This is based on theuser-agent request header. Example value: Instagram.
  • {person} - an approximation for whether or not this request was made by a human. The two currently supported values are Someone which means we think the request was made by a human or A bot if we think the request was made by a scraper or another automated process.

If any of these values cannot be determined, they will be replaced with the string Unknown.

Try Hyperlink today.