Getting Started with Zuper GraphQL API (Beta)
The Zuper GraphQL API (ZuperQL) lets you read and write Zuper data with GraphQL. Use it alongside the REST API, with the same API key.
Beta: The GraphQL API is in beta. Types, fields and limits may change before it becomes generally available. Changes will be announced in the changelog.
With GraphQL, a single request can:
- Return only the fields you ask for, so responses stay small.
- Pull in related records, such as a job with its customer, property, estimates and invoices, without extra calls.
- Filter, sort and paginate lists.
- Run several queries at once, for example today's jobs, pending estimates and unpaid invoices for a dashboard.
The GraphQL API covers these modules:
| Module | Queries | Mutations |
|---|---|---|
| Jobs | job, jobs | createJob, updateJob, updateJobStatus, updateJobSchedule, updateJobAssignment, deleteJob |
| Customers | customer, customers | createCustomer, updateCustomer, deleteCustomer |
| Organizations | organization, organizations | createOrganization, updateOrganization, deleteOrganization |
| Properties | property, properties | createProperty, updateProperty, deleteProperty |
| Estimates | estimate, estimates | createEstimate, updateEstimate, deleteEstimate |
| Invoices | invoice, invoices | createInvoice, updateInvoice, deleteInvoice |
| Current user | viewer | — |
Note: All API requests should be sent only through HTTPS.
Endpoint
All GraphQL requests go to a single endpoint on your account's Base API URL:
POST {dc_api_url}/api/zuperql
For example, if your Base API URL is https://us-west-1c.zuperpro.com, the endpoint is https://us-west-1c.zuperpro.com/api/zuperql.
Your Base API URL depends on the data center that hosts your account. To find it, see What is my Base API URL?.
Authentication
The GraphQL API uses the same API keys as the REST API. Send your key in the x-api-key header. To create a key, see Generating API Key.
| Header | Value |
|---|---|
x-api-key | Your API key |
Content-Type | application/json |
Your account and user come from the API key. You never pass a company or account ID in a query, and you can only read or change your own account's data.
Note: A key created as Read-only can run queries but not mutations. A mutation sent with a read-only key fails with the error code
FORBIDDEN.
Request format
Every request is an HTTP POST with a JSON body:
| Property | Required | Description |
|---|---|---|
query | Yes | The GraphQL query or mutation |
variables | No | A JSON object with the values for the variables declared in query |
operationName | No | The operation to run, when query contains more than one named operation |
Always pass values through variables rather than writing them into the query string. Your queries stay reusable, and you don't have to escape quotes.
Make your first request
The viewer query returns the user that your API key belongs to. It's a quick way to check your key and endpoint.
curl --request POST 'https://us-west-1c.zuperpro.com/api/zuperql' \
--header 'x-api-key: <your-api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"query": "query Viewer { viewer { id first_name last_name email designation } }",
"variables": {}
}'{
"data": {
"viewer": {
"id": "c4a1f5e0-6f2b-11ee-9a6e-3d1b0c8e2f11",
"first_name": "Jane",
"last_name": "Cooper",
"email": "[email protected]",
"designation": "Operations Manager"
}
},
"extensions": {
"cost": { "requested": 6, "available": 5994, "max_query_cost": 2000 }
}
}Next, fetch the five most recently created jobs with their customer:
query RecentJobs($first: Int) {
jobs(first: $first, sort: { field: CREATED_AT, direction: DESC }) {
nodes {
id
work_order_number
job_title
current_status { status_name }
customer { customer_full_name customer_email }
}
page_info { has_next_page end_cursor }
}
}{ "first": 5 }curl --request POST 'https://us-west-1c.zuperpro.com/api/zuperql' \
--header 'x-api-key: <your-api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"query": "query RecentJobs($first: Int) { jobs(first: $first, sort: { field: CREATED_AT, direction: DESC }) { nodes { id work_order_number job_title current_status { status_name } customer { customer_full_name customer_email } } page_info { has_next_page end_cursor } } }",
"variables": { "first": 5 }
}'Note: The examples in these guides show the GraphQL operation and its
variablesseparately. To send any of them, put the operation inqueryand the variables invariables, as shown above. In a terminal, keep the single quotes around--data-rawso the shell doesn't expand GraphQL variables such as$first.
Conventions
- Field names use
snake_caseand match the field names in the REST API, for examplejob_titleandcustomer_email. idis the record's UID (job_uid,customer_uidand so on), the same UID used by the REST API.- References in filters and inputs end in
_uid, for examplecustomer_uidandcategory_uid. - Dates and times (
DateTime) are UTC, ISO 8601 combined date-time strings, for example2026-11-20T04:30:00Z. A date without a time, such as2026-11-20, is rejected. - Date-only fields (
estimate_date,expiry_date,invoice_date,due_date): send the date at noon UTC, for example2026-11-20T12:00:00Z. Zuper applies your account's time zone to these fields, so a midnight UTC value can show up as the previous day for accounts west of UTC. - Deleted records are excluded from lookups and lists.
- Custom fields include a
hiddenflag that follows the visibility rules in your account. It'struefor fields hidden from field executives when your API key belongs to a field executive, and for fields your access role has no access to. The value is still returned, so hide these fields in your own app.
Exploring the schema
The endpoint supports standard GraphQL introspection. Point a GraphQL client such as Postman, Insomnia or a code generator at the endpoint with your x-api-key header, and it loads the full schema, including every type, field, argument and enum value.
Next steps
- Core Concepts: field selection, related records, filters, sorting, pagination and mutations.
- Query Cost, Limits and Errors: how requests are rate limited, and what errors look like.
- Module guides: Jobs, Customers, Organizations, Properties, Estimates, Invoices.
Updated about 21 hours ago
