To control how long a message is kept in the Message Inbox using a duration (e.g., 7 days) instead of a fixed expiration date, you can use the inbox_days parameter in your /createMessage API request.
This parameter specifies the number of days the message will be available in the inbox, starting from the time it is sent. After this period, the message will be automatically deleted.
The maximum value for inbox_days is 30.
Note: The inbox_days parameter should be used as an alternative to the inbox_date parameter, which sets a specific expiration date.
Example API Request
Here is an example of how to use inbox_days within the notifications object of your API request payload. In this case, the message will be stored in the inbox for 7 days.
{
"request": {
"application": "YOUR_APP_CODE",
"auth": "YOUR_API_TOKEN",
"notifications": [
{
"send_date": "now",
"content": "Your message content",
"inbox_days": 7
}
]
}
}
Comments
0 comments
Please sign in to leave a comment.