Posting an Add-on item to a Job Diary

OAuth Add-ons can publish an attributed, immutable plaintext item to a Job Diary without receiving access to other Diary items.

OAuth Add-ons can publish a plaintext update to a Job Diary using the publish_diary_items scope. API keys cannot use this endpoint.

This capability is create-only. It does not allow your Add-on to list or retrieve Diary items—including items it created—and created items cannot be edited or deleted through the API.

Request permission

Include publish_diary_items in the scopes requested by your OAuth authorization flow:

publish_diary_items

The account user must approve this scope before your Add-on can post an item.

Post the Diary item

Send the Job UUID and the plaintext content to POST /api_1.0/diary.json:

curl --request POST 'https://api.servicem8.com/api_1.0/diary.json' \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "job_uuid": "8936d9f2-7bcc-4fc3-b83a-d18987fcf30b",
    "content": "Supplier confirmed delivery for Friday"
  }'
FieldRequiredDescription
job_uuidYesUUID of the Job whose Diary receives the item.
contentYesNon-blank plaintext content, up to 1000 characters. Markup is displayed literally.

No other fields are accepted. ServiceM8 supplies the timestamp, staff attribution, item type, and authenticated Add-on identity.

Response

A successful request returns HTTP 201:

{
  "created": true,
  "uuid": "60000000-0000-4000-8000-000000000001"
}

The returned UUID confirms which item was created. It does not grant read, update, or delete access to that item.

⚠️

Each successful POST creates a new Diary item. Retrying the same request creates another item, so only retry when you know the original request did not succeed.


Did this page help you?