Customer API · v1

Your data, in your own systems

A REST API over the things your agency actually runs on — clients, projects, tasks, time, invoices and reports. JSON in, JSON out, one key per integration, and a scope list that says exactly what each key may touch.

Included from the Agency plan upwards, and switched off until you turn it on in Settings → API. Nothing is exposed by default.

Getting started

  1. 1 Turn the API on in Settings → API.
  2. 2 Create a key, choosing only the scopes that integration needs. The key is shown once — store it somewhere safe.
  3. 3 Call GET /me to check it works.
curl https://app.marquecrm.com/api/public/v1/me \
  -H "Authorization: Bearer mq_live_your_key_here"

Base URL: https://app.marquecrm.com/api/public/v1. Every request needs the Authorization header; an X-Api-Key header is accepted too, for clients that cannot set the first.

Scopes

A key holds a list of scopes, each of them a resource and a level. The level follows the HTTP method: reading needs :read, anything that changes data needs :write. A key that is missing a scope gets a 403 saying which one.

Resource Scopes Covers
Clients & contacts clients:read@if(! \App\Support\ApiScopes::isReadOnly($resource))
clients:write@endif
Client records, their contacts, and tags.
Projects projects:read@if(! \App\Support\ApiScopes::isReadOnly($resource))
projects:write@endif
Projects, milestones and templates.
Tasks tasks:read@if(! \App\Support\ApiScopes::isReadOnly($resource))
tasks:write@endif
Tasks on a project, including status and assignment.
Time time:read@if(! \App\Support\ApiScopes::isReadOnly($resource))
time:write@endif
Time entries logged against clients and projects.
Invoices & quotes invoices:read@if(! \App\Support\ApiScopes::isReadOnly($resource))
invoices:write@endif
Invoices, their lines and payments, plus quotes.
Expenses expenses:read@if(! \App\Support\ApiScopes::isReadOnly($resource))
expenses:write@endif
Billable and non-billable costs.
Support tickets tickets:read@if(! \App\Support\ApiScopes::isReadOnly($resource))
tickets:write@endif
Tickets and their replies.
Sites sites:read@if(! \App\Support\ApiScopes::isReadOnly($resource))
sites:write@endif
Websites you look after, and their uptime and plugin state.
Reports reports:read@if(! \App\Support\ApiScopes::isReadOnly($resource))
reports:write@endif
Read-only aggregates: revenue, utilisation, profitability.

Endpoints

Read straight off the running application, so this list is what the API serves today.

Clients & contacts

GET /api/public/v1/clients clients:read
POST /api/public/v1/clients clients:write
GET /api/public/v1/clients/{client} clients:read
PUT, PATCH /api/public/v1/clients/{client} clients:write
DELETE /api/public/v1/clients/{client} clients:write
GET /api/public/v1/external-contacts clients:read
POST /api/public/v1/external-contacts clients:write
GET /api/public/v1/external-contacts/{external_contact} clients:read
PUT, PATCH /api/public/v1/external-contacts/{external_contact} clients:write
DELETE /api/public/v1/external-contacts/{external_contact} clients:write
GET /api/public/v1/tags clients:read
POST /api/public/v1/tags clients:write
PUT, PATCH /api/public/v1/tags/{tag} clients:write
DELETE /api/public/v1/tags/{tag} clients:write

Projects

GET /api/public/v1/projects projects:read
POST /api/public/v1/projects projects:write
GET /api/public/v1/projects/{project} projects:read
PUT, PATCH /api/public/v1/projects/{project} projects:write
DELETE /api/public/v1/projects/{project} projects:write
GET /api/public/v1/projects/{project}/milestones projects:read
POST /api/public/v1/projects/{project}/milestones projects:write
PATCH /api/public/v1/projects/{project}/milestones/{milestone} projects:write
DELETE /api/public/v1/projects/{project}/milestones/{milestone} projects:write

Tasks

GET /api/public/v1/tasks tasks:read
POST /api/public/v1/tasks tasks:write
GET /api/public/v1/tasks/{task} tasks:read
PUT, PATCH /api/public/v1/tasks/{task} tasks:write
DELETE /api/public/v1/tasks/{task} tasks:write

Time

GET /api/public/v1/time-entries time:read
POST /api/public/v1/time-entries time:write
GET /api/public/v1/time-entries/{entry} time:read
PUT, PATCH /api/public/v1/time-entries/{entry} time:write
DELETE /api/public/v1/time-entries/{entry} time:write

Invoices & quotes

POST /api/public/v1/invoices/{invoice}/lines invoices:write
DELETE /api/public/v1/invoices/{invoice}/lines/{line} invoices:write
GET /api/public/v1/invoices invoices:read
POST /api/public/v1/invoices invoices:write
GET /api/public/v1/invoices/{invoice} invoices:read
PUT, PATCH /api/public/v1/invoices/{invoice} invoices:write
DELETE /api/public/v1/invoices/{invoice} invoices:write
POST /api/public/v1/invoices/{invoice}/credit-notes invoices:write
GET /api/public/v1/credit-notes invoices:read
GET /api/public/v1/credit-notes/{credit_note} invoices:read
POST /api/public/v1/quotes/{quote}/lines invoices:write
DELETE /api/public/v1/quotes/{quote}/lines/{line} invoices:write
GET /api/public/v1/quotes invoices:read
POST /api/public/v1/quotes invoices:write
GET /api/public/v1/quotes/{quote} invoices:read
PUT, PATCH /api/public/v1/quotes/{quote} invoices:write
DELETE /api/public/v1/quotes/{quote} invoices:write

Expenses

GET /api/public/v1/expenses expenses:read
POST /api/public/v1/expenses expenses:write
GET /api/public/v1/expenses/{expense} expenses:read
PUT, PATCH /api/public/v1/expenses/{expense} expenses:write
DELETE /api/public/v1/expenses/{expense} expenses:write

Support tickets

GET /api/public/v1/tickets/{ticket}/replies tickets:read
POST /api/public/v1/tickets/{ticket}/replies tickets:write
GET /api/public/v1/tickets tickets:read
POST /api/public/v1/tickets tickets:write
GET /api/public/v1/tickets/{ticket} tickets:read
PUT, PATCH /api/public/v1/tickets/{ticket} tickets:write
DELETE /api/public/v1/tickets/{ticket} tickets:write

Sites

GET /api/public/v1/sites sites:read
POST /api/public/v1/sites sites:write
GET /api/public/v1/sites/{site} sites:read
PUT, PATCH /api/public/v1/sites/{site} sites:write
DELETE /api/public/v1/sites/{site} sites:write

Reports

GET /api/public/v1/reports/overview reports:read
GET /api/public/v1/reports/revenue-by-client reports:read
GET /api/public/v1/reports/revenue-by-month reports:read
GET /api/public/v1/reports/utilisation reports:read
GET /api/public/v1/reports/project-profitability reports:read

No scope required

GET /api/public/v1/me any key

Conventions

Pagination
List endpoints return 25 records at a time. Use ?page= and ?per_page= (maximum 100). The response carries meta and links.
Rate limits
Per key, per minute, at your plan's ceiling. Every response carries X-RateLimit-Limit and X-RateLimit-Remaining; going over gets a 429 with Retry-After.
Errors
Always JSON, always with a message that says what to do about it. 401 the key is wrong, revoked or expired · 402 the plan does not include the API · 403 the API is switched off or the key lacks the scope · 404 no such record in your account · 422 validation, with errors per field · 429 too fast.
Your data only
A key can only ever see its own agency's records. There is no cross-account identifier to pass and no way to widen the scope of a key from the outside.
Versioning
The version is in the path. Fields get added to responses; existing fields do not change meaning or disappear inside a version.