Middle
What fields should a record in the SMS notification service contain?
sobes.tech AI
Answer from AI
The notification service record for SMS usually should contain the following fields:
- id — unique notification identifier.
- phone_number — recipient's phone number in international format.
- message — text of the SMS message.
- status — current sending status (e.g., "pending", "sent", "failed").
- created_at — date and time the record was created.
- sent_at — date and time the message was sent (if sent).
- retry_count — number of sending attempts.
- priority — message priority (optional).
Example record in JSON:
{
"id": "12345",
"phone_number": "+79161234567",
"message": "Your confirmation code: 1234",
"status": "pending",
"created_at": "2024-06-01T12:00:00Z",
"sent_at": null,
"retry_count": 0
}