Is there anyway to access the read only endpoint for sms / emails so that our ai. can handle the phone call and understand real time. Eg. it has access to booking times etc and notes at the moment but we had a client call asking where the tech is. the tech had already sms’d that they were late and then more recently that they were on the way. The client obviously hasn’t seen them and has called to ask where he is. If we had access to the read only endpoint our ai could have let them know rather than resulting in fallback for someone from the office to give them a call? Would be handy for the ai to have that history as well and jump into a call having all the info it needs?
Hi Jason,
For read-only access to message content via API, the REST API currently exposes the ServiceM8 Inbox via the Inbox Message endpoints (GET /inboxmessage.json to list, and GET /inboxmessage/{uuid}.json to fetch a specific message).
Those endpoints use the read_inbox permission and Inbox messages include a message_type of email or sms along with the message body (message_text / message_html).
If you also need to send updates from your integration, the Messaging API provides POST /platform_service_sms and POST /platform_service_email, and regardingJobUUID links the sent message to a job so it appears in that job’s Diary.
The Messaging API is only available to Public Applications and requires OAuth 2.0 (access token) to use.
On the customer-reply side, Two-Way SMS replies are added to the relevant job Diary (and replies for Completed + Paid jobs are also copied into your ServiceM8 Inbox), and Two-Way Email replies are also added to the job diary.
If the “tech is late / on the way” SMS you’re referring to are present as Inbox messages in your account, your AI can pull them via the /inboxmessage endpoints and use the timestamps/message text as call context.
Once you’ve confirmed whether those outgoing SMS are appearing in your ServiceM8 Inbox, reply here and we’ll point you to the best endpoint and scopes for your setup.
Thanks,
Cody
@Cody My inbox only shows one year reminders, asset scans etc. I can’t seem to access emails or sms through that enpoint?
Hi Jason,
What you’re seeing is consistent with how the Inbox API works: GET /inboxmessage.json only returns items that actually exist in the ServiceM8 Inbox, and those Inbox items can be things like reminders, asset scans, and automations (as well as email/SMS).
Two-Way SMS messages sent from a job are saved to the job’s Diary.
Two-Way SMS only gets copied into the Inbox in specific cases, for example when a customer replies after a job is paid and completed.
Similarly, for Two-Way Email, customer replies are added to the job diary.
If your goal is for your AI to reliably read “tech is late/on the way” updates via API today, a practical workaround is to log those updates as a Note (Notes are available via GET /note.json).
Reply here letting us know whether those status texts were sent using the ServiceM8 job card SMS button (Two-Way SMS) or outside of ServiceM8.
Thanks,
Cody
Hey Cody,
They were sent through the two way sms. Tech hits “navigate to job” and notify client. But not just that we have it scan jobs from “today” to provide an update on where everything is at but because we have no context to give it from emails / sms it can’t give an accurate update. Client could have been emailed or job could have been followed up by sms but we are blind to that as it doesn’t have access to them. Is there anyway to get the email and sms endpoint?
Hi Jason,
For reading message content via API, the documented read endpoints are the Inbox Message endpoints: GET /api_1.0/inboxmessage.json (list) and GET /api_1.0/inboxmessage/{uuid}.json (detail), using the read_inbox scope.
Those Inbox Message records include message_text / message_html and a message_type that can be sms or email (among other types).
If you want this in near real time, you can subscribe to the inbox.message_received event webhook (New message received in inbox).
Where it gets tricky is Two-Way SMS and Two-Way Email, because the conversation history is stored against the job.
Two-Way SMS keeps all messages about a specific job in one organised thread and automatically saves them to the job’s Diary, and when a client replies their message is added to the Diary of the relevant job.
ServiceM8 will also copy replies for paid, completed jobs into the ServiceM8 Inbox.
For Two-Way Email, when customers reply to emails sent from ServiceM8, their replies will automatically be added to the job diary.
If your AI needs guaranteed access to the exact “running late / on the way” wording via API, you’ll generally need to capture an API-readable copy at the time you send it, for example:
- Send the update from your integration via the Messaging API (Public Applications only, OAuth 2.0), using
regardingJobUUIDso the message appears in the job diary. - Write a copy of each update into a Job Note (POST
/note.json), which you can read back later (GET/note.json) and subscribe to in real time using webhooks (for example,job.note_added).
For “where is the tech right now?” calls, you can also pull the staff member’s last GPS fix (lat/lng + geo_timestamp) and whether they’re currently navigating to a job (navigating_to_job_uuid + navigating_timestamp).
Reply here with whether your integration is a Private Application (API Key) or a Public Application (OAuth 2.0), and we’ll suggest the cleanest pattern for your setup.
Thanks,
Cody
Hi Cody I have OAuth 2.0
Hi Jason,
Because you’re using OAuth 2.0, you can use the ServiceM8 Messaging API (it’s only available to Public Applications and requires an OAuth 2.0 access token).
For reading message content via API, the documented read endpoints are the Inbox Message endpoints (GET /api_1.0/inboxmessage.json and GET /api_1.0/inboxmessage/{uuid}.json) and they require the read_inbox scope. Those Inbox Message records include message_text / message_html, and message_type can be sms or email (among other types).
Where this differs from what you’re describing is Two-Way SMS and Two-Way Email: Two-Way SMS automatically saves messages to the job’s Diary, and customer replies are added to the Diary of the relevant job. ServiceM8 only copies Two-Way SMS replies into the Inbox in specific cases, for example replies received for paid, completed jobs are copied to your ServiceM8 Inbox. Similarly, with Two-Way Email, when customers reply to emails sent from ServiceM8, their replies are automatically added to the job diary.
If your goal is “AI can always see what we last told the customer”, the most reliable approach is to store an API-readable copy at send time, for example:
- Send your outbound SMS/Email via the Messaging API (POST /platform_service_sms or POST /platform_service_email) and include regardingJobUUID so the message is linked to the job (and appears in the job diary).
- Also write the same text into a Job Note using POST /api_1.0/note.json, then read it back later via GET /api_1.0/note.json.
- If you want near real-time updates, you can subscribe to webhook events like inbox.message_received and job.note_added.
If you share whether you need this visibility for historical Two-Way SMS already sent from the job card, or just going forward, reply here and we’ll point you to the cleanest setup and scopes.
Thanks,
Cody
Hey Cody,
Yes historical. We work out of Service M8. Idea is the ai can gather context of exactly where the job is at. Unscheduled LIst then offers the recommendations with actions. But without historical sms and email it isn’t able to offer correct recommendations sometimes. Eg. Sms was sent to tenant to call and book que. It pops out into unscheduled it would offer a recommendation “Hey want me to sms client again as they haven’t responded”. Yes - Done. But we can’t currently do that.
Hi Jason,
Today, the only documented read API for message bodies is the Inbox Message endpoints (GET /api_1.0/inboxmessage.json and GET /api_1.0/inboxmessage/{uuid}.json).
Those Inbox Message records include message_text / message_html, and message_type can be sms or email (among other Inbox item types).
Two-Way SMS keeps all messages for a job in a single thread and automatically saves them to the job’s Diary, and Two-Way Email also stores customer replies in the job diary.
At the moment we don’t have a supported, job-scoped REST API method to read that historical Job Diary SMS/Email thread content back via API. The main exception is that replies received for paid, completed jobs are copied into the ServiceM8 Inbox (as well as the job diary), so those specific replies can then appear via the Inbox Message API.
If the key goal is “AI never sends a duplicate follow-up”, the reliable pattern going forward is to store an API-readable copy at send time, for example:
- Send outbound messages via the Messaging API (POST
/platform_service_sms/ POST/platform_service_email) and includeregardingJobUUIDto link the message to the job diary. - Also write the same outbound text into a Note (POST
/api_1.0/note.json) so you can read it later (GET/api_1.0/note.json). - For near real-time triggers, use webhooks like
job.note_addedandinbox.message_received.
If Job Diary read access for historical Two-Way SMS/Email would unblock your workflow, email support@servicem8.com with a link to this thread so we can log it as a feature request.
Thanks,
Cody