Gotify REST-API.
v2.0.2http://localhosthttps://localhostThis is the documentation of the Gotify REST-API.
Authentication
In Gotify there are two token types: clientToken: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) appToken: an application is something that sends messages (f.ex. this token should be used for a shell script)
The token can be transmitted in a header named X-Gotify-Key, in a query parameter named token or
through a header named Authorization with the value prefixed with Bearer (Ex. Bearer randomtoken).
There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken.
---
Found a bug or have some questions? Create an issue on GitHub
Authentication
appTokenAuthorizationHeaderapiKeyEnter an application token with the Bearer prefix, e.g. Bearer Axxxxxxxxxx.
API Key: Authorization in header
appTokenHeaderapiKeyAPI Key: X-Gotify-Key in header
appTokenQueryapiKeyAPI Key: token in query
basicAuthhttpScheme: basic
clientTokenAuthorizationHeaderapiKeyEnter a client token with the Bearer prefix, e.g. Bearer Cxxxxxxxxxx.
API Key: Authorization in header
clientTokenHeaderapiKeyAPI Key: X-Gotify-Key in header
clientTokenQueryapiKeyAPI Key: token in query
application
Return all applications.
Response
Authorization
clientTokenAuthorizationHeaderapiKey in headerEnter a client token with the Bearer prefix, e.g. Bearer Cxxxxxxxxxx.
clientTokenHeaderapiKey in headerclientTokenQueryapiKey in querybasicAuthhttp (basic)Create an application.
Body
the application to add
Params allowed to create or update Applications.
defaultPriorityinteger<int64>The default priority of messages sent by this application. Defaults to 0.
5descriptionstringThe description of the application.
Backup server for the interwebsnamestringrequiredThe application name. This is how the application should be displayed to the user.
Backup ServersortKeystringThe sortKey for the application. Uses fractional indexing.
a1Response
Ok
Bad Request
Unauthorized
Forbidden
Authorization
clientTokenAuthorizationHeaderapiKey in headerEnter a client token with the Bearer prefix, e.g. Bearer Cxxxxxxxxxx.
clientTokenHeaderapiKey in headerclientTokenQueryapiKey in querybasicAuthhttp (basic)Update an application.
Body
the application to update
Params allowed to create or update Applications.
defaultPriorityinteger<int64>The default priority of messages sent by this application. Defaults to 0.
5descriptionstringThe description of the application.
Backup server for the interwebsnamestringrequiredThe application name. This is how the application should be displayed to the user.
Backup ServersortKeystringThe sortKey for the application. Uses fractional indexing.
a1Parameters
idinteger<int64>requiredpaththe application id
Response
Ok
Bad Request
Unauthorized
Forbidden
Not Found
Authorization
clientTokenAuthorizationHeaderapiKey in headerEnter a client token with the Bearer prefix, e.g. Bearer Cxxxxxxxxxx.
clientTokenHeaderapiKey in headerclientTokenQueryapiKey in querybasicAuthhttp (basic)Delete an application.
Parameters
idinteger<int64>requiredpaththe application id
Response
Authorization
clientTokenAuthorizationHeaderapiKey in headerEnter a client token with the Bearer prefix, e.g. Bearer Cxxxxxxxxxx.
clientTokenHeaderapiKey in headerclientTokenQueryapiKey in querybasicAuthhttp (basic)Upload an image for an application.
Body
filestring<binary>requiredthe application image
Parameters
idinteger<int64>requiredpaththe application id
Response
Authorization
clientTokenAuthorizationHeaderapiKey in headerEnter a client token with the Bearer prefix, e.g. Bearer Cxxxxxxxxxx.
clientTokenHeaderapiKey in headerclientTokenQueryapiKey in querybasicAuthhttp (basic)Deletes an image of an application.
Parameters
idinteger<int64>requiredpaththe application id
Response
Authorization
clientTokenAuthorizationHeaderapiKey in headerEnter a client token with the Bearer prefix, e.g. Bearer Cxxxxxxxxxx.
clientTokenHeaderapiKey in headerclientTokenQueryapiKey in querybasicAuthhttp (basic)message
Return all messages from a specific application.
Parameters
idinteger<int64>requiredpaththe application id
limitinteger[1, 200]100querythe maximal amount of messages to return
sinceinteger<int64>>= 0queryreturn all messages with an ID less than this value
Response
Ok
Bad Request
Unauthorized
Forbidden
Not Found
Authorization
clientTokenAuthorizationHeaderapiKey in headerEnter a client token with the Bearer prefix, e.g. Bearer Cxxxxxxxxxx.
clientTokenHeaderapiKey in headerclientTokenQueryapiKey in querybasicAuthhttp (basic)Delete all messages from a specific application.
Parameters
idinteger<int64>requiredpaththe application id
Response
Authorization
clientTokenAuthorizationHeaderapiKey in headerEnter a client token with the Bearer prefix, e.g. Bearer Cxxxxxxxxxx.
clientTokenHeaderapiKey in headerclientTokenQueryapiKey in querybasicAuthhttp (basic)Return all messages.
Parameters
limitinteger[1, 200]100querythe maximal amount of messages to return
sinceinteger<int64>>= 0queryreturn all messages with an ID less than this value
Response
Ok
Bad Request
Unauthorized
Forbidden
Authorization
clientTokenAuthorizationHeaderapiKey in headerEnter a client token with the Bearer prefix, e.g. Bearer Cxxxxxxxxxx.
clientTokenHeaderapiKey in headerclientTokenQueryapiKey in querybasicAuthhttp (basic)Create a message.
NOTE: This API ONLY accepts an application token as authentication.
Body
the message to add
The MessageExternal holds information about a message which was sent by an Application.
extrasobjectThe extra data sent along the message.
The extra fields are stored in a key-value scheme. Only accepted in CreateMessage requests with application/json content-type.
The keys should be in the following format: <top-namespace>::[<sub-namespace>::]<action>
These namespaces are reserved and might be used in the official clients: gotify android ios web server client. Do not use them for other purposes.
messagestringrequiredThe message. Markdown (excluding html) is allowed.
**Backup** was successfully finished.priorityinteger<int64>The priority of the message. If unset, then the default priority of the application will be used.
2titlestringThe title of the message.
BackupResponse
Authorization
appTokenAuthorizationHeaderapiKey in headerEnter an application token with the Bearer prefix, e.g. Bearer Axxxxxxxxxx.
appTokenHeaderapiKey in headerappTokenQueryapiKey in queryDelete all messages.
Deletes a message with an id.
Parameters
idinteger<int64>requiredpaththe message id
Response
Authorization
clientTokenAuthorizationHeaderapiKey in headerEnter a client token with the Bearer prefix, e.g. Bearer Cxxxxxxxxxx.
clientTokenHeaderapiKey in headerclientTokenQueryapiKey in querybasicAuthhttp (basic)Websocket, return newly created messages.
Response
Authorization
clientTokenAuthorizationHeaderapiKey in headerEnter a client token with the Bearer prefix, e.g. Bearer Cxxxxxxxxxx.
clientTokenHeaderapiKey in headerclientTokenQueryapiKey in querybasicAuthhttp (basic)client
Return all clients.
Response
Authorization
clientTokenAuthorizationHeaderapiKey in headerEnter a client token with the Bearer prefix, e.g. Bearer Cxxxxxxxxxx.
clientTokenHeaderapiKey in headerclientTokenQueryapiKey in querybasicAuthhttp (basic)Create a client.
Body
the client to add
Params allowed to create or update Clients.
namestringrequiredThe client name
My ClientResponse
Authorization
clientTokenAuthorizationHeaderapiKey in headerEnter a client token with the Bearer prefix, e.g. Bearer Cxxxxxxxxxx.
clientTokenHeaderapiKey in headerclientTokenQueryapiKey in querybasicAuthhttp (basic)Update a client.
Body
the client to update
Params allowed to create or update Clients.
namestringrequiredThe client name
My ClientParameters
idinteger<int64>requiredpaththe client id
Response
Authorization
clientTokenAuthorizationHeaderapiKey in headerEnter a client token with the Bearer prefix, e.g. Bearer Cxxxxxxxxxx.
clientTokenHeaderapiKey in headerclientTokenQueryapiKey in querybasicAuthhttp (basic)Delete a client.
Parameters
idinteger<int64>requiredpaththe client id
Response
Authorization
clientTokenAuthorizationHeaderapiKey in headerEnter a client token with the Bearer prefix, e.g. Bearer Cxxxxxxxxxx.
clientTokenHeaderapiKey in headerclientTokenQueryapiKey in querybasicAuthhttp (basic)user
Return the current user.
Update the password of the current user.
Body
the user
The Password for updating the user.
passstringrequiredThe user password. For login.
nrocinuResponse
Authorization
clientTokenAuthorizationHeaderapiKey in headerEnter a client token with the Bearer prefix, e.g. Bearer Cxxxxxxxxxx.
clientTokenHeaderapiKey in headerclientTokenQueryapiKey in querybasicAuthhttp (basic)Return all users.
Response
Authorization
clientTokenAuthorizationHeaderapiKey in headerEnter a client token with the Bearer prefix, e.g. Bearer Cxxxxxxxxxx.
clientTokenHeaderapiKey in headerclientTokenQueryapiKey in querybasicAuthhttp (basic)Create a user.
With enabled registration: non admin users can be created without authentication. With disabled registrations: users can only be created by admin users.
Body
the user to add
Used for user creation.
adminbooleanrequiredIf the user is an administrator.
truenamestringrequiredThe user name. For login.
unicornpassstringrequiredThe user password. For login.
nrocinuResponse
Authorization
clientTokenAuthorizationHeaderapiKey in headerEnter a client token with the Bearer prefix, e.g. Bearer Cxxxxxxxxxx.
clientTokenHeaderapiKey in headerclientTokenQueryapiKey in querybasicAuthhttp (basic)Get a user.
Parameters
idinteger<int64>requiredpaththe user id
Response
Authorization
clientTokenAuthorizationHeaderapiKey in headerEnter a client token with the Bearer prefix, e.g. Bearer Cxxxxxxxxxx.
clientTokenHeaderapiKey in headerclientTokenQueryapiKey in querybasicAuthhttp (basic)Update a user.
Body
the updated user
Used for updating a user.
adminbooleanrequiredIf the user is an administrator.
truenamestringrequiredThe user name. For login.
unicornpassstringThe user password. For login. Empty for using old password
nrocinuParameters
idinteger<int64>requiredpaththe user id
Response
Authorization
clientTokenAuthorizationHeaderapiKey in headerEnter a client token with the Bearer prefix, e.g. Bearer Cxxxxxxxxxx.
clientTokenHeaderapiKey in headerclientTokenQueryapiKey in querybasicAuthhttp (basic)Deletes a user.
Parameters
idinteger<int64>requiredpaththe user id
Response
Authorization
clientTokenAuthorizationHeaderapiKey in headerEnter a client token with the Bearer prefix, e.g. Bearer Cxxxxxxxxxx.
clientTokenHeaderapiKey in headerclientTokenQueryapiKey in querybasicAuthhttp (basic)health
plugin
Return all plugins.
Response
Ok
Unauthorized
Forbidden
Not Found
Internal Server Error
Authorization
clientTokenAuthorizationHeaderapiKey in headerEnter a client token with the Bearer prefix, e.g. Bearer Cxxxxxxxxxx.
clientTokenHeaderapiKey in headerclientTokenQueryapiKey in querybasicAuthhttp (basic)Get YAML configuration for Configurer plugin.
Parameters
idinteger<int64>requiredpaththe plugin id
Response
Authorization
clientTokenAuthorizationHeaderapiKey in headerEnter a client token with the Bearer prefix, e.g. Bearer Cxxxxxxxxxx.
clientTokenHeaderapiKey in headerclientTokenQueryapiKey in querybasicAuthhttp (basic)Update YAML configuration for Configurer plugin.
Parameters
idinteger<int64>requiredpaththe plugin id
Response
Authorization
clientTokenAuthorizationHeaderapiKey in headerEnter a client token with the Bearer prefix, e.g. Bearer Cxxxxxxxxxx.
clientTokenHeaderapiKey in headerclientTokenQueryapiKey in querybasicAuthhttp (basic)Disable a plugin.
Parameters
idinteger<int64>requiredpaththe plugin id
Response
Authorization
clientTokenAuthorizationHeaderapiKey in headerEnter a client token with the Bearer prefix, e.g. Bearer Cxxxxxxxxxx.
clientTokenHeaderapiKey in headerclientTokenQueryapiKey in querybasicAuthhttp (basic)Get display info for a Displayer plugin.
Parameters
idinteger<int64>requiredpaththe plugin id
Response
Authorization
clientTokenAuthorizationHeaderapiKey in headerEnter a client token with the Bearer prefix, e.g. Bearer Cxxxxxxxxxx.
clientTokenHeaderapiKey in headerclientTokenQueryapiKey in querybasicAuthhttp (basic)Enable a plugin.
Parameters
idinteger<int64>requiredpaththe plugin id
Response
Authorization
clientTokenAuthorizationHeaderapiKey in headerEnter a client token with the Bearer prefix, e.g. Bearer Cxxxxxxxxxx.
clientTokenHeaderapiKey in headerclientTokenQueryapiKey in querybasicAuthhttp (basic)version
Models
Application
objectThe Application holds information about an app which can send notifications.
defaultPriorityinteger<int64>The default priority of messages sent by this application. Defaults to 0.
4descriptionstringrequiredThe description of the application.
Backup server for the interwebsidinteger<int64>requiredread onlyThe application id.
5imagestringrequiredread onlyThe image of the application.
image/image.jpeginternalbooleanrequiredread onlyWhether the application is an internal application. Internal applications should not be deleted.
falselastUsedstring<date-time>read onlyThe last time the application token was used.
2019-01-01T00:00:00ZnamestringrequiredThe application name. This is how the application should be displayed to the user.
Backup ServersortKeystringrequiredThe sort key of this application. Uses fractional indexing.
a1tokenstringrequiredread onlyThe application token. Can be used as appToken. See Authentication.
AWH0wZ5r0Mbac.rApplicationParams
objectParams allowed to create or update Applications.
defaultPriorityinteger<int64>The default priority of messages sent by this application. Defaults to 0.
5descriptionstringThe description of the application.
Backup server for the interwebsnamestringrequiredThe application name. This is how the application should be displayed to the user.
Backup ServersortKeystringThe sortKey for the application. Uses fractional indexing.
a1Client
objectThe Client holds information about a device which can receive notifications (and other stuff).
idinteger<int64>requiredread onlyThe client id.
5lastUsedstring<date-time>read onlyThe last time the client token was used.
2019-01-01T00:00:00ZnamestringrequiredThe client name. This is how the client should be displayed to the user.
Android Phonetokenstringrequiredread onlyThe client token. Can be used as clientToken. See Authentication.
CWH0wZ5r0Mbac.rClientParams
objectParams allowed to create or update Clients.
namestringrequiredThe client name
My ClientCreateUserExternal
objectUsed for user creation.
adminbooleanrequiredIf the user is an administrator.
truenamestringrequiredThe user name. For login.
unicornpassstringrequiredThe user password. For login.
nrocinuError
objectThe Error contains error relevant information.
errorstringrequiredThe general error message
UnauthorizederrorCodeinteger<int64>requiredThe http error code.
401errorDescriptionstringrequiredThe http error code.
you need to provide a valid access token or user credentials to access this apiHealth
objectHealth represents how healthy the application is.
databasestringrequiredThe health of the database connection.
greenhealthstringrequiredThe health of the overall application.
greenMessage
objectThe MessageExternal holds information about a message which was sent by an Application.
appidinteger<int64>requiredread onlyThe application id that send this message.
5datestring<date-time>requiredread onlyThe date the message was created.
2018-02-27T19:36:10.5045044+01:00extrasobjectThe extra data sent along the message.
The extra fields are stored in a key-value scheme. Only accepted in CreateMessage requests with application/json content-type.
The keys should be in the following format: <top-namespace>::[<sub-namespace>::]<action>
These namespaces are reserved and might be used in the official clients: gotify android ios web server client. Do not use them for other purposes.
idinteger<int64>requiredread onlyThe message id.
25messagestringrequiredThe message. Markdown (excluding html) is allowed.
**Backup** was successfully finished.priorityinteger<int64>The priority of the message. If unset, then the default priority of the application will be used.
2titlestringThe title of the message.
BackupPagedMessages
objectWrapper for the paging and the messages.
The messages.
The Paging holds information about the limit and making requests to the next page.
Paging
objectThe Paging holds information about the limit and making requests to the next page.
limitinteger<int64>[1, 200]requiredread onlyThe limit of the messages for the current request.
123nextstringread onlyThe request url for the next page. Empty/Null when no next page is available.
http://example.com/message?limit=50&since=123456sinceinteger<int64>>= 0requiredread onlyThe ID of the last message returned in the current request. Use this as alternative to the next link.
5sizeinteger<int64>requiredread onlyThe amount of messages that got returned in the current request.
5PluginConf
objectHolds information about a plugin instance for one user.
authorstringread onlyThe author of the plugin.
jmattheiscapabilitiesArray<string>requiredCapabilities the plugin provides
[
"webhook",
"display"
]enabledbooleanrequiredWhether the plugin instance is enabled.
trueidinteger<int64>requiredread onlyThe plugin id.
25licensestringread onlyThe license of the plugin.
MITmodulePathstringrequiredread onlyThe module path of the plugin.
github.com/gotify/server/plugin/example/echonamestringrequiredread onlyThe plugin name.
RSS pollertokenstringrequiredThe user name. For login.
P1234websitestringread onlyThe website of the plugin.
gotify.netUpdateUserExternal
objectUsed for updating a user.
adminbooleanrequiredIf the user is an administrator.
truenamestringrequiredThe user name. For login.
unicornpassstringThe user password. For login. Empty for using old password
nrocinuUser
objectThe User holds information about permission and other stuff.
adminbooleanrequiredIf the user is an administrator.
trueidinteger<int64>requiredread onlyThe user id.
25namestringrequiredThe user name. For login.
unicornUserPass
objectThe Password for updating the user.
passstringrequiredThe user password. For login.
nrocinuVersionInfo
objectVersionInfo Model
buildDatestringrequiredThe date on which this binary was built.
2018-02-27T19:36:10.5045044+01:00commitstringrequiredThe git commit hash on which this binary was built.
ae9512b6b6feea56a110d59a3353ea3b9c293864versionstringrequiredThe current version.
5.2.6