The Notificator API is a service designed to send notifications via various channels such as email and Slack. It provides endpoints to handle notification requests and ensures a consistent response format.
- Send email notifications to single or multiple recipients.
- Send Slack notifications using webhook URLs.
- Supports plain text, HTML, and Markdown formats for messages.
- Provides clear and structured API responses.
The API is documented using the OpenAPI 3.0 specification. The documentation can be found in the file:
/api/oas-notification.yaml
- Description: Sends an email notification.
- Request Body:
to
: Single email address or an array of email addresses.subject
: Subject of the email.text
: Plain text content of the email.html
: HTML content of the email (supports Markdown ifisMarkdown
istrue
).isMarkdown
: Boolean indicating if thehtml
content is in Markdown format.
- Responses:
200
: Email notification sent successfully.400
: Bad request (e.g., invalid email address).
- Description: Sends a Slack notification.
- Request Body:
slackWebhookUrl
: The Slack webhook URL.message
: The content of the Slack message (supports Markdown).
- Responses:
200
: Slack notification sent successfully.400
: Bad request (e.g., invalid webhook URL).
- Node.js (for running the server, if applicable).
- A tool to test APIs (e.g., Postman or cURL).
-
Clone the repository.
-
Navigate to the project directory.
-
Install the dependencies using:
npm install
-
Copy the example environment file and configure API keys:
cp .env.example .env
Update the
.env
file with the required API keys and configuration. -
Start the server using nodemon with:
npm run dev
-
Access the API docs at
http://localhost:5900/api-docs
.
All responses follow a consistent structure:
{
"success": true,
"message": "Operation result message"
}
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Commit your changes and push them to your fork.
- Submit a pull request.
This project is licensed under the MIT License. See the LICENSE
file for details.
Created for Governify organization by Manuel Otero Barbasán (motero2k).