AstroNote

QuickstartExamplesAPIFAQ     Devices & Tokens    

AstroNote API Reference

API Endpoint

There is currently one main API endpoint to send messages to your Apple Watch. You can use either JSON or a Form POST. Both are equally well supported.

JSON Requests

A JSON request has a content type of application/json and sends a simple struct that contains all the message parameters.

https://api.astronote.app/1/notify
Content-Type: application/json
Authorization: token YOURTOKEN

{ "title": "Some title" }

Form Post Request

A Form request has a content type of application/x-www-form-urlencoded and sends the message parameters in the body.

https://api.astronote.app/1/notify
Content-Type: application/x-www-form-urlencoded
Authorization: token YOURTOKEN

title=Some+Title
body=This+is+the+body.

Authentication

To authenticate your request, you need to send your API Token in the Authorization header.

Authorization: token a2RlamRramRlZDhkMzgyM2xramVsa2 

You can find the authentication tokens for your devices on the Devices & Tokens page.

For a Form Post request you can also add a token parameter to the request. However, the above header method is recommended.

Parameters

You can configure the look and feel and behaviour of the notification messages with the following parameters. A request should at least have a title or body.

title

Optional, but either title or body must be given.

body

Optional, but either title or body must be given.

category

Optional.

displayCategory

Optional. Defaults to false.

sound

Optional. Defaults to default. The only two options are currently silent and default.

persistent

Optional. Defaults to true.