Set up smsyra JSON

Our own JSON endpoint, for code you write yourself. smsyra answers exactly as smsyra JSON would, keeps the text in your inbox, checks it against your DLT templates — and sends nothing.

What to change

smsyra URL for smsyra JSON
https://api.shriradhatechnologies.com/v1/messages
Method
POST
Your key goes in
Authorization: Bearer smy_…
  1. POST JSON to the URL above with Authorization: Bearer and your smsyra key.
  2. templateId is optional: without one, smsyra finds the matching template by the text.
  3. Send an Idempotency-Key header to make a retry safe: the same key answers the same result.

Need a key? Create a free workspace and make one on its API keys page — it starts with smy_.

Send a test text

curl -X POST "https://api.shriradhatechnologies.com/v1/messages" \
  -H "Authorization: Bearer smy_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: signup-otp-42" \
  -d '{"to":"+919876543210","from":"ACMEOT","text":"482913 is your ACME login code. It is valid for 10 minutes.","templateId":"1007123456789012345"}'

What smsyra answers

The same status and body smsyra JSON gives when it takes a text (HTTP 201), so your code carries on as it would in production:

{"requestId":"0193…","messages":[{"id":"0193…","to":"+919876543210","status":"accepted","parts":1,"chars":59,"encoding":"GSM7","dlt":{"status":"MATCHED","templateId":"1007123456789012345","issues":[]},"otp":"482913"}]}

The text itself shows up in your inbox the moment it arrives, with the DLT result: Matched, Mismatched (with the first character that differs), or No template.

Test the failures

Each API key has a failure mode, so you can test your retries and error handling without breaking anything. More about failure modes.

Whensmsyra answers
A key that is unknown or revokedYour provider's authentication error. Nothing is kept.HTTP 401
{"error":{"code":"UNAUTHORIZED","message":"Invalid API key."}}
Failure mode: Provider errorThe provider's own error. The text is kept as “Simulated error”.HTTP 502
{"error":{"code":"PROVIDER_ERROR","message":"Simulated provider error (this key's failure mode)."}}
Failure mode: Provider downA 503, as if the provider were down. The text is kept as “Simulated outage”.HTTP 503
{"error":{"code":"UNAVAILABLE","message":"Service unavailable. Please try again later."}}
Failure mode: SlowWaits as long as you set (up to 30 seconds), then answers normally.The normal answer (HTTP 201), after the wait.
Strict DLT on, and the text doesn't matchRefused the way the provider refuses a DLT failure. The text is kept as “Refused (strict DLT)”.HTTP 422
{"error":{"code":"DLT_REJECTED","message":"The text doesn't match its DLT template (strict mode is on)."}}

Read the OTP in your tests

Ask for the newest code sent to a number. The call waits up to 30 seconds for the text to arrive, so a test never sleeps and polls. It takes your key as Authorization: Bearer smy_…, whichever provider sent the text. The OTP API in full.

curl -G "https://api.shriradhatechnologies.com/v1/otp/latest" \
  -H "Authorization: Bearer smy_YOUR_KEY" \
  --data-urlencode "to=9876543210" \
  --data-urlencode "wait=25"

It answers HTTP 200 with the code, or 404 NO_MESSAGE after the wait:

{"messageId":"0193…","to":"+919876543210","from":"ACMEOT","body":"482913 is your ACME login code. It is valid for 10 minutes.","code":"482913","codeMethod":"template","candidates":["482913"],"receivedAt":"2026-11-15T10:20:30Z","templateId":"1007123456789012345","dlt":{"status":"MATCHED"}}

Other providers

AmazeSMS · MSG91 (Flow v5) · Fast2SMS · Twilio · Exotel