Hi Yuval,
The solution to this depends on the capabilities of the middleware used for the API infrastructure.
If this middleware supports storage of messages, it can respond with 202 Accepted to indicate that the message is stored but not yet transmitted to the server application.
The stored messages can then be played to the server when it comes back online.
Best Regards
------------------------------
Koen Peeters
OryxGateway
------------------------------