API-created Notes don't (immediately) appear in Job Diary

We’re creating job notes from a headless backend integration using:

POST /api_1.0/note.json

Authentication is via API key. The notes are being created successfully and the data looks correct. We’ve verified this with:

GET /api_1.0/note.json?$filter=related_object_uuid eq '{job_uuid}'

The returned notes have the expected values:

  • active = 1

  • related_object = job

  • correct related_object_uuid

  • correct create_date / edit_date

The issue is that notes created this way don’t show up in the Job Diary for a client that already has that job open or previously loaded. On a stale client the notes do not necessarily appear on their own — we waited 20+ minutes with no change. They appear only via a fresh load, or a UI-originated Diary change.

If the job is already loaded in a client, the API-created note does not appear after:

  • passive / pull refresh

  • closing and reopening the job

  • navigating away and back

  • hard refresh with Shift-F5

  • closing and reopening the app window

This happens in both the web and desktop apps, even after waiting several minutes.

However, if the same job is opened for the first time in a fresh client — meaning an app instance that has not already loaded that job — the note appears immediately.

Also, on the stale client, if a user manually adds or deletes any note in that job’s Diary, all of the pending API-created notes appear at once.

Our interpretation is that the note data itself is fine, and this appears to be a client-side sync issue. A client that already has the job loaded does not seem to re-sync notes created through the API. A fresh load pulls them correctly, and a UI-originated Diary change appears to trigger the missing sync. So this looks less like a server-side feed cache issue and more like the client’s local replica/sync layer not receiving an event for API-created notes.

Is there a supported way for a note created through:

POST /api_1.0/note.json

to propagate to the Job Diary of a client that already has the job loaded?

For example, is there an event that the client normally subscribes to that API-created notes do not currently emit, or is there a job-level signal we can send from the backend to force the job Diary to re-sync?

We know that client.refreshJobDetails() works from an add-on iframe, but this integration is running headlessly on the backend, with no iframe or SDK context. We’re looking for the supported server-side equivalent for API-created notes.

Hi Chad,

That level of detail is really helpful.

We’ve identified an issue affecting some API key authenticated requests where the note is created successfully, but the follow-up diary refresh can be routed through the wrong API region.

This means the note can exist immediately (and be returned by the API), but the Job Diary view may keep showing stale diary data until another diary action or cache refresh causes it to reload.

There’s no issue with your note payload.

From the API side, POST /api_1.0/note.json doesn’t expose any extra parameters that would let you trigger a diary refresh at create time (it documents no query/path parameters, only the note record in the request body).

We’re working on a fix to ensure API-key requests are routed using the correct account region, and to make the Job Diary refresh correctly after API-created notes.

Thanks,
Cody

Hi Chad,

This should now be resolved. API-created notes should now appear in the Job Diary for jobs that are already open or previously loaded, without needing a manual diary action or fresh load.

Please let us know if you’re still seeing stale diary data after creating notes via the API.

Thanks,
ServiceM8 Team

I noticed an improvement before I seen this post, thought I was just getting lucky!

I’ll keep an eye on it though, thank you for the follow up

-Chad

We recently had the same problem, we found the fix for us was: The issue was regional routing. ServiceM8’s API seems to be split across regional servers, and the real-time diary push notification only fired if the API request come from the same region as your account.

We were calling the API from a cloud hosting provider with servers in the US. The note was being saved correctly (it would appear after a manual diary entry forced a refresh), but the live push notification never reached our client because it was being processed on the wrong regional server.

Make sure API calls come from a server in the same region as your SM8 account, for us that meant pinning our cloud functions to a UK region. Once we did that, notes appeared instantly every time.

Posting from localhost (in the UK) always worked fine. Same code, same API key: the only difference was where the HTTP request originated.

Posting just incase this helps anyone else