API to send sms locally

I am working on SMS workflow to update 4 ANCs to 8 ANCs, and I have many test scenarios to test on. Unlike Mobile Apps, it’s difficult to test without sending test messages. Currently for testing purpose, I am using /admin/#/sms/test link to test sending messages. It’d be really easy if I could do so with an API. I saw some SMS API endpoint documents here, but that didn’t mention how to deal with the local development environment. Is there any endpoint documented or undocumented I can try on local development environment.

Hi @yuv

The /admin/#/sms/test page uses the /api/v2/records endpoint (API to interact with CHT Applications | Community Health Toolkit) which is probably more suitable for local testing than /api/sms (which requires some additional fields).

1 Like

Thanks @diana , this particular example demonstrated perfectly how to create reports from sms except one problem.

The problem is reported_date is being set to now even if I provide reported_date value per specification.

Update on this:

For sms, we should use sent_timestamp property instead of reported_date. This has been updated in the documentation as well.

1 Like