# Gotify REST-API.

This 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 either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`.
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](https://github.com/gotify/server/issues)

Version: 2.0.1

Authentication:
- appTokenHeader: apiKey, header X-Gotify-Key
- appTokenQuery: apiKey, query token
- basicAuth: http (basic)
- clientTokenHeader: apiKey, header X-Gotify-Key
- clientTokenQuery: apiKey, query token

## Return all applications.

`GET /application`

Authentication (security requirement alternatives):

```json
[
  {
    "clientTokenHeader": []
  },
  {
    "clientTokenQuery": []
  },
  {
    "basicAuth": []
  }
]
```

- clientTokenHeader: apiKey, header X-Gotify-Key
- clientTokenQuery: apiKey, query token
- basicAuth: http (basic)

Responses:

- 200: Ok

Content type: application/json

Type: Array<Application>

Items:
  Reference: [Application](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/application-e7ad522ea3.md); Type: Application
  
  The Application holds information about an app which can send notifications.

- 401: Unauthorized

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 403: Forbidden

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

## Examples

### cURL

```bash
curl -X GET 'http://localhost/application' \
  -H 'X-Gotify-Key: YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('http://localhost/application', {
  method: 'GET',
  headers: {
    'X-Gotify-Key': 'YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.get(
    'http://localhost/application',
    headers={
        'X-Gotify-Key': 'YOUR_TOKEN',
    },
)
print(response.text)
```


## Create an application.

`POST /application`

Authentication (security requirement alternatives):

```json
[
  {
    "clientTokenHeader": []
  },
  {
    "clientTokenQuery": []
  },
  {
    "basicAuth": []
  }
]
```

- clientTokenHeader: apiKey, header X-Gotify-Key
- clientTokenQuery: apiKey, query token
- basicAuth: http (basic)

Request body: application/json (required)

the application to add

Type: Application

The Application holds information about an app which can send notifications.

Schema: [Application](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/application-e7ad522ea3.md)

- `description` (required)
  Type: string
  
  The description of the application.
  
  Example:
  
  ```json
  "Backup server for the interwebs"
  ```

- `id` (required)
  Type: integer, int64
  
  The application id.
  
  readOnly: true
  
  Example:
  
  ```json
  5
  ```

- `image` (required)
  Type: string
  
  The image of the application.
  
  readOnly: true
  
  Example:
  
  ```json
  "image/image.jpeg"
  ```

- `internal` (required)
  Type: boolean
  
  Whether the application is an internal application. Internal applications should not be deleted.
  
  readOnly: true
  
  Example:
  
  ```json
  false
  ```

- `name` (required)
  Type: string
  
  The application name. This is how the application should be displayed to the user.
  
  Example:
  
  ```json
  "Backup Server"
  ```

- `token` (required)
  Type: string
  
  The application token. Can be used as `appToken`. See Authentication.
  
  readOnly: true
  
  Example:
  
  ```json
  "AWH0wZ5r0Mbac.r"
  ```

Responses:

- 200: Ok

Content type: application/json

Type: Application

The Application holds information about an app which can send notifications.

Schema: [Application](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/application-e7ad522ea3.md)

- `description` (required)
  Type: string
  
  The description of the application.
  
  Example:
  
  ```json
  "Backup server for the interwebs"
  ```

- `id` (required)
  Type: integer, int64
  
  The application id.
  
  readOnly: true
  
  Example:
  
  ```json
  5
  ```

- `image` (required)
  Type: string
  
  The image of the application.
  
  readOnly: true
  
  Example:
  
  ```json
  "image/image.jpeg"
  ```

- `internal` (required)
  Type: boolean
  
  Whether the application is an internal application. Internal applications should not be deleted.
  
  readOnly: true
  
  Example:
  
  ```json
  false
  ```

- `name` (required)
  Type: string
  
  The application name. This is how the application should be displayed to the user.
  
  Example:
  
  ```json
  "Backup Server"
  ```

- `token` (required)
  Type: string
  
  The application token. Can be used as `appToken`. See Authentication.
  
  readOnly: true
  
  Example:
  
  ```json
  "AWH0wZ5r0Mbac.r"
  ```

- 400: Bad Request

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 401: Unauthorized

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 403: Forbidden

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

## Examples

### cURL

```bash
curl -X POST 'http://localhost/application' \
  -H 'X-Gotify-Key: YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "description": "Backup server for the interwebs",
  "name": "Backup Server"
}'
```

### JavaScript

```javascript
const body = `{
  "description": "Backup server for the interwebs",
  "name": "Backup Server"
}`;

const response = await fetch('http://localhost/application', {
  method: 'POST',
  headers: {
    'X-Gotify-Key': 'YOUR_TOKEN',
    'Content-Type': 'application/json',
  },
  body,
});

const data = await response.text();
```

### Python

```python
import requests

body = '''{
  "description": "Backup server for the interwebs",
  "name": "Backup Server"
}'''

response = requests.post(
    'http://localhost/application',
    data=body.encode('utf-8'),
    headers={
        'X-Gotify-Key': 'YOUR_TOKEN',
        'Content-Type': 'application/json',
    },
)
print(response.text)
```


## Update an application.

`PUT /application/{id}`

Authentication (security requirement alternatives):

```json
[
  {
    "clientTokenHeader": []
  },
  {
    "clientTokenQuery": []
  },
  {
    "basicAuth": []
  }
]
```

- clientTokenHeader: apiKey, header X-Gotify-Key
- clientTokenQuery: apiKey, query token
- basicAuth: http (basic)

Parameters:

- `id` (path, integer, int64, required) - the application id
  Type: integer, int64

Request body: application/json (required)

the application to update

Type: Application

The Application holds information about an app which can send notifications.

Schema: [Application](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/application-e7ad522ea3.md)

- `description` (required)
  Type: string
  
  The description of the application.
  
  Example:
  
  ```json
  "Backup server for the interwebs"
  ```

- `id` (required)
  Type: integer, int64
  
  The application id.
  
  readOnly: true
  
  Example:
  
  ```json
  5
  ```

- `image` (required)
  Type: string
  
  The image of the application.
  
  readOnly: true
  
  Example:
  
  ```json
  "image/image.jpeg"
  ```

- `internal` (required)
  Type: boolean
  
  Whether the application is an internal application. Internal applications should not be deleted.
  
  readOnly: true
  
  Example:
  
  ```json
  false
  ```

- `name` (required)
  Type: string
  
  The application name. This is how the application should be displayed to the user.
  
  Example:
  
  ```json
  "Backup Server"
  ```

- `token` (required)
  Type: string
  
  The application token. Can be used as `appToken`. See Authentication.
  
  readOnly: true
  
  Example:
  
  ```json
  "AWH0wZ5r0Mbac.r"
  ```

Responses:

- 200: Ok

Content type: application/json

Type: Application

The Application holds information about an app which can send notifications.

Schema: [Application](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/application-e7ad522ea3.md)

- `description` (required)
  Type: string
  
  The description of the application.
  
  Example:
  
  ```json
  "Backup server for the interwebs"
  ```

- `id` (required)
  Type: integer, int64
  
  The application id.
  
  readOnly: true
  
  Example:
  
  ```json
  5
  ```

- `image` (required)
  Type: string
  
  The image of the application.
  
  readOnly: true
  
  Example:
  
  ```json
  "image/image.jpeg"
  ```

- `internal` (required)
  Type: boolean
  
  Whether the application is an internal application. Internal applications should not be deleted.
  
  readOnly: true
  
  Example:
  
  ```json
  false
  ```

- `name` (required)
  Type: string
  
  The application name. This is how the application should be displayed to the user.
  
  Example:
  
  ```json
  "Backup Server"
  ```

- `token` (required)
  Type: string
  
  The application token. Can be used as `appToken`. See Authentication.
  
  readOnly: true
  
  Example:
  
  ```json
  "AWH0wZ5r0Mbac.r"
  ```

- 400: Bad Request

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 401: Unauthorized

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 403: Forbidden

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 404: Not Found

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

## Examples

### cURL

```bash
curl -X PUT 'http://localhost/application/0' \
  -H 'X-Gotify-Key: YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "description": "Backup server for the interwebs",
  "name": "Backup Server"
}'
```

### JavaScript

```javascript
const body = `{
  "description": "Backup server for the interwebs",
  "name": "Backup Server"
}`;

const response = await fetch('http://localhost/application/0', {
  method: 'PUT',
  headers: {
    'X-Gotify-Key': 'YOUR_TOKEN',
    'Content-Type': 'application/json',
  },
  body,
});

const data = await response.text();
```

### Python

```python
import requests

body = '''{
  "description": "Backup server for the interwebs",
  "name": "Backup Server"
}'''

response = requests.put(
    'http://localhost/application/0',
    data=body.encode('utf-8'),
    headers={
        'X-Gotify-Key': 'YOUR_TOKEN',
        'Content-Type': 'application/json',
    },
)
print(response.text)
```


## Delete an application.

`DELETE /application/{id}`

Authentication (security requirement alternatives):

```json
[
  {
    "clientTokenHeader": []
  },
  {
    "clientTokenQuery": []
  },
  {
    "basicAuth": []
  }
]
```

- clientTokenHeader: apiKey, header X-Gotify-Key
- clientTokenQuery: apiKey, query token
- basicAuth: http (basic)

Parameters:

- `id` (path, integer, int64, required) - the application id
  Type: integer, int64

Responses:

- 200: Ok

- 400: Bad Request

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 401: Unauthorized

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 403: Forbidden

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 404: Not Found

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

## Examples

### cURL

```bash
curl -X DELETE 'http://localhost/application/0' \
  -H 'X-Gotify-Key: YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('http://localhost/application/0', {
  method: 'DELETE',
  headers: {
    'X-Gotify-Key': 'YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.delete(
    'http://localhost/application/0',
    headers={
        'X-Gotify-Key': 'YOUR_TOKEN',
    },
)
print(response.text)
```


## Upload an image for an application.

`POST /application/{id}/image`

Authentication (security requirement alternatives):

```json
[
  {
    "clientTokenHeader": []
  },
  {
    "clientTokenQuery": []
  },
  {
    "basicAuth": []
  }
]
```

- clientTokenHeader: apiKey, header X-Gotify-Key
- clientTokenQuery: apiKey, query token
- basicAuth: http (basic)

Parameters:

- `id` (path, integer, int64, required) - the application id
  Type: integer, int64

Request body: multipart/form-data (required)

Type: object

- `file` (required)
  Type: string, binary
  
  the application image

Responses:

- 200: Ok

Content type: application/json

Type: Application

The Application holds information about an app which can send notifications.

Schema: [Application](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/application-e7ad522ea3.md)

- `description` (required)
  Type: string
  
  The description of the application.
  
  Example:
  
  ```json
  "Backup server for the interwebs"
  ```

- `id` (required)
  Type: integer, int64
  
  The application id.
  
  readOnly: true
  
  Example:
  
  ```json
  5
  ```

- `image` (required)
  Type: string
  
  The image of the application.
  
  readOnly: true
  
  Example:
  
  ```json
  "image/image.jpeg"
  ```

- `internal` (required)
  Type: boolean
  
  Whether the application is an internal application. Internal applications should not be deleted.
  
  readOnly: true
  
  Example:
  
  ```json
  false
  ```

- `name` (required)
  Type: string
  
  The application name. This is how the application should be displayed to the user.
  
  Example:
  
  ```json
  "Backup Server"
  ```

- `token` (required)
  Type: string
  
  The application token. Can be used as `appToken`. See Authentication.
  
  readOnly: true
  
  Example:
  
  ```json
  "AWH0wZ5r0Mbac.r"
  ```

- 400: Bad Request

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 401: Unauthorized

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 403: Forbidden

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 404: Not Found

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 500: Server Error

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

## Examples

### cURL

```bash
curl -X POST 'http://localhost/application/0/image' \
  -H 'X-Gotify-Key: YOUR_TOKEN'
```

### JavaScript

```javascript
const form = new FormData();
const response = await fetch('http://localhost/application/0/image', {
  method: 'POST',
  headers: {"X-Gotify-Key":"YOUR_TOKEN"},
  body: form,
});
console.log(await response.text());
```

### Python

```python
import requests
from contextlib import ExitStack

with ExitStack() as stack:
    files = [
    ]
    response = requests.request('POST', 'http://localhost/application/0/image', headers={"X-Gotify-Key":"YOUR_TOKEN"}, files=files)
    print(response.text)
```


## Return all messages from a specific application.

`GET /application/{id}/message`

Authentication (security requirement alternatives):

```json
[
  {
    "clientTokenHeader": []
  },
  {
    "clientTokenQuery": []
  },
  {
    "basicAuth": []
  }
]
```

- clientTokenHeader: apiKey, header X-Gotify-Key
- clientTokenQuery: apiKey, query token
- basicAuth: http (basic)

Parameters:

- `id` (path, integer, int64, required) - the application id
  Type: integer, int64

- `limit` (query, integer, optional) - the maximal amount of messages to return
  Type: integer
  
  default: 100
  
  minimum: 1
  
  maximum: 200

- `since` (query, integer, int64, optional) - return all messages with an ID less than this value
  Type: integer, int64
  
  minimum: 0

Responses:

- 200: Ok

Content type: application/json

Type: PagedMessages

Wrapper for the paging and the messages

Schema: [PagedMessages](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/pagedmessages-21c696acff.md)

- `messages` (required)
  Type: Array<Message>
  
  The messages.
  
  readOnly: true
  
  Items:
    Reference: [Message](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/message-2f77668a9d.md); Type: Message
    
    The MessageExternal holds information about a message which was sent by an Application.

- `paging` (required)
  Reference: [Paging](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/paging-a325388710.md); Type: Paging
  
  The Paging holds information about the limit and making requests to the next page.

- 400: Bad Request

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 401: Unauthorized

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 403: Forbidden

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 404: Not Found

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

## Examples

### cURL

```bash
curl -X GET 'http://localhost/application/0/message?limit=100' \
  -H 'X-Gotify-Key: YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('http://localhost/application/0/message?limit=100', {
  method: 'GET',
  headers: {
    'X-Gotify-Key': 'YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.get(
    'http://localhost/application/0/message?limit=100',
    headers={
        'X-Gotify-Key': 'YOUR_TOKEN',
    },
)
print(response.text)
```


## Delete all messages from a specific application.

`DELETE /application/{id}/message`

Authentication (security requirement alternatives):

```json
[
  {
    "clientTokenHeader": []
  },
  {
    "clientTokenQuery": []
  },
  {
    "basicAuth": []
  }
]
```

- clientTokenHeader: apiKey, header X-Gotify-Key
- clientTokenQuery: apiKey, query token
- basicAuth: http (basic)

Parameters:

- `id` (path, integer, int64, required) - the application id
  Type: integer, int64

Responses:

- 200: Ok

- 400: Bad Request

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 401: Unauthorized

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 403: Forbidden

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 404: Not Found

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

## Examples

### cURL

```bash
curl -X DELETE 'http://localhost/application/0/message' \
  -H 'X-Gotify-Key: YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('http://localhost/application/0/message', {
  method: 'DELETE',
  headers: {
    'X-Gotify-Key': 'YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.delete(
    'http://localhost/application/0/message',
    headers={
        'X-Gotify-Key': 'YOUR_TOKEN',
    },
)
print(response.text)
```


## Return all clients.

`GET /client`

Authentication (security requirement alternatives):

```json
[
  {
    "clientTokenHeader": []
  },
  {
    "clientTokenQuery": []
  },
  {
    "basicAuth": []
  }
]
```

- clientTokenHeader: apiKey, header X-Gotify-Key
- clientTokenQuery: apiKey, query token
- basicAuth: http (basic)

Responses:

- 200: Ok

Content type: application/json

Type: Array<Client>

Items:
  Reference: [Client](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/client-0c77fe09ab.md); Type: Client
  
  The Client holds information about a device which can receive notifications (and other stuff).

- 401: Unauthorized

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 403: Forbidden

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

## Examples

### cURL

```bash
curl -X GET 'http://localhost/client' \
  -H 'X-Gotify-Key: YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('http://localhost/client', {
  method: 'GET',
  headers: {
    'X-Gotify-Key': 'YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.get(
    'http://localhost/client',
    headers={
        'X-Gotify-Key': 'YOUR_TOKEN',
    },
)
print(response.text)
```


## Create a client.

`POST /client`

Authentication (security requirement alternatives):

```json
[
  {
    "clientTokenHeader": []
  },
  {
    "clientTokenQuery": []
  },
  {
    "basicAuth": []
  }
]
```

- clientTokenHeader: apiKey, header X-Gotify-Key
- clientTokenQuery: apiKey, query token
- basicAuth: http (basic)

Request body: application/json (required)

the client to add

Type: Client

The Client holds information about a device which can receive notifications (and other stuff).

Schema: [Client](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/client-0c77fe09ab.md)

- `id` (required)
  Type: integer, int64
  
  The client id.
  
  readOnly: true
  
  Example:
  
  ```json
  5
  ```

- `name` (required)
  Type: string
  
  The client name. This is how the client should be displayed to the user.
  
  Example:
  
  ```json
  "Android Phone"
  ```

- `token` (required)
  Type: string
  
  The client token. Can be used as `clientToken`. See Authentication.
  
  readOnly: true
  
  Example:
  
  ```json
  "CWH0wZ5r0Mbac.r"
  ```

Responses:

- 200: Ok

Content type: application/json

Type: Client

The Client holds information about a device which can receive notifications (and other stuff).

Schema: [Client](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/client-0c77fe09ab.md)

- `id` (required)
  Type: integer, int64
  
  The client id.
  
  readOnly: true
  
  Example:
  
  ```json
  5
  ```

- `name` (required)
  Type: string
  
  The client name. This is how the client should be displayed to the user.
  
  Example:
  
  ```json
  "Android Phone"
  ```

- `token` (required)
  Type: string
  
  The client token. Can be used as `clientToken`. See Authentication.
  
  readOnly: true
  
  Example:
  
  ```json
  "CWH0wZ5r0Mbac.r"
  ```

- 400: Bad Request

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 401: Unauthorized

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 403: Forbidden

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

## Examples

### cURL

```bash
curl -X POST 'http://localhost/client' \
  -H 'X-Gotify-Key: YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "name": "Android Phone"
}'
```

### JavaScript

```javascript
const body = `{
  "name": "Android Phone"
}`;

const response = await fetch('http://localhost/client', {
  method: 'POST',
  headers: {
    'X-Gotify-Key': 'YOUR_TOKEN',
    'Content-Type': 'application/json',
  },
  body,
});

const data = await response.text();
```

### Python

```python
import requests

body = '''{
  "name": "Android Phone"
}'''

response = requests.post(
    'http://localhost/client',
    data=body.encode('utf-8'),
    headers={
        'X-Gotify-Key': 'YOUR_TOKEN',
        'Content-Type': 'application/json',
    },
)
print(response.text)
```


## Update a client.

`PUT /client/{id}`

Authentication (security requirement alternatives):

```json
[
  {
    "clientTokenHeader": []
  },
  {
    "clientTokenQuery": []
  },
  {
    "basicAuth": []
  }
]
```

- clientTokenHeader: apiKey, header X-Gotify-Key
- clientTokenQuery: apiKey, query token
- basicAuth: http (basic)

Parameters:

- `id` (path, integer, int64, required) - the client id
  Type: integer, int64

Request body: application/json (required)

the client to update

Type: Client

The Client holds information about a device which can receive notifications (and other stuff).

Schema: [Client](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/client-0c77fe09ab.md)

- `id` (required)
  Type: integer, int64
  
  The client id.
  
  readOnly: true
  
  Example:
  
  ```json
  5
  ```

- `name` (required)
  Type: string
  
  The client name. This is how the client should be displayed to the user.
  
  Example:
  
  ```json
  "Android Phone"
  ```

- `token` (required)
  Type: string
  
  The client token. Can be used as `clientToken`. See Authentication.
  
  readOnly: true
  
  Example:
  
  ```json
  "CWH0wZ5r0Mbac.r"
  ```

Responses:

- 200: Ok

Content type: application/json

Type: Client

The Client holds information about a device which can receive notifications (and other stuff).

Schema: [Client](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/client-0c77fe09ab.md)

- `id` (required)
  Type: integer, int64
  
  The client id.
  
  readOnly: true
  
  Example:
  
  ```json
  5
  ```

- `name` (required)
  Type: string
  
  The client name. This is how the client should be displayed to the user.
  
  Example:
  
  ```json
  "Android Phone"
  ```

- `token` (required)
  Type: string
  
  The client token. Can be used as `clientToken`. See Authentication.
  
  readOnly: true
  
  Example:
  
  ```json
  "CWH0wZ5r0Mbac.r"
  ```

- 400: Bad Request

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 401: Unauthorized

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 403: Forbidden

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 404: Not Found

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

## Examples

### cURL

```bash
curl -X PUT 'http://localhost/client/0' \
  -H 'X-Gotify-Key: YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "name": "Android Phone"
}'
```

### JavaScript

```javascript
const body = `{
  "name": "Android Phone"
}`;

const response = await fetch('http://localhost/client/0', {
  method: 'PUT',
  headers: {
    'X-Gotify-Key': 'YOUR_TOKEN',
    'Content-Type': 'application/json',
  },
  body,
});

const data = await response.text();
```

### Python

```python
import requests

body = '''{
  "name": "Android Phone"
}'''

response = requests.put(
    'http://localhost/client/0',
    data=body.encode('utf-8'),
    headers={
        'X-Gotify-Key': 'YOUR_TOKEN',
        'Content-Type': 'application/json',
    },
)
print(response.text)
```


## Delete a client.

`DELETE /client/{id}`

Authentication (security requirement alternatives):

```json
[
  {
    "clientTokenHeader": []
  },
  {
    "clientTokenQuery": []
  },
  {
    "basicAuth": []
  }
]
```

- clientTokenHeader: apiKey, header X-Gotify-Key
- clientTokenQuery: apiKey, query token
- basicAuth: http (basic)

Parameters:

- `id` (path, integer, int64, required) - the client id
  Type: integer, int64

Responses:

- 200: Ok

- 400: Bad Request

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 401: Unauthorized

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 403: Forbidden

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 404: Not Found

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

## Examples

### cURL

```bash
curl -X DELETE 'http://localhost/client/0' \
  -H 'X-Gotify-Key: YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('http://localhost/client/0', {
  method: 'DELETE',
  headers: {
    'X-Gotify-Key': 'YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.delete(
    'http://localhost/client/0',
    headers={
        'X-Gotify-Key': 'YOUR_TOKEN',
    },
)
print(response.text)
```


## Return the current user.

`GET /current/user`

Authentication (security requirement alternatives):

```json
[
  {
    "clientTokenHeader": []
  },
  {
    "clientTokenQuery": []
  },
  {
    "basicAuth": []
  }
]
```

- clientTokenHeader: apiKey, header X-Gotify-Key
- clientTokenQuery: apiKey, query token
- basicAuth: http (basic)

Responses:

- 200: Ok

Content type: application/json

Type: User

The User holds information about permission and other stuff.

Schema: [User](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/user-b512d97e7c.md)

- `admin` (optional)
  Type: boolean
  
  If the user is an administrator.
  
  Example:
  
  ```json
  true
  ```

- `id` (required)
  Type: integer, int64
  
  The user id.
  
  readOnly: true
  
  Example:
  
  ```json
  25
  ```

- `name` (required)
  Type: string
  
  The user name. For login.
  
  Example:
  
  ```json
  "unicorn"
  ```

- 401: Unauthorized

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 403: Forbidden

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

## Examples

### cURL

```bash
curl -X GET 'http://localhost/current/user' \
  -H 'X-Gotify-Key: YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('http://localhost/current/user', {
  method: 'GET',
  headers: {
    'X-Gotify-Key': 'YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.get(
    'http://localhost/current/user',
    headers={
        'X-Gotify-Key': 'YOUR_TOKEN',
    },
)
print(response.text)
```


## Update the password of the current user.

`POST /current/user/password`

Authentication (security requirement alternatives):

```json
[
  {
    "clientTokenHeader": []
  },
  {
    "clientTokenQuery": []
  },
  {
    "basicAuth": []
  }
]
```

- clientTokenHeader: apiKey, header X-Gotify-Key
- clientTokenQuery: apiKey, query token
- basicAuth: http (basic)

Request body: application/json (required)

the user

Type: UserPass

The Password for updating the user.

Schema: [UserPass](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/userpass-d0d4f76c2b.md)

- `pass` (required)
  Type: string
  
  The user password. For login.
  
  Example:
  
  ```json
  "nrocinu"
  ```

Responses:

- 200: Ok

- 400: Bad Request

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 401: Unauthorized

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 403: Forbidden

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

## Examples

### cURL

```bash
curl -X POST 'http://localhost/current/user/password' \
  -H 'X-Gotify-Key: YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "pass": "nrocinu"
}'
```

### JavaScript

```javascript
const body = `{
  "pass": "nrocinu"
}`;

const response = await fetch('http://localhost/current/user/password', {
  method: 'POST',
  headers: {
    'X-Gotify-Key': 'YOUR_TOKEN',
    'Content-Type': 'application/json',
  },
  body,
});

const data = await response.text();
```

### Python

```python
import requests

body = '''{
  "pass": "nrocinu"
}'''

response = requests.post(
    'http://localhost/current/user/password',
    data=body.encode('utf-8'),
    headers={
        'X-Gotify-Key': 'YOUR_TOKEN',
        'Content-Type': 'application/json',
    },
)
print(response.text)
```


## Get health information.

`GET /health`

Authentication: no security requirement declared for this operation.

Responses:

- 200: Ok

Content type: application/json

Type: Health

Health represents how healthy the application is.

Schema: [Health](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/health-55898449eb.md)

- `database` (required)
  Type: string
  
  The health of the database connection.
  
  Example:
  
  ```json
  "green"
  ```

- `health` (required)
  Type: string
  
  The health of the overall application.
  
  Example:
  
  ```json
  "green"
  ```

- 500: Ok

Content type: application/json

Type: Health

Health represents how healthy the application is.

Schema: [Health](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/health-55898449eb.md)

- `database` (required)
  Type: string
  
  The health of the database connection.
  
  Example:
  
  ```json
  "green"
  ```

- `health` (required)
  Type: string
  
  The health of the overall application.
  
  Example:
  
  ```json
  "green"
  ```

## Examples

### cURL

```bash
curl -X GET 'http://localhost/health'
```

### JavaScript

```javascript
const response = await fetch('http://localhost/health', {
  method: 'GET',
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.get('http://localhost/health')
print(response.text)
```


## Return all messages.

`GET /message`

Authentication (security requirement alternatives):

```json
[
  {
    "clientTokenHeader": []
  },
  {
    "clientTokenQuery": []
  },
  {
    "basicAuth": []
  }
]
```

- clientTokenHeader: apiKey, header X-Gotify-Key
- clientTokenQuery: apiKey, query token
- basicAuth: http (basic)

Parameters:

- `limit` (query, integer, optional) - the maximal amount of messages to return
  Type: integer
  
  default: 100
  
  minimum: 1
  
  maximum: 200

- `since` (query, integer, int64, optional) - return all messages with an ID less than this value
  Type: integer, int64
  
  minimum: 0

Responses:

- 200: Ok

Content type: application/json

Type: PagedMessages

Wrapper for the paging and the messages

Schema: [PagedMessages](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/pagedmessages-21c696acff.md)

- `messages` (required)
  Type: Array<Message>
  
  The messages.
  
  readOnly: true
  
  Items:
    Reference: [Message](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/message-2f77668a9d.md); Type: Message
    
    The MessageExternal holds information about a message which was sent by an Application.

- `paging` (required)
  Reference: [Paging](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/paging-a325388710.md); Type: Paging
  
  The Paging holds information about the limit and making requests to the next page.

- 400: Bad Request

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 401: Unauthorized

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 403: Forbidden

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

## Examples

### cURL

```bash
curl -X GET 'http://localhost/message?limit=100' \
  -H 'X-Gotify-Key: YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('http://localhost/message?limit=100', {
  method: 'GET',
  headers: {
    'X-Gotify-Key': 'YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.get(
    'http://localhost/message?limit=100',
    headers={
        'X-Gotify-Key': 'YOUR_TOKEN',
    },
)
print(response.text)
```


## Create a message.

`POST /message`

__NOTE__: This API ONLY accepts an application token as authentication.

Authentication (security requirement alternatives):

```json
[
  {
    "appTokenHeader": []
  },
  {
    "appTokenQuery": []
  }
]
```

- appTokenHeader: apiKey, header X-Gotify-Key
- appTokenQuery: apiKey, query token

Request body: application/json (required)

the message to add

Type: Message

The MessageExternal holds information about a message which was sent by an Application.

Schema: [Message](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/message-2f77668a9d.md)

- `appid` (required)
  Type: integer, int64
  
  The application id that send this message.
  
  readOnly: true
  
  Example:
  
  ```json
  5
  ```

- `date` (required)
  Type: string, date-time
  
  The date the message was created.
  
  readOnly: true
  
  Example:
  
  ```json
  "2018-02-27T19:36:10.5045044+01:00"
  ```

- `extras` (optional)
  Type: object
  
  The 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: &lt;top-namespace&gt;::[&lt;sub-namespace&gt;::]&lt;action&gt;
  
  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.
  
  Example:
  
  ```json
  {
    "home::appliances::lighting::on": {
      "brightness": 15
    },
    "home::appliances::thermostat::change_temperature": {
      "temperature": 23
    }
  }
  ```
  
  Additional properties: 
    Type: object

- `id` (required)
  Type: integer, int64
  
  The message id.
  
  readOnly: true
  
  Example:
  
  ```json
  25
  ```

- `message` (required)
  Type: string
  
  The message. Markdown (excluding html) is allowed.
  
  Example:
  
  ```json
  "**Backup** was successfully finished."
  ```

- `priority` (optional)
  Type: integer, int64
  
  The priority of the message.
  
  Example:
  
  ```json
  2
  ```

- `title` (optional)
  Type: string
  
  The title of the message.
  
  Example:
  
  ```json
  "Backup"
  ```

Responses:

- 200: Ok

Content type: application/json

Type: Message

The MessageExternal holds information about a message which was sent by an Application.

Schema: [Message](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/message-2f77668a9d.md)

- `appid` (required)
  Type: integer, int64
  
  The application id that send this message.
  
  readOnly: true
  
  Example:
  
  ```json
  5
  ```

- `date` (required)
  Type: string, date-time
  
  The date the message was created.
  
  readOnly: true
  
  Example:
  
  ```json
  "2018-02-27T19:36:10.5045044+01:00"
  ```

- `extras` (optional)
  Type: object
  
  The 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: &lt;top-namespace&gt;::[&lt;sub-namespace&gt;::]&lt;action&gt;
  
  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.
  
  Example:
  
  ```json
  {
    "home::appliances::lighting::on": {
      "brightness": 15
    },
    "home::appliances::thermostat::change_temperature": {
      "temperature": 23
    }
  }
  ```
  
  Additional properties: 
    Type: object

- `id` (required)
  Type: integer, int64
  
  The message id.
  
  readOnly: true
  
  Example:
  
  ```json
  25
  ```

- `message` (required)
  Type: string
  
  The message. Markdown (excluding html) is allowed.
  
  Example:
  
  ```json
  "**Backup** was successfully finished."
  ```

- `priority` (optional)
  Type: integer, int64
  
  The priority of the message.
  
  Example:
  
  ```json
  2
  ```

- `title` (optional)
  Type: string
  
  The title of the message.
  
  Example:
  
  ```json
  "Backup"
  ```

- 400: Bad Request

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 401: Unauthorized

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 403: Forbidden

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

## Examples

### cURL

```bash
curl -X POST 'http://localhost/message' \
  -H 'X-Gotify-Key: YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "extras": {
    "home::appliances::lighting::on": {
      "brightness": 15
    },
    "home::appliances::thermostat::change_temperature": {
      "temperature": 23
    }
  },
  "message": "**Backup** was successfully finished.",
  "priority": 2,
  "title": "Backup"
}'
```

### JavaScript

```javascript
const body = `{
  "extras": {
    "home::appliances::lighting::on": {
      "brightness": 15
    },
    "home::appliances::thermostat::change_temperature": {
      "temperature": 23
    }
  },
  "message": "**Backup** was successfully finished.",
  "priority": 2,
  "title": "Backup"
}`;

const response = await fetch('http://localhost/message', {
  method: 'POST',
  headers: {
    'X-Gotify-Key': 'YOUR_TOKEN',
    'Content-Type': 'application/json',
  },
  body,
});

const data = await response.text();
```

### Python

```python
import requests

body = '''{
  "extras": {
    "home::appliances::lighting::on": {
      "brightness": 15
    },
    "home::appliances::thermostat::change_temperature": {
      "temperature": 23
    }
  },
  "message": "**Backup** was successfully finished.",
  "priority": 2,
  "title": "Backup"
}'''

response = requests.post(
    'http://localhost/message',
    data=body.encode('utf-8'),
    headers={
        'X-Gotify-Key': 'YOUR_TOKEN',
        'Content-Type': 'application/json',
    },
)
print(response.text)
```


## Delete all messages.

`DELETE /message`

Authentication (security requirement alternatives):

```json
[
  {
    "clientTokenHeader": []
  },
  {
    "clientTokenQuery": []
  },
  {
    "basicAuth": []
  }
]
```

- clientTokenHeader: apiKey, header X-Gotify-Key
- clientTokenQuery: apiKey, query token
- basicAuth: http (basic)

Responses:

- 200: Ok

- 401: Unauthorized

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 403: Forbidden

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

## Examples

### cURL

```bash
curl -X DELETE 'http://localhost/message' \
  -H 'X-Gotify-Key: YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('http://localhost/message', {
  method: 'DELETE',
  headers: {
    'X-Gotify-Key': 'YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.delete(
    'http://localhost/message',
    headers={
        'X-Gotify-Key': 'YOUR_TOKEN',
    },
)
print(response.text)
```


## Deletes a message with an id.

`DELETE /message/{id}`

Authentication (security requirement alternatives):

```json
[
  {
    "clientTokenHeader": []
  },
  {
    "clientTokenQuery": []
  },
  {
    "basicAuth": []
  }
]
```

- clientTokenHeader: apiKey, header X-Gotify-Key
- clientTokenQuery: apiKey, query token
- basicAuth: http (basic)

Parameters:

- `id` (path, integer, int64, required) - the message id
  Type: integer, int64

Responses:

- 200: Ok

- 400: Bad Request

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 401: Unauthorized

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 403: Forbidden

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 404: Not Found

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

## Examples

### cURL

```bash
curl -X DELETE 'http://localhost/message/0' \
  -H 'X-Gotify-Key: YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('http://localhost/message/0', {
  method: 'DELETE',
  headers: {
    'X-Gotify-Key': 'YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.delete(
    'http://localhost/message/0',
    headers={
        'X-Gotify-Key': 'YOUR_TOKEN',
    },
)
print(response.text)
```


## Return all plugins.

`GET /plugin`

Authentication (security requirement alternatives):

```json
[
  {
    "clientTokenHeader": []
  },
  {
    "clientTokenQuery": []
  },
  {
    "basicAuth": []
  }
]
```

- clientTokenHeader: apiKey, header X-Gotify-Key
- clientTokenQuery: apiKey, query token
- basicAuth: http (basic)

Responses:

- 200: Ok

Content type: application/json

Type: Array<PluginConf>

Items:
  Reference: [PluginConf](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/pluginconf-f74213b140.md); Type: PluginConf
  
  Holds information about a plugin instance for one user.

- 401: Unauthorized

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 403: Forbidden

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 404: Not Found

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 500: Internal Server Error

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

## Examples

### cURL

```bash
curl -X GET 'http://localhost/plugin' \
  -H 'X-Gotify-Key: YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('http://localhost/plugin', {
  method: 'GET',
  headers: {
    'X-Gotify-Key': 'YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.get(
    'http://localhost/plugin',
    headers={
        'X-Gotify-Key': 'YOUR_TOKEN',
    },
)
print(response.text)
```


## Get YAML configuration for Configurer plugin.

`GET /plugin/{id}/config`

Authentication (security requirement alternatives):

```json
[
  {
    "clientTokenHeader": []
  },
  {
    "clientTokenQuery": []
  },
  {
    "basicAuth": []
  }
]
```

- clientTokenHeader: apiKey, header X-Gotify-Key
- clientTokenQuery: apiKey, query token
- basicAuth: http (basic)

Parameters:

- `id` (path, integer, int64, required) - the plugin id
  Type: integer, int64

Responses:

- 200: Ok

Content type: application/x-yaml

Type: object

plugin configuration

- 400: Bad Request

Content type: application/x-yaml

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 401: Unauthorized

Content type: application/x-yaml

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 403: Forbidden

Content type: application/x-yaml

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 404: Not Found

Content type: application/x-yaml

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 500: Internal Server Error

Content type: application/x-yaml

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

## Examples

### cURL

```bash
curl -X GET 'http://localhost/plugin/0/config' \
  -H 'X-Gotify-Key: YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('http://localhost/plugin/0/config', {
  method: 'GET',
  headers: {
    'X-Gotify-Key': 'YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.get(
    'http://localhost/plugin/0/config',
    headers={
        'X-Gotify-Key': 'YOUR_TOKEN',
    },
)
print(response.text)
```


## Update YAML configuration for Configurer plugin.

`POST /plugin/{id}/config`

Authentication (security requirement alternatives):

```json
[
  {
    "clientTokenHeader": []
  },
  {
    "clientTokenQuery": []
  },
  {
    "basicAuth": []
  }
]
```

- clientTokenHeader: apiKey, header X-Gotify-Key
- clientTokenQuery: apiKey, query token
- basicAuth: http (basic)

Parameters:

- `id` (path, integer, int64, required) - the plugin id
  Type: integer, int64

Responses:

- 200: Ok

- 400: Bad Request

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 401: Unauthorized

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 403: Forbidden

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 404: Not Found

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 500: Internal Server Error

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

## Examples

### cURL

```bash
curl -X POST 'http://localhost/plugin/0/config' \
  -H 'X-Gotify-Key: YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('http://localhost/plugin/0/config', {
  method: 'POST',
  headers: {
    'X-Gotify-Key': 'YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.post(
    'http://localhost/plugin/0/config',
    headers={
        'X-Gotify-Key': 'YOUR_TOKEN',
    },
)
print(response.text)
```


## Disable a plugin.

`POST /plugin/{id}/disable`

Authentication (security requirement alternatives):

```json
[
  {
    "clientTokenHeader": []
  },
  {
    "clientTokenQuery": []
  },
  {
    "basicAuth": []
  }
]
```

- clientTokenHeader: apiKey, header X-Gotify-Key
- clientTokenQuery: apiKey, query token
- basicAuth: http (basic)

Parameters:

- `id` (path, integer, int64, required) - the plugin id
  Type: integer, int64

Responses:

- 200: Ok

- 401: Unauthorized

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 403: Forbidden

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 404: Not Found

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 500: Internal Server Error

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

## Examples

### cURL

```bash
curl -X POST 'http://localhost/plugin/0/disable' \
  -H 'X-Gotify-Key: YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('http://localhost/plugin/0/disable', {
  method: 'POST',
  headers: {
    'X-Gotify-Key': 'YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.post(
    'http://localhost/plugin/0/disable',
    headers={
        'X-Gotify-Key': 'YOUR_TOKEN',
    },
)
print(response.text)
```


## Get display info for a Displayer plugin.

`GET /plugin/{id}/display`

Authentication (security requirement alternatives):

```json
[
  {
    "clientTokenHeader": []
  },
  {
    "clientTokenQuery": []
  },
  {
    "basicAuth": []
  }
]
```

- clientTokenHeader: apiKey, header X-Gotify-Key
- clientTokenQuery: apiKey, query token
- basicAuth: http (basic)

Parameters:

- `id` (path, integer, int64, required) - the plugin id
  Type: integer, int64

Responses:

- 200: Ok

Content type: application/json

Type: string

- 401: Unauthorized

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 403: Forbidden

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 404: Not Found

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 500: Internal Server Error

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

## Examples

### cURL

```bash
curl -X GET 'http://localhost/plugin/0/display' \
  -H 'X-Gotify-Key: YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('http://localhost/plugin/0/display', {
  method: 'GET',
  headers: {
    'X-Gotify-Key': 'YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.get(
    'http://localhost/plugin/0/display',
    headers={
        'X-Gotify-Key': 'YOUR_TOKEN',
    },
)
print(response.text)
```


## Enable a plugin.

`POST /plugin/{id}/enable`

Authentication (security requirement alternatives):

```json
[
  {
    "clientTokenHeader": []
  },
  {
    "clientTokenQuery": []
  },
  {
    "basicAuth": []
  }
]
```

- clientTokenHeader: apiKey, header X-Gotify-Key
- clientTokenQuery: apiKey, query token
- basicAuth: http (basic)

Parameters:

- `id` (path, integer, int64, required) - the plugin id
  Type: integer, int64

Responses:

- 200: Ok

- 401: Unauthorized

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 403: Forbidden

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 404: Not Found

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 500: Internal Server Error

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

## Examples

### cURL

```bash
curl -X POST 'http://localhost/plugin/0/enable' \
  -H 'X-Gotify-Key: YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('http://localhost/plugin/0/enable', {
  method: 'POST',
  headers: {
    'X-Gotify-Key': 'YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.post(
    'http://localhost/plugin/0/enable',
    headers={
        'X-Gotify-Key': 'YOUR_TOKEN',
    },
)
print(response.text)
```


## Websocket, return newly created messages.

`GET /stream`

Authentication (security requirement alternatives):

```json
[
  {
    "clientTokenHeader": []
  },
  {
    "clientTokenQuery": []
  },
  {
    "basicAuth": []
  }
]
```

- clientTokenHeader: apiKey, header X-Gotify-Key
- clientTokenQuery: apiKey, query token
- basicAuth: http (basic)

Responses:

- 200: Ok

Content type: application/json

Type: Message

The MessageExternal holds information about a message which was sent by an Application.

Schema: [Message](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/message-2f77668a9d.md)

- `appid` (required)
  Type: integer, int64
  
  The application id that send this message.
  
  readOnly: true
  
  Example:
  
  ```json
  5
  ```

- `date` (required)
  Type: string, date-time
  
  The date the message was created.
  
  readOnly: true
  
  Example:
  
  ```json
  "2018-02-27T19:36:10.5045044+01:00"
  ```

- `extras` (optional)
  Type: object
  
  The 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: &lt;top-namespace&gt;::[&lt;sub-namespace&gt;::]&lt;action&gt;
  
  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.
  
  Example:
  
  ```json
  {
    "home::appliances::lighting::on": {
      "brightness": 15
    },
    "home::appliances::thermostat::change_temperature": {
      "temperature": 23
    }
  }
  ```
  
  Additional properties: 
    Type: object

- `id` (required)
  Type: integer, int64
  
  The message id.
  
  readOnly: true
  
  Example:
  
  ```json
  25
  ```

- `message` (required)
  Type: string
  
  The message. Markdown (excluding html) is allowed.
  
  Example:
  
  ```json
  "**Backup** was successfully finished."
  ```

- `priority` (optional)
  Type: integer, int64
  
  The priority of the message.
  
  Example:
  
  ```json
  2
  ```

- `title` (optional)
  Type: string
  
  The title of the message.
  
  Example:
  
  ```json
  "Backup"
  ```

- 400: Bad Request

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 401: Unauthorized

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 403: Forbidden

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 500: Server Error

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

## Examples

### cURL

```bash
curl -X GET 'http://localhost/stream' \
  -H 'X-Gotify-Key: YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('http://localhost/stream', {
  method: 'GET',
  headers: {
    'X-Gotify-Key': 'YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.get(
    'http://localhost/stream',
    headers={
        'X-Gotify-Key': 'YOUR_TOKEN',
    },
)
print(response.text)
```


## Return all users.

`GET /user`

Authentication (security requirement alternatives):

```json
[
  {
    "clientTokenHeader": []
  },
  {
    "clientTokenQuery": []
  },
  {
    "basicAuth": []
  }
]
```

- clientTokenHeader: apiKey, header X-Gotify-Key
- clientTokenQuery: apiKey, query token
- basicAuth: http (basic)

Responses:

- 200: Ok

Content type: application/json

Type: Array<User>

Items:
  Reference: [User](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/user-b512d97e7c.md); Type: User
  
  The User holds information about permission and other stuff.

- 401: Unauthorized

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 403: Forbidden

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

## Examples

### cURL

```bash
curl -X GET 'http://localhost/user' \
  -H 'X-Gotify-Key: YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('http://localhost/user', {
  method: 'GET',
  headers: {
    'X-Gotify-Key': 'YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.get(
    'http://localhost/user',
    headers={
        'X-Gotify-Key': 'YOUR_TOKEN',
    },
)
print(response.text)
```


## Create a user.

`POST /user`

With enabled registration: non admin users can be created without authentication.
With disabled registrations: users can only be created by admin users.

Authentication (security requirement alternatives):

```json
[
  {
    "clientTokenHeader": []
  },
  {
    "clientTokenQuery": []
  },
  {
    "basicAuth": []
  }
]
```

- clientTokenHeader: apiKey, header X-Gotify-Key
- clientTokenQuery: apiKey, query token
- basicAuth: http (basic)

Request body: application/json (required)

the user to add

Type: UserWithPass

The UserWithPass holds information about the credentials and other stuff.

Schema: [UserWithPass](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/userwithpass-8bfa990567.md)

- `admin` (optional)
  Type: boolean
  
  If the user is an administrator.
  
  Example:
  
  ```json
  true
  ```

- `id` (required)
  Type: integer, int64
  
  The user id.
  
  readOnly: true
  
  Example:
  
  ```json
  25
  ```

- `name` (required)
  Type: string
  
  The user name. For login.
  
  Example:
  
  ```json
  "unicorn"
  ```

- `pass` (required)
  Type: string
  
  The user password. For login.
  
  Example:
  
  ```json
  "nrocinu"
  ```

Responses:

- 200: Ok

Content type: application/json

Type: User

The User holds information about permission and other stuff.

Schema: [User](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/user-b512d97e7c.md)

- `admin` (optional)
  Type: boolean
  
  If the user is an administrator.
  
  Example:
  
  ```json
  true
  ```

- `id` (required)
  Type: integer, int64
  
  The user id.
  
  readOnly: true
  
  Example:
  
  ```json
  25
  ```

- `name` (required)
  Type: string
  
  The user name. For login.
  
  Example:
  
  ```json
  "unicorn"
  ```

- 400: Bad Request

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 401: Unauthorized

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 403: Forbidden

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

## Examples

### cURL

```bash
curl -X POST 'http://localhost/user' \
  -H 'X-Gotify-Key: YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "admin": true,
  "name": "unicorn",
  "pass": "nrocinu"
}'
```

### JavaScript

```javascript
const body = `{
  "admin": true,
  "name": "unicorn",
  "pass": "nrocinu"
}`;

const response = await fetch('http://localhost/user', {
  method: 'POST',
  headers: {
    'X-Gotify-Key': 'YOUR_TOKEN',
    'Content-Type': 'application/json',
  },
  body,
});

const data = await response.text();
```

### Python

```python
import requests

body = '''{
  "admin": true,
  "name": "unicorn",
  "pass": "nrocinu"
}'''

response = requests.post(
    'http://localhost/user',
    data=body.encode('utf-8'),
    headers={
        'X-Gotify-Key': 'YOUR_TOKEN',
        'Content-Type': 'application/json',
    },
)
print(response.text)
```


## Get a user.

`GET /user/{id}`

Authentication (security requirement alternatives):

```json
[
  {
    "clientTokenHeader": []
  },
  {
    "clientTokenQuery": []
  },
  {
    "basicAuth": []
  }
]
```

- clientTokenHeader: apiKey, header X-Gotify-Key
- clientTokenQuery: apiKey, query token
- basicAuth: http (basic)

Parameters:

- `id` (path, integer, int64, required) - the user id
  Type: integer, int64

Responses:

- 200: Ok

Content type: application/json

Type: User

The User holds information about permission and other stuff.

Schema: [User](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/user-b512d97e7c.md)

- `admin` (optional)
  Type: boolean
  
  If the user is an administrator.
  
  Example:
  
  ```json
  true
  ```

- `id` (required)
  Type: integer, int64
  
  The user id.
  
  readOnly: true
  
  Example:
  
  ```json
  25
  ```

- `name` (required)
  Type: string
  
  The user name. For login.
  
  Example:
  
  ```json
  "unicorn"
  ```

- 400: Bad Request

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 401: Unauthorized

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 403: Forbidden

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 404: Not Found

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

## Examples

### cURL

```bash
curl -X GET 'http://localhost/user/0' \
  -H 'X-Gotify-Key: YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('http://localhost/user/0', {
  method: 'GET',
  headers: {
    'X-Gotify-Key': 'YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.get(
    'http://localhost/user/0',
    headers={
        'X-Gotify-Key': 'YOUR_TOKEN',
    },
)
print(response.text)
```


## Update a user.

`POST /user/{id}`

Authentication (security requirement alternatives):

```json
[
  {
    "clientTokenHeader": []
  },
  {
    "clientTokenQuery": []
  },
  {
    "basicAuth": []
  }
]
```

- clientTokenHeader: apiKey, header X-Gotify-Key
- clientTokenQuery: apiKey, query token
- basicAuth: http (basic)

Parameters:

- `id` (path, integer, int64, required) - the user id
  Type: integer, int64

Request body: application/json (required)

the updated user

Type: UserWithPass

The UserWithPass holds information about the credentials and other stuff.

Schema: [UserWithPass](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/userwithpass-8bfa990567.md)

- `admin` (optional)
  Type: boolean
  
  If the user is an administrator.
  
  Example:
  
  ```json
  true
  ```

- `id` (required)
  Type: integer, int64
  
  The user id.
  
  readOnly: true
  
  Example:
  
  ```json
  25
  ```

- `name` (required)
  Type: string
  
  The user name. For login.
  
  Example:
  
  ```json
  "unicorn"
  ```

- `pass` (required)
  Type: string
  
  The user password. For login.
  
  Example:
  
  ```json
  "nrocinu"
  ```

Responses:

- 200: Ok

Content type: application/json

Type: User

The User holds information about permission and other stuff.

Schema: [User](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/user-b512d97e7c.md)

- `admin` (optional)
  Type: boolean
  
  If the user is an administrator.
  
  Example:
  
  ```json
  true
  ```

- `id` (required)
  Type: integer, int64
  
  The user id.
  
  readOnly: true
  
  Example:
  
  ```json
  25
  ```

- `name` (required)
  Type: string
  
  The user name. For login.
  
  Example:
  
  ```json
  "unicorn"
  ```

- 400: Bad Request

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 401: Unauthorized

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 403: Forbidden

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 404: Not Found

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

## Examples

### cURL

```bash
curl -X POST 'http://localhost/user/0' \
  -H 'X-Gotify-Key: YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "admin": true,
  "name": "unicorn",
  "pass": "nrocinu"
}'
```

### JavaScript

```javascript
const body = `{
  "admin": true,
  "name": "unicorn",
  "pass": "nrocinu"
}`;

const response = await fetch('http://localhost/user/0', {
  method: 'POST',
  headers: {
    'X-Gotify-Key': 'YOUR_TOKEN',
    'Content-Type': 'application/json',
  },
  body,
});

const data = await response.text();
```

### Python

```python
import requests

body = '''{
  "admin": true,
  "name": "unicorn",
  "pass": "nrocinu"
}'''

response = requests.post(
    'http://localhost/user/0',
    data=body.encode('utf-8'),
    headers={
        'X-Gotify-Key': 'YOUR_TOKEN',
        'Content-Type': 'application/json',
    },
)
print(response.text)
```


## Deletes a user.

`DELETE /user/{id}`

Authentication (security requirement alternatives):

```json
[
  {
    "clientTokenHeader": []
  },
  {
    "clientTokenQuery": []
  },
  {
    "basicAuth": []
  }
]
```

- clientTokenHeader: apiKey, header X-Gotify-Key
- clientTokenQuery: apiKey, query token
- basicAuth: http (basic)

Parameters:

- `id` (path, integer, int64, required) - the user id
  Type: integer, int64

Responses:

- 200: Ok

- 400: Bad Request

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 401: Unauthorized

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 403: Forbidden

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

- 404: Not Found

Content type: application/json

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

## Examples

### cURL

```bash
curl -X DELETE 'http://localhost/user/0' \
  -H 'X-Gotify-Key: YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('http://localhost/user/0', {
  method: 'DELETE',
  headers: {
    'X-Gotify-Key': 'YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.delete(
    'http://localhost/user/0',
    headers={
        'X-Gotify-Key': 'YOUR_TOKEN',
    },
)
print(response.text)
```


## Get version information.

`GET /version`

Authentication: no security requirement declared for this operation.

Responses:

- 200: Ok

Content type: application/json

Type: VersionInfo

VersionInfo Model

Schema: [VersionInfo](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/versioninfo-641558380f.md)

- `buildDate` (required)
  Type: string
  
  The date on which this binary was built.
  
  Example:
  
  ```json
  "2018-02-27T19:36:10.5045044+01:00"
  ```

- `commit` (required)
  Type: string
  
  The git commit hash on which this binary was built.
  
  Example:
  
  ```json
  "ae9512b6b6feea56a110d59a3353ea3b9c293864"
  ```

- `version` (required)
  Type: string
  
  The current version.
  
  Example:
  
  ```json
  "5.2.6"
  ```

## Examples

### cURL

```bash
curl -X GET 'http://localhost/version'
```

### JavaScript

```javascript
const response = await fetch('http://localhost/version', {
  method: 'GET',
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.get('http://localhost/version')
print(response.text)
```


## Application

Type: Application

The Application holds information about an app which can send notifications.

Schema: [Application](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/application-e7ad522ea3.md)

- `description` (required)
  Type: string
  
  The description of the application.
  
  Example:
  
  ```json
  "Backup server for the interwebs"
  ```

- `id` (required)
  Type: integer, int64
  
  The application id.
  
  readOnly: true
  
  Example:
  
  ```json
  5
  ```

- `image` (required)
  Type: string
  
  The image of the application.
  
  readOnly: true
  
  Example:
  
  ```json
  "image/image.jpeg"
  ```

- `internal` (required)
  Type: boolean
  
  Whether the application is an internal application. Internal applications should not be deleted.
  
  readOnly: true
  
  Example:
  
  ```json
  false
  ```

- `name` (required)
  Type: string
  
  The application name. This is how the application should be displayed to the user.
  
  Example:
  
  ```json
  "Backup Server"
  ```

- `token` (required)
  Type: string
  
  The application token. Can be used as `appToken`. See Authentication.
  
  readOnly: true
  
  Example:
  
  ```json
  "AWH0wZ5r0Mbac.r"
  ```

## Client

Type: Client

The Client holds information about a device which can receive notifications (and other stuff).

Schema: [Client](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/client-0c77fe09ab.md)

- `id` (required)
  Type: integer, int64
  
  The client id.
  
  readOnly: true
  
  Example:
  
  ```json
  5
  ```

- `name` (required)
  Type: string
  
  The client name. This is how the client should be displayed to the user.
  
  Example:
  
  ```json
  "Android Phone"
  ```

- `token` (required)
  Type: string
  
  The client token. Can be used as `clientToken`. See Authentication.
  
  readOnly: true
  
  Example:
  
  ```json
  "CWH0wZ5r0Mbac.r"
  ```

## Error

Type: Error

The Error contains error relevant information.

Schema: [Error](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/error-54a0e8c17e.md)

- `error` (required)
  Type: string
  
  The general error message
  
  Example:
  
  ```json
  "Unauthorized"
  ```

- `errorCode` (required)
  Type: integer, int64
  
  The http error code.
  
  Example:
  
  ```json
  401
  ```

- `errorDescription` (required)
  Type: string
  
  The http error code.
  
  Example:
  
  ```json
  "you need to provide a valid access token or user credentials to access this api"
  ```

## Health

Type: Health

Health represents how healthy the application is.

Schema: [Health](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/health-55898449eb.md)

- `database` (required)
  Type: string
  
  The health of the database connection.
  
  Example:
  
  ```json
  "green"
  ```

- `health` (required)
  Type: string
  
  The health of the overall application.
  
  Example:
  
  ```json
  "green"
  ```

## Message

Type: Message

The MessageExternal holds information about a message which was sent by an Application.

Schema: [Message](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/message-2f77668a9d.md)

- `appid` (required)
  Type: integer, int64
  
  The application id that send this message.
  
  readOnly: true
  
  Example:
  
  ```json
  5
  ```

- `date` (required)
  Type: string, date-time
  
  The date the message was created.
  
  readOnly: true
  
  Example:
  
  ```json
  "2018-02-27T19:36:10.5045044+01:00"
  ```

- `extras` (optional)
  Type: object
  
  The 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: &lt;top-namespace&gt;::[&lt;sub-namespace&gt;::]&lt;action&gt;
  
  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.
  
  Example:
  
  ```json
  {
    "home::appliances::lighting::on": {
      "brightness": 15
    },
    "home::appliances::thermostat::change_temperature": {
      "temperature": 23
    }
  }
  ```
  
  Additional properties: 
    Type: object

- `id` (required)
  Type: integer, int64
  
  The message id.
  
  readOnly: true
  
  Example:
  
  ```json
  25
  ```

- `message` (required)
  Type: string
  
  The message. Markdown (excluding html) is allowed.
  
  Example:
  
  ```json
  "**Backup** was successfully finished."
  ```

- `priority` (optional)
  Type: integer, int64
  
  The priority of the message.
  
  Example:
  
  ```json
  2
  ```

- `title` (optional)
  Type: string
  
  The title of the message.
  
  Example:
  
  ```json
  "Backup"
  ```

## PagedMessages

Type: PagedMessages

Wrapper for the paging and the messages

Schema: [PagedMessages](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/pagedmessages-21c696acff.md)

- `messages` (required)
  Type: Array<Message>
  
  The messages.
  
  readOnly: true
  
  Items:
    Reference: [Message](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/message-2f77668a9d.md); Type: Message
    
    The MessageExternal holds information about a message which was sent by an Application.

- `paging` (required)
  Reference: [Paging](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/paging-a325388710.md); Type: Paging
  
  The Paging holds information about the limit and making requests to the next page.

## Paging

Type: Paging

The Paging holds information about the limit and making requests to the next page.

Schema: [Paging](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/paging-a325388710.md)

- `limit` (required)
  Type: integer, int64
  
  The limit of the messages for the current request.
  
  minimum: 1
  
  maximum: 200
  
  readOnly: true
  
  Example:
  
  ```json
  123
  ```

- `next` (optional)
  Type: string
  
  The request url for the next page. Empty/Null when no next page is available.
  
  readOnly: true
  
  Example:
  
  ```json
  "http://example.com/message?limit=50&since=123456"
  ```

- `since` (required)
  Type: integer, int64
  
  The ID of the last message returned in the current request. Use this as alternative to the next link.
  
  minimum: 0
  
  readOnly: true
  
  Example:
  
  ```json
  5
  ```

- `size` (required)
  Type: integer, int64
  
  The amount of messages that got returned in the current request.
  
  readOnly: true
  
  Example:
  
  ```json
  5
  ```

## PluginConf

Type: PluginConf

Holds information about a plugin instance for one user.

Schema: [PluginConf](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/pluginconf-f74213b140.md)

- `author` (optional)
  Type: string
  
  The author of the plugin.
  
  readOnly: true
  
  Example:
  
  ```json
  "jmattheis"
  ```

- `capabilities` (required)
  Type: Array<string>
  
  Capabilities the plugin provides
  
  Example:
  
  ```json
  [
    "webhook",
    "display"
  ]
  ```
  
  Items:
    Type: string

- `enabled` (required)
  Type: boolean
  
  Whether the plugin instance is enabled.
  
  Example:
  
  ```json
  true
  ```

- `id` (required)
  Type: integer, int64
  
  The plugin id.
  
  readOnly: true
  
  Example:
  
  ```json
  25
  ```

- `license` (optional)
  Type: string
  
  The license of the plugin.
  
  readOnly: true
  
  Example:
  
  ```json
  "MIT"
  ```

- `modulePath` (required)
  Type: string
  
  The module path of the plugin.
  
  readOnly: true
  
  Example:
  
  ```json
  "github.com/gotify/server/plugin/example/echo"
  ```

- `name` (required)
  Type: string
  
  The plugin name.
  
  readOnly: true
  
  Example:
  
  ```json
  "RSS poller"
  ```

- `token` (required)
  Type: string
  
  The user name. For login.
  
  Example:
  
  ```json
  "P1234"
  ```

- `website` (optional)
  Type: string
  
  The website of the plugin.
  
  readOnly: true
  
  Example:
  
  ```json
  "gotify.net"
  ```

## User

Type: User

The User holds information about permission and other stuff.

Schema: [User](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/user-b512d97e7c.md)

- `admin` (optional)
  Type: boolean
  
  If the user is an administrator.
  
  Example:
  
  ```json
  true
  ```

- `id` (required)
  Type: integer, int64
  
  The user id.
  
  readOnly: true
  
  Example:
  
  ```json
  25
  ```

- `name` (required)
  Type: string
  
  The user name. For login.
  
  Example:
  
  ```json
  "unicorn"
  ```

## UserPass

Type: UserPass

The Password for updating the user.

Schema: [UserPass](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/userpass-d0d4f76c2b.md)

- `pass` (required)
  Type: string
  
  The user password. For login.
  
  Example:
  
  ```json
  "nrocinu"
  ```

## UserWithPass

Type: UserWithPass

The UserWithPass holds information about the credentials and other stuff.

Schema: [UserWithPass](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/userwithpass-8bfa990567.md)

- `admin` (optional)
  Type: boolean
  
  If the user is an administrator.
  
  Example:
  
  ```json
  true
  ```

- `id` (required)
  Type: integer, int64
  
  The user id.
  
  readOnly: true
  
  Example:
  
  ```json
  25
  ```

- `name` (required)
  Type: string
  
  The user name. For login.
  
  Example:
  
  ```json
  "unicorn"
  ```

- `pass` (required)
  Type: string
  
  The user password. For login.
  
  Example:
  
  ```json
  "nrocinu"
  ```

## VersionInfo

Type: VersionInfo

VersionInfo Model

Schema: [VersionInfo](https://sourcey-gotify.pages.dev/api-docs/v2.1.2/schemas/versioninfo-641558380f.md)

- `buildDate` (required)
  Type: string
  
  The date on which this binary was built.
  
  Example:
  
  ```json
  "2018-02-27T19:36:10.5045044+01:00"
  ```

- `commit` (required)
  Type: string
  
  The git commit hash on which this binary was built.
  
  Example:
  
  ```json
  "ae9512b6b6feea56a110d59a3353ea3b9c293864"
  ```

- `version` (required)
  Type: string
  
  The current version.
  
  Example:
  
  ```json
  "5.2.6"
  ```
