A simple document with documentation of the ntfy api
The API knows 2 different ways of authenticating.
- Basic auth:
Basic base64(<username>:<password>)
- Bearer token:
Bearer <token>
Either of these tokens are placed in the Authorization
header
All endpoints described in this document should be prefixed with http(s)://<domain>/v1
.
This is because it makes the document easier to read.
These endpoints are only accessible for users with the admin role.
Gets all users including their ACL's.
[
{
"username": "string",
"role": "string",
"grants": [
{
"topic": "string",
"permission": "string"
}
]
}
]
Creates a new user with assigned username, password and optionally tier.
{
"username": "string",
"password": "string",
"tier": "string"
}
{
"success": "bool"
}
Deletes the given user.
{
"username": "string"
}
{
"success": "bool"
}
Creates/updates ACL's for the given user.
{
"username": "string",
"topic": "string",
"permission": "string"
}
{
"success": "bool"
}
Deletes the given ACL for the given topic from the user. This will also return a 200 even if the user is no longer has an ACL for that topic.
{
"username": "string",
"topic": "string"
}
{
"success": "bool"
}
These endpoints are accessible for all authenticated users.
Get's all account data for the user. If no authentication data is given, it fetches the data for the anonymous user.
{
"username": "string",
"role": "string",
"sync_topic": "string",
"tokens": [],
"limits": {},
"stats": {}
}
This endpoint is not documented since it's used for signing up, which is not possible on selfhosted instances.
Delete the users account, requires the current password. The user appears to be deleted, however, when using the /users endpoint, it still shows up. This could be a bug, further investigation required.
{
"password": "string"
}
{
"success": "bool"
}
Creates an access token for the given user.
{
"token": "string",
"last_access": "number",
"last_origin": "string",
"expires": "number"
}
This endpoint is not documented since it's not yet been investigated.
This endpoint is not documented since it's not yet been investigated.
Change the users password, requires the current password.
{
"password": "string",
"new_password": "string"
}
{
"success": "bool"
}