This endpoint allows you to send a new Notification depending on the type of communication channel you want to send (SMS, Email, Push ,Rcs, WhatsApp).The channel parameter allows us to differentiate the type of communication channel between SMS, Email, Rcs, WhatsApp or Push notification. That's why only this endpoint is used for the send of Notification because the channel help us to send each type of communication channel.
NOTE
The total number of API Calls (requests) that the user can make to the POST /notification endpoint in a certain time has been limited. That is, in case the user exceeds the limit of requests (messages sent) that can be made in a specific time, he/she will not be able to send another request until the established time is up. Once the time has elapsed, the request counter is reset and the request can be sent to the endpoint again.
In this example, the user can send 2 requests in 300 seconds (5 minutes). When a third request is sent within the 5 minute range, the
HTTP Status Code “429”
will be generated and the following parameter will be displayed from the Response body:"errors": { "reason": Too Many Requests" }
. This code tells you that the user has sent too many requests in a given amount of time. Once the required time has elapsed, the request counter is reset to 2, so the user will be able to send two requests again in 5 minutes.To find out if the user exceeds the limit of required requests and the time he/she needs to wait to send the next request, we recommend consulting the Response Header (additional information about the body of the resource). The parameters presented in the response header are the following:
ratelimit-limit: 2
ratelimit-policy: 2;w= 300
ratelimit-remaining: 1
ratelimit-reset: 5m0s
- RateLimit-Limit: return the number of requests left for the client in the time window
- RateLimit-Remaining: return the remaining quota in the current window
- RateLimit-Reset: return the time remaining in the current window, specified in seconds
- RateLimit-Policy: return the quota policy. The quota policy expression can be found in paragraph 2.1 of the IETF draft. The format is, for example, for 2 requests in 300 seconds.