Endpoint
Description
Submits a notification request to the API Gateway. The gateway validates the request, queues it in RabbitMQ, and returns a confirmation with a notification ID for tracking.Authentication
This endpoint requires authentication. Include valid credentials in your request headers.Request Body
Type of notification to send.Allowed values:
email, pushUser ID in UUID format.Example:
123e4567-e89b-12d3-a456-426614174000Validation: Must be a valid UUID v4 formatTemplate code to use for the notification. The template must exist in the Template Service.Example:
welcome_email, password_resetVariables to populate in the template. Structure depends on the template being used.
Unique request ID for idempotency. Use this to prevent duplicate notifications.Example:
req-123e4567-e89b-12d3-a456-426614174000Priority level for the notification. Higher numbers indicate higher priority.Range: 1-5Default: 1Example:
1Additional metadata for the notification request. Can contain any JSON-serializable data.Example:
{"title": "Welcome!"}Response
Indicates whether the request was successful
Response data object
Human-readable message describing the resultExample:
Notification queued successfullyError Responses
Returned when the request payload is invalid or missing required fields.Example scenarios:
- Invalid UUID format for
user_id - Missing required fields
- Invalid
notification_typevalue - Priority outside 1-5 range
Returned when authentication credentials are missing or invalid.
Returned when an unexpected error occurs on the server.Example scenarios:
- RabbitMQ connection failure
- Database connectivity issues
Example Request
Example Response
200 Success
400 Bad Request
401 Unauthorized
Notes
- The
request_idfield enables idempotency - sending the samerequest_idmultiple times will not create duplicate notifications - Notifications are queued asynchronously in RabbitMQ (
email.queueorpush.queuebased onnotification_type) - The gateway validates user existence and template availability before queuing
- Status updates can be tracked using the returned
notification_id