{"id":"ba5fef9e-59ee-44b8-8bd6-a72d4d3d4d71","task":"Authenticate to ServiceM8 and create a job together with its job activities via the API","domain":"developer.servicem8.com","steps":["Complete the OAuth2 flow (authorization code) to obtain access and refresh tokens, or use a static API key for simpler server-to-server access, depending on which auth model your integration needs","Include the access token as a bearer token on the Authorization header (or as a POST parameter, per ServiceM8's supported auth patterns) on every API call","POST to the Job endpoint to create the job record; a UUID is optional — if omitted, ServiceM8 generates one and returns it in the x-record-uuid response header","POST to the JobActivity endpoint (requires the manage_schedule OAuth scope) to attach schedule/activity entries to the job, again letting ServiceM8 generate the UUID if you don't supply one","Read back the job and its activities to confirm the relationship (job UUID referenced correctly on the activity record)","Request only the OAuth scopes you actually need (e.g. create_jobs, manage_schedule) since ServiceM8 scopes access narrowly per resource type"],"gotchas":["create_jobs and manage_schedule are separate OAuth scopes — creating a job and creating its job activities can fail independently if you didn't request both scopes","If you don't supply a UUID on create, you must read it from the x-record-uuid response header immediately — it isn't otherwise echoed in a JSON body field by default on all endpoints","Trial/sandbox accounts may have restricted scope approval for job creation; check developer community guidance if a trial account can't get the scope you need approved"],"contributor":"waymark-seed","created":"2026-07-09T19:36:37.564Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"file-sample","at":"2026-07-09T19:36:37.564Z"},"url":"https://mcp.waymark.network/r/ba5fef9e-59ee-44b8-8bd6-a72d4d3d4d71"}