authType: 'oauth_2' when providing an OAuth access token. Custom-field deletion requires OAuth and is not available with private API keys.
List operations accept $filter and cursor; start paginating with cursor: '-1', then use the nextCursor returned by each page. Create operations return the API result and recordUuid from the x-record-uuid response header. Notes use /note.json for list/create and /dbonote/{uuid}.json for individual operations as documented by ServiceM8.
Webhook subscriptions, inbound callbacks, and additional resources outside these 28 operations are excluded. A 429 for the per-minute limit is retried up to 3 times; the daily limit and other errors are not retried. Creating jobs can incur ServiceM8 account charges, so jobs.create is marked destructive.
ServiceM8’s authentication guide lists manage_templates but the document-template endpoint reference specifies read_templates; its OAuth security scheme lists both. Confirm the permissions granted to your application if template reads fail.
The default OAuth connection requests every scope the operations need, including read_forms, read_job_payments and manage_job_payments. Assets and forms need their add-ons activated on the ServiceM8 account; otherwise ServiceM8 answers 400 “requires addon activation”.
What you get:
- 28 typed API operations
Setup
1
Install
2
Add the plugin
corsair.ts
multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.3
Choose authentication
- API Key (Recommended)
- OAuth 2.0
Store the ServiceM8 API key before the first call: More: API Key
pnpm corsair setup --plugin=servicem8 --tenant=acme api_key=<your-key> (leave out --tenant without multiTenancy), or pass it as key in the plugin options. With Hub, each tenant enters their own key on the connect page. See API key auth.4
Connect a tenant
Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see Connect / OAuth.
Example API calls
jobs.list
notes.create
What’s next
API reference
Every
servicem8.api.* operation with input and output types.Connect / OAuth
createLink, Hub delivery, and tenant connect flows.
Use with agents
Expose this plugin’s operations as MCP tools.