Files
dokploy/apps/docs/content/docs/api/reference-api/reference-notification.mdx
2024-09-01 23:11:17 -06:00

1957 lines
30 KiB
Plaintext

---
title: notification
full: true
---
import { Root, API, APIInfo, APIExample, Responses, Response, ResponseTypes, ExampleResponse, TypeScriptResponse, Property, ObjectCollapsible, Requests, Request } from "fumadocs-ui/components/api";
<Root>
<API>
<APIInfo method={"POST"} route={"/notification.createSlack"}>
## notification-createSlack
### Authorization
<Property name={"Authorization"} type={"Bearer <token>"} required={true}>
In: `header`
</Property>
### Request Body
<Property name={"appBuildError"} type={"boolean"} required={true} deprecated={undefined}>
</Property>
<Property name={"databaseBackup"} type={"boolean"} required={true} deprecated={undefined}>
</Property>
<Property name={"dokployRestart"} type={"boolean"} required={true} deprecated={undefined}>
</Property>
<Property name={"name"} type={"string"} required={true} deprecated={undefined}>
</Property>
<Property name={"appDeploy"} type={"boolean"} required={true} deprecated={undefined}>
</Property>
<Property name={"dockerCleanup"} type={"boolean"} required={true} deprecated={undefined}>
</Property>
<Property name={"webhookUrl"} type={"string"} required={true} deprecated={undefined}>
<span>Minimum length: `1`</span>
</Property>
<Property name={"channel"} type={"string"} required={true} deprecated={undefined}>
</Property>
| Status code | Description |
| ----------- | ----------- |
| `200` | Successful response |
| `default` | Error response |
</APIInfo>
<APIExample>
<Requests items={["cURL","JavaScript"]}>
<Request value={"cURL"}>
```bash
curl -X POST "http://localhost:3000/api/notification.createSlack" \
-d '{
"appBuildError": true,
"databaseBackup": true,
"dokployRestart": true,
"name": "string",
"appDeploy": true,
"dockerCleanup": true,
"webhookUrl": "string",
"channel": "string"
}'
```
</Request>
<Request value={"JavaScript"}>
```js
fetch("http://localhost:3000/api/notification.createSlack", {
method: "POST"
});
```
</Request>
</Requests>
<Responses items={["default"]}>
<Response value={"default"}>
<ResponseTypes>
<ExampleResponse>
```json
{
"message": "string",
"code": "string",
"issues": [
{
"message": "string"
}
]
}
```
</ExampleResponse>
<TypeScriptResponse>
```ts
export interface Response {
message: string;
code: string;
issues?: {
message: string;
}[];
}
```
</TypeScriptResponse>
</ResponseTypes>
</Response>
</Responses>
</APIExample>
</API>
<API>
<APIInfo method={"POST"} route={"/notification.updateSlack"}>
## notification-updateSlack
### Authorization
<Property name={"Authorization"} type={"Bearer <token>"} required={true}>
In: `header`
</Property>
### Request Body
<Property name={"appBuildError"} type={"boolean"} required={false} deprecated={undefined}>
</Property>
<Property name={"databaseBackup"} type={"boolean"} required={false} deprecated={undefined}>
</Property>
<Property name={"dokployRestart"} type={"boolean"} required={false} deprecated={undefined}>
</Property>
<Property name={"name"} type={"string"} required={false} deprecated={undefined}>
</Property>
<Property name={"appDeploy"} type={"boolean"} required={false} deprecated={undefined}>
</Property>
<Property name={"dockerCleanup"} type={"boolean"} required={false} deprecated={undefined}>
</Property>
<Property name={"webhookUrl"} type={"string"} required={false} deprecated={undefined}>
<span>Minimum length: `1`</span>
</Property>
<Property name={"channel"} type={"string"} required={false} deprecated={undefined}>
</Property>
<Property name={"notificationId"} type={"string"} required={true} deprecated={undefined}>
<span>Minimum length: `1`</span>
</Property>
<Property name={"slackId"} type={"string"} required={true} deprecated={undefined}>
</Property>
| Status code | Description |
| ----------- | ----------- |
| `200` | Successful response |
| `default` | Error response |
</APIInfo>
<APIExample>
<Requests items={["cURL","JavaScript"]}>
<Request value={"cURL"}>
```bash
curl -X POST "http://localhost:3000/api/notification.updateSlack" \
-d '{
"appBuildError": true,
"databaseBackup": true,
"dokployRestart": true,
"name": "string",
"appDeploy": true,
"dockerCleanup": true,
"webhookUrl": "string",
"channel": "string",
"notificationId": "string",
"slackId": "string"
}'
```
</Request>
<Request value={"JavaScript"}>
```js
fetch("http://localhost:3000/api/notification.updateSlack", {
method: "POST"
});
```
</Request>
</Requests>
<Responses items={["default"]}>
<Response value={"default"}>
<ResponseTypes>
<ExampleResponse>
```json
{
"message": "string",
"code": "string",
"issues": [
{
"message": "string"
}
]
}
```
</ExampleResponse>
<TypeScriptResponse>
```ts
export interface Response {
message: string;
code: string;
issues?: {
message: string;
}[];
}
```
</TypeScriptResponse>
</ResponseTypes>
</Response>
</Responses>
</APIExample>
</API>
<API>
<APIInfo method={"POST"} route={"/notification.testSlackConnection"}>
## notification-testSlackConnection
### Authorization
<Property name={"Authorization"} type={"Bearer <token>"} required={true}>
In: `header`
</Property>
### Request Body
<Property name={"webhookUrl"} type={"string"} required={true} deprecated={undefined}>
<span>Minimum length: `1`</span>
</Property>
<Property name={"channel"} type={"string"} required={true} deprecated={undefined}>
</Property>
| Status code | Description |
| ----------- | ----------- |
| `200` | Successful response |
| `default` | Error response |
</APIInfo>
<APIExample>
<Requests items={["cURL","JavaScript"]}>
<Request value={"cURL"}>
```bash
curl -X POST "http://localhost:3000/api/notification.testSlackConnection" \
-d '{
"webhookUrl": "string",
"channel": "string"
}'
```
</Request>
<Request value={"JavaScript"}>
```js
fetch("http://localhost:3000/api/notification.testSlackConnection", {
method: "POST"
});
```
</Request>
</Requests>
<Responses items={["default"]}>
<Response value={"default"}>
<ResponseTypes>
<ExampleResponse>
```json
{
"message": "string",
"code": "string",
"issues": [
{
"message": "string"
}
]
}
```
</ExampleResponse>
<TypeScriptResponse>
```ts
export interface Response {
message: string;
code: string;
issues?: {
message: string;
}[];
}
```
</TypeScriptResponse>
</ResponseTypes>
</Response>
</Responses>
</APIExample>
</API>
<API>
<APIInfo method={"POST"} route={"/notification.createTelegram"}>
## notification-createTelegram
### Authorization
<Property name={"Authorization"} type={"Bearer <token>"} required={true}>
In: `header`
</Property>
### Request Body
<Property name={"appBuildError"} type={"boolean"} required={true} deprecated={undefined}>
</Property>
<Property name={"databaseBackup"} type={"boolean"} required={true} deprecated={undefined}>
</Property>
<Property name={"dokployRestart"} type={"boolean"} required={true} deprecated={undefined}>
</Property>
<Property name={"name"} type={"string"} required={true} deprecated={undefined}>
</Property>
<Property name={"appDeploy"} type={"boolean"} required={true} deprecated={undefined}>
</Property>
<Property name={"dockerCleanup"} type={"boolean"} required={true} deprecated={undefined}>
</Property>
<Property name={"botToken"} type={"string"} required={true} deprecated={undefined}>
<span>Minimum length: `1`</span>
</Property>
<Property name={"chatId"} type={"string"} required={true} deprecated={undefined}>
<span>Minimum length: `1`</span>
</Property>
| Status code | Description |
| ----------- | ----------- |
| `200` | Successful response |
| `default` | Error response |
</APIInfo>
<APIExample>
<Requests items={["cURL","JavaScript"]}>
<Request value={"cURL"}>
```bash
curl -X POST "http://localhost:3000/api/notification.createTelegram" \
-d '{
"appBuildError": true,
"databaseBackup": true,
"dokployRestart": true,
"name": "string",
"appDeploy": true,
"dockerCleanup": true,
"botToken": "string",
"chatId": "string"
}'
```
</Request>
<Request value={"JavaScript"}>
```js
fetch("http://localhost:3000/api/notification.createTelegram", {
method: "POST"
});
```
</Request>
</Requests>
<Responses items={["default"]}>
<Response value={"default"}>
<ResponseTypes>
<ExampleResponse>
```json
{
"message": "string",
"code": "string",
"issues": [
{
"message": "string"
}
]
}
```
</ExampleResponse>
<TypeScriptResponse>
```ts
export interface Response {
message: string;
code: string;
issues?: {
message: string;
}[];
}
```
</TypeScriptResponse>
</ResponseTypes>
</Response>
</Responses>
</APIExample>
</API>
<API>
<APIInfo method={"POST"} route={"/notification.updateTelegram"}>
## notification-updateTelegram
### Authorization
<Property name={"Authorization"} type={"Bearer <token>"} required={true}>
In: `header`
</Property>
### Request Body
<Property name={"appBuildError"} type={"boolean"} required={false} deprecated={undefined}>
</Property>
<Property name={"databaseBackup"} type={"boolean"} required={false} deprecated={undefined}>
</Property>
<Property name={"dokployRestart"} type={"boolean"} required={false} deprecated={undefined}>
</Property>
<Property name={"name"} type={"string"} required={false} deprecated={undefined}>
</Property>
<Property name={"appDeploy"} type={"boolean"} required={false} deprecated={undefined}>
</Property>
<Property name={"dockerCleanup"} type={"boolean"} required={false} deprecated={undefined}>
</Property>
<Property name={"botToken"} type={"string"} required={false} deprecated={undefined}>
<span>Minimum length: `1`</span>
</Property>
<Property name={"chatId"} type={"string"} required={false} deprecated={undefined}>
<span>Minimum length: `1`</span>
</Property>
<Property name={"notificationId"} type={"string"} required={true} deprecated={undefined}>
<span>Minimum length: `1`</span>
</Property>
<Property name={"telegramId"} type={"string"} required={true} deprecated={undefined}>
<span>Minimum length: `1`</span>
</Property>
| Status code | Description |
| ----------- | ----------- |
| `200` | Successful response |
| `default` | Error response |
</APIInfo>
<APIExample>
<Requests items={["cURL","JavaScript"]}>
<Request value={"cURL"}>
```bash
curl -X POST "http://localhost:3000/api/notification.updateTelegram" \
-d '{
"appBuildError": true,
"databaseBackup": true,
"dokployRestart": true,
"name": "string",
"appDeploy": true,
"dockerCleanup": true,
"botToken": "string",
"chatId": "string",
"notificationId": "string",
"telegramId": "string"
}'
```
</Request>
<Request value={"JavaScript"}>
```js
fetch("http://localhost:3000/api/notification.updateTelegram", {
method: "POST"
});
```
</Request>
</Requests>
<Responses items={["default"]}>
<Response value={"default"}>
<ResponseTypes>
<ExampleResponse>
```json
{
"message": "string",
"code": "string",
"issues": [
{
"message": "string"
}
]
}
```
</ExampleResponse>
<TypeScriptResponse>
```ts
export interface Response {
message: string;
code: string;
issues?: {
message: string;
}[];
}
```
</TypeScriptResponse>
</ResponseTypes>
</Response>
</Responses>
</APIExample>
</API>
<API>
<APIInfo method={"POST"} route={"/notification.testTelegramConnection"}>
## notification-testTelegramConnection
### Authorization
<Property name={"Authorization"} type={"Bearer <token>"} required={true}>
In: `header`
</Property>
### Request Body
<Property name={"botToken"} type={"string"} required={true} deprecated={undefined}>
<span>Minimum length: `1`</span>
</Property>
<Property name={"chatId"} type={"string"} required={true} deprecated={undefined}>
<span>Minimum length: `1`</span>
</Property>
| Status code | Description |
| ----------- | ----------- |
| `200` | Successful response |
| `default` | Error response |
</APIInfo>
<APIExample>
<Requests items={["cURL","JavaScript"]}>
<Request value={"cURL"}>
```bash
curl -X POST "http://localhost:3000/api/notification.testTelegramConnection" \
-d '{
"botToken": "string",
"chatId": "string"
}'
```
</Request>
<Request value={"JavaScript"}>
```js
fetch("http://localhost:3000/api/notification.testTelegramConnection", {
method: "POST"
});
```
</Request>
</Requests>
<Responses items={["default"]}>
<Response value={"default"}>
<ResponseTypes>
<ExampleResponse>
```json
{
"message": "string",
"code": "string",
"issues": [
{
"message": "string"
}
]
}
```
</ExampleResponse>
<TypeScriptResponse>
```ts
export interface Response {
message: string;
code: string;
issues?: {
message: string;
}[];
}
```
</TypeScriptResponse>
</ResponseTypes>
</Response>
</Responses>
</APIExample>
</API>
<API>
<APIInfo method={"POST"} route={"/notification.createDiscord"}>
## notification-createDiscord
### Authorization
<Property name={"Authorization"} type={"Bearer <token>"} required={true}>
In: `header`
</Property>
### Request Body
<Property name={"appBuildError"} type={"boolean"} required={true} deprecated={undefined}>
</Property>
<Property name={"databaseBackup"} type={"boolean"} required={true} deprecated={undefined}>
</Property>
<Property name={"dokployRestart"} type={"boolean"} required={true} deprecated={undefined}>
</Property>
<Property name={"name"} type={"string"} required={true} deprecated={undefined}>
</Property>
<Property name={"appDeploy"} type={"boolean"} required={true} deprecated={undefined}>
</Property>
<Property name={"dockerCleanup"} type={"boolean"} required={true} deprecated={undefined}>
</Property>
<Property name={"webhookUrl"} type={"string"} required={true} deprecated={undefined}>
<span>Minimum length: `1`</span>
</Property>
| Status code | Description |
| ----------- | ----------- |
| `200` | Successful response |
| `default` | Error response |
</APIInfo>
<APIExample>
<Requests items={["cURL","JavaScript"]}>
<Request value={"cURL"}>
```bash
curl -X POST "http://localhost:3000/api/notification.createDiscord" \
-d '{
"appBuildError": true,
"databaseBackup": true,
"dokployRestart": true,
"name": "string",
"appDeploy": true,
"dockerCleanup": true,
"webhookUrl": "string"
}'
```
</Request>
<Request value={"JavaScript"}>
```js
fetch("http://localhost:3000/api/notification.createDiscord", {
method: "POST"
});
```
</Request>
</Requests>
<Responses items={["default"]}>
<Response value={"default"}>
<ResponseTypes>
<ExampleResponse>
```json
{
"message": "string",
"code": "string",
"issues": [
{
"message": "string"
}
]
}
```
</ExampleResponse>
<TypeScriptResponse>
```ts
export interface Response {
message: string;
code: string;
issues?: {
message: string;
}[];
}
```
</TypeScriptResponse>
</ResponseTypes>
</Response>
</Responses>
</APIExample>
</API>
<API>
<APIInfo method={"POST"} route={"/notification.updateDiscord"}>
## notification-updateDiscord
### Authorization
<Property name={"Authorization"} type={"Bearer <token>"} required={true}>
In: `header`
</Property>
### Request Body
<Property name={"appBuildError"} type={"boolean"} required={false} deprecated={undefined}>
</Property>
<Property name={"databaseBackup"} type={"boolean"} required={false} deprecated={undefined}>
</Property>
<Property name={"dokployRestart"} type={"boolean"} required={false} deprecated={undefined}>
</Property>
<Property name={"name"} type={"string"} required={false} deprecated={undefined}>
</Property>
<Property name={"appDeploy"} type={"boolean"} required={false} deprecated={undefined}>
</Property>
<Property name={"dockerCleanup"} type={"boolean"} required={false} deprecated={undefined}>
</Property>
<Property name={"webhookUrl"} type={"string"} required={false} deprecated={undefined}>
<span>Minimum length: `1`</span>
</Property>
<Property name={"notificationId"} type={"string"} required={true} deprecated={undefined}>
<span>Minimum length: `1`</span>
</Property>
<Property name={"discordId"} type={"string"} required={true} deprecated={undefined}>
<span>Minimum length: `1`</span>
</Property>
| Status code | Description |
| ----------- | ----------- |
| `200` | Successful response |
| `default` | Error response |
</APIInfo>
<APIExample>
<Requests items={["cURL","JavaScript"]}>
<Request value={"cURL"}>
```bash
curl -X POST "http://localhost:3000/api/notification.updateDiscord" \
-d '{
"appBuildError": true,
"databaseBackup": true,
"dokployRestart": true,
"name": "string",
"appDeploy": true,
"dockerCleanup": true,
"webhookUrl": "string",
"notificationId": "string",
"discordId": "string"
}'
```
</Request>
<Request value={"JavaScript"}>
```js
fetch("http://localhost:3000/api/notification.updateDiscord", {
method: "POST"
});
```
</Request>
</Requests>
<Responses items={["default"]}>
<Response value={"default"}>
<ResponseTypes>
<ExampleResponse>
```json
{
"message": "string",
"code": "string",
"issues": [
{
"message": "string"
}
]
}
```
</ExampleResponse>
<TypeScriptResponse>
```ts
export interface Response {
message: string;
code: string;
issues?: {
message: string;
}[];
}
```
</TypeScriptResponse>
</ResponseTypes>
</Response>
</Responses>
</APIExample>
</API>
<API>
<APIInfo method={"POST"} route={"/notification.testDiscordConnection"}>
## notification-testDiscordConnection
### Authorization
<Property name={"Authorization"} type={"Bearer <token>"} required={true}>
In: `header`
</Property>
### Request Body
<Property name={"webhookUrl"} type={"string"} required={true} deprecated={undefined}>
<span>Minimum length: `1`</span>
</Property>
| Status code | Description |
| ----------- | ----------- |
| `200` | Successful response |
| `default` | Error response |
</APIInfo>
<APIExample>
<Requests items={["cURL","JavaScript"]}>
<Request value={"cURL"}>
```bash
curl -X POST "http://localhost:3000/api/notification.testDiscordConnection" \
-d '{
"webhookUrl": "string"
}'
```
</Request>
<Request value={"JavaScript"}>
```js
fetch("http://localhost:3000/api/notification.testDiscordConnection", {
method: "POST"
});
```
</Request>
</Requests>
<Responses items={["default"]}>
<Response value={"default"}>
<ResponseTypes>
<ExampleResponse>
```json
{
"message": "string",
"code": "string",
"issues": [
{
"message": "string"
}
]
}
```
</ExampleResponse>
<TypeScriptResponse>
```ts
export interface Response {
message: string;
code: string;
issues?: {
message: string;
}[];
}
```
</TypeScriptResponse>
</ResponseTypes>
</Response>
</Responses>
</APIExample>
</API>
<API>
<APIInfo method={"POST"} route={"/notification.createEmail"}>
## notification-createEmail
### Authorization
<Property name={"Authorization"} type={"Bearer <token>"} required={true}>
In: `header`
</Property>
### Request Body
<Property name={"appBuildError"} type={"boolean"} required={true} deprecated={undefined}>
</Property>
<Property name={"databaseBackup"} type={"boolean"} required={true} deprecated={undefined}>
</Property>
<Property name={"dokployRestart"} type={"boolean"} required={true} deprecated={undefined}>
</Property>
<Property name={"name"} type={"string"} required={true} deprecated={undefined}>
</Property>
<Property name={"appDeploy"} type={"boolean"} required={true} deprecated={undefined}>
</Property>
<Property name={"dockerCleanup"} type={"boolean"} required={true} deprecated={undefined}>
</Property>
<Property name={"smtpServer"} type={"string"} required={true} deprecated={undefined}>
<span>Minimum length: `1`</span>
</Property>
<Property name={"smtpPort"} type={"number"} required={true} deprecated={undefined}>
<span>Minimum: `1`</span>
</Property>
<Property name={"username"} type={"string"} required={true} deprecated={undefined}>
<span>Minimum length: `1`</span>
</Property>
<Property name={"password"} type={"string"} required={true} deprecated={undefined}>
<span>Minimum length: `1`</span>
</Property>
<Property name={"fromAddress"} type={"string"} required={true} deprecated={undefined}>
<span>Minimum length: `1`</span>
</Property>
<Property name={"toAddresses"} type={"array<string>"} required={true} deprecated={undefined}>
</Property>
| Status code | Description |
| ----------- | ----------- |
| `200` | Successful response |
| `default` | Error response |
</APIInfo>
<APIExample>
<Requests items={["cURL","JavaScript"]}>
<Request value={"cURL"}>
```bash
curl -X POST "http://localhost:3000/api/notification.createEmail" \
-d '{
"appBuildError": true,
"databaseBackup": true,
"dokployRestart": true,
"name": "string",
"appDeploy": true,
"dockerCleanup": true,
"smtpServer": "string",
"smtpPort": 1,
"username": "string",
"password": "string",
"fromAddress": "string",
"toAddresses": [
"string"
]
}'
```
</Request>
<Request value={"JavaScript"}>
```js
fetch("http://localhost:3000/api/notification.createEmail", {
method: "POST"
});
```
</Request>
</Requests>
<Responses items={["default"]}>
<Response value={"default"}>
<ResponseTypes>
<ExampleResponse>
```json
{
"message": "string",
"code": "string",
"issues": [
{
"message": "string"
}
]
}
```
</ExampleResponse>
<TypeScriptResponse>
```ts
export interface Response {
message: string;
code: string;
issues?: {
message: string;
}[];
}
```
</TypeScriptResponse>
</ResponseTypes>
</Response>
</Responses>
</APIExample>
</API>
<API>
<APIInfo method={"POST"} route={"/notification.updateEmail"}>
## notification-updateEmail
### Authorization
<Property name={"Authorization"} type={"Bearer <token>"} required={true}>
In: `header`
</Property>
### Request Body
<Property name={"appBuildError"} type={"boolean"} required={false} deprecated={undefined}>
</Property>
<Property name={"databaseBackup"} type={"boolean"} required={false} deprecated={undefined}>
</Property>
<Property name={"dokployRestart"} type={"boolean"} required={false} deprecated={undefined}>
</Property>
<Property name={"name"} type={"string"} required={false} deprecated={undefined}>
</Property>
<Property name={"appDeploy"} type={"boolean"} required={false} deprecated={undefined}>
</Property>
<Property name={"dockerCleanup"} type={"boolean"} required={false} deprecated={undefined}>
</Property>
<Property name={"smtpServer"} type={"string"} required={false} deprecated={undefined}>
<span>Minimum length: `1`</span>
</Property>
<Property name={"smtpPort"} type={"number"} required={false} deprecated={undefined}>
<span>Minimum: `1`</span>
</Property>
<Property name={"username"} type={"string"} required={false} deprecated={undefined}>
<span>Minimum length: `1`</span>
</Property>
<Property name={"password"} type={"string"} required={false} deprecated={undefined}>
<span>Minimum length: `1`</span>
</Property>
<Property name={"fromAddress"} type={"string"} required={false} deprecated={undefined}>
<span>Minimum length: `1`</span>
</Property>
<Property name={"toAddresses"} type={"array<string>"} required={false} deprecated={undefined}>
</Property>
<Property name={"notificationId"} type={"string"} required={true} deprecated={undefined}>
<span>Minimum length: `1`</span>
</Property>
<Property name={"emailId"} type={"string"} required={true} deprecated={undefined}>
<span>Minimum length: `1`</span>
</Property>
| Status code | Description |
| ----------- | ----------- |
| `200` | Successful response |
| `default` | Error response |
</APIInfo>
<APIExample>
<Requests items={["cURL","JavaScript"]}>
<Request value={"cURL"}>
```bash
curl -X POST "http://localhost:3000/api/notification.updateEmail" \
-d '{
"appBuildError": true,
"databaseBackup": true,
"dokployRestart": true,
"name": "string",
"appDeploy": true,
"dockerCleanup": true,
"smtpServer": "string",
"smtpPort": 1,
"username": "string",
"password": "string",
"fromAddress": "string",
"toAddresses": [
"string"
],
"notificationId": "string",
"emailId": "string"
}'
```
</Request>
<Request value={"JavaScript"}>
```js
fetch("http://localhost:3000/api/notification.updateEmail", {
method: "POST"
});
```
</Request>
</Requests>
<Responses items={["default"]}>
<Response value={"default"}>
<ResponseTypes>
<ExampleResponse>
```json
{
"message": "string",
"code": "string",
"issues": [
{
"message": "string"
}
]
}
```
</ExampleResponse>
<TypeScriptResponse>
```ts
export interface Response {
message: string;
code: string;
issues?: {
message: string;
}[];
}
```
</TypeScriptResponse>
</ResponseTypes>
</Response>
</Responses>
</APIExample>
</API>
<API>
<APIInfo method={"POST"} route={"/notification.testEmailConnection"}>
## notification-testEmailConnection
### Authorization
<Property name={"Authorization"} type={"Bearer <token>"} required={true}>
In: `header`
</Property>
### Request Body
<Property name={"smtpServer"} type={"string"} required={true} deprecated={undefined}>
<span>Minimum length: `1`</span>
</Property>
<Property name={"smtpPort"} type={"number"} required={true} deprecated={undefined}>
<span>Minimum: `1`</span>
</Property>
<Property name={"username"} type={"string"} required={true} deprecated={undefined}>
<span>Minimum length: `1`</span>
</Property>
<Property name={"password"} type={"string"} required={true} deprecated={undefined}>
<span>Minimum length: `1`</span>
</Property>
<Property name={"toAddresses"} type={"array<string>"} required={true} deprecated={undefined}>
</Property>
<Property name={"fromAddress"} type={"string"} required={true} deprecated={undefined}>
<span>Minimum length: `1`</span>
</Property>
| Status code | Description |
| ----------- | ----------- |
| `200` | Successful response |
| `default` | Error response |
</APIInfo>
<APIExample>
<Requests items={["cURL","JavaScript"]}>
<Request value={"cURL"}>
```bash
curl -X POST "http://localhost:3000/api/notification.testEmailConnection" \
-d '{
"smtpServer": "string",
"smtpPort": 1,
"username": "string",
"password": "string",
"toAddresses": [
"string"
],
"fromAddress": "string"
}'
```
</Request>
<Request value={"JavaScript"}>
```js
fetch("http://localhost:3000/api/notification.testEmailConnection", {
method: "POST"
});
```
</Request>
</Requests>
<Responses items={["default"]}>
<Response value={"default"}>
<ResponseTypes>
<ExampleResponse>
```json
{
"message": "string",
"code": "string",
"issues": [
{
"message": "string"
}
]
}
```
</ExampleResponse>
<TypeScriptResponse>
```ts
export interface Response {
message: string;
code: string;
issues?: {
message: string;
}[];
}
```
</TypeScriptResponse>
</ResponseTypes>
</Response>
</Responses>
</APIExample>
</API>
<API>
<APIInfo method={"POST"} route={"/notification.remove"}>
## notification-remove
### Authorization
<Property name={"Authorization"} type={"Bearer <token>"} required={true}>
In: `header`
</Property>
### Request Body
<Property name={"notificationId"} type={"string"} required={true} deprecated={undefined}>
</Property>
| Status code | Description |
| ----------- | ----------- |
| `200` | Successful response |
| `default` | Error response |
</APIInfo>
<APIExample>
<Requests items={["cURL","JavaScript"]}>
<Request value={"cURL"}>
```bash
curl -X POST "http://localhost:3000/api/notification.remove" \
-d '{
"notificationId": "string"
}'
```
</Request>
<Request value={"JavaScript"}>
```js
fetch("http://localhost:3000/api/notification.remove", {
method: "POST"
});
```
</Request>
</Requests>
<Responses items={["default"]}>
<Response value={"default"}>
<ResponseTypes>
<ExampleResponse>
```json
{
"message": "string",
"code": "string",
"issues": [
{
"message": "string"
}
]
}
```
</ExampleResponse>
<TypeScriptResponse>
```ts
export interface Response {
message: string;
code: string;
issues?: {
message: string;
}[];
}
```
</TypeScriptResponse>
</ResponseTypes>
</Response>
</Responses>
</APIExample>
</API>
<API>
<APIInfo method={"GET"} route={"/notification.one"}>
## notification-one
### Authorization
<Property name={"Authorization"} type={"Bearer <token>"} required={true}>
In: `header`
</Property>
### Query Parameters
<Property name={"notificationId"} type={"string"} required={true} deprecated={false}>
</Property>
| Status code | Description |
| ----------- | ----------- |
| `200` | Successful response |
| `default` | Error response |
</APIInfo>
<APIExample>
<Requests items={["cURL","JavaScript"]}>
<Request value={"cURL"}>
```bash
curl -X GET "http://localhost:3000/api/notification.one?notificationId=string"
```
</Request>
<Request value={"JavaScript"}>
```js
fetch("http://localhost:3000/api/notification.one?notificationId=string", {
method: "GET"
});
```
</Request>
</Requests>
<Responses items={["default"]}>
<Response value={"default"}>
<ResponseTypes>
<ExampleResponse>
```json
{
"message": "string",
"code": "string",
"issues": [
{
"message": "string"
}
]
}
```
</ExampleResponse>
<TypeScriptResponse>
```ts
export interface Response {
message: string;
code: string;
issues?: {
message: string;
}[];
}
```
</TypeScriptResponse>
</ResponseTypes>
</Response>
</Responses>
</APIExample>
</API>
<API>
<APIInfo method={"GET"} route={"/notification.all"}>
## notification-all
### Authorization
<Property name={"Authorization"} type={"Bearer <token>"} required={true}>
In: `header`
</Property>
| Status code | Description |
| ----------- | ----------- |
| `200` | Successful response |
| `default` | Error response |
</APIInfo>
<APIExample>
<Requests items={["cURL","JavaScript"]}>
<Request value={"cURL"}>
```bash
curl -X GET "http://localhost:3000/api/notification.all"
```
</Request>
<Request value={"JavaScript"}>
```js
fetch("http://localhost:3000/api/notification.all", {
method: "GET"
});
```
</Request>
</Requests>
<Responses items={["default"]}>
<Response value={"default"}>
<ResponseTypes>
<ExampleResponse>
```json
{
"message": "string",
"code": "string",
"issues": [
{
"message": "string"
}
]
}
```
</ExampleResponse>
<TypeScriptResponse>
```ts
export interface Response {
message: string;
code: string;
issues?: {
message: string;
}[];
}
```
</TypeScriptResponse>
</ResponseTypes>
</Response>
</Responses>
</APIExample>
</API>
</Root>