Skip to content

API Integration

Access your MyCompanyDesk data programmatically through the REST API.

INFO

API access requires the Business plan.

Overview

The MyCompanyDesk API lets you:

  • Create and retrieve invoices, expenses, and customers
  • Automate billing workflows
  • Integrate with other business tools
  • Build custom reporting
  • Sync data with external systems

Authentication

All API requests require an API key sent in the request header:

Authorization: Bearer YOUR_API_KEY

Creating an API key

  1. Go to Settings > API Keys
  2. Click Generate New Key
  3. Give the key a descriptive name
  4. Copy the key — it's only shown once

WARNING

Store your API key securely. Never commit it to source control or share it publicly.

Base URL

All API endpoints are available at:

https://api.mycompanydesk.com/api

Key endpoints

Customers

MethodEndpointDescription
GET/customersList all customers
POST/customersCreate a customer
GET/customers/:idGet a customer
PUT/customers/:idUpdate a customer
DELETE/customers/:idDelete a customer

Invoices

MethodEndpointDescription
GET/invoicesList all invoices
POST/invoicesCreate an invoice
GET/invoices/:idGet an invoice
PUT/invoices/:idUpdate an invoice
DELETE/invoices/:idDelete an invoice
POST/invoices/:id/sendSend an invoice
POST/invoices/:id/mark-paidMark as paid

Expenses

MethodEndpointDescription
GET/expensesList all expenses
POST/expensesCreate an expense
GET/expenses/:idGet an expense
PUT/expenses/:idUpdate an expense
DELETE/expenses/:idDelete an expense

Projects

MethodEndpointDescription
GET/projectsList all projects
POST/projectsCreate a project
GET/projects/:idGet a project
PUT/projects/:idUpdate a project
MethodEndpointDescription
GET/search?q=term&type=entitySearch across entities

Filtering

List endpoints support query parameters for filtering:

GET /api/invoices?status=sent&customer_id=123&limit=50

Common filters:

  • status — Filter by status
  • customer_id — Filter by customer
  • project_id — Filter by project
  • limit — Number of results (default: 50)
  • offset — Pagination offset

Rate limiting

API requests are rate-limited to ensure fair usage:

  • Standard rate limit applies per API key
  • Exceeding the limit returns a 429 Too Many Requests response
  • Include a retry strategy in your integration

Error handling

The API returns standard HTTP status codes:

CodeDescription
200Success
201Created
400Bad request (check your parameters)
401Unauthorized (invalid API key)
403Forbidden (insufficient permissions)
404Not found
429Rate limited
500Server error

Error responses include a JSON body:

json
{
  "error": "Description of what went wrong"
}

Webhooks

Configure webhooks to receive real-time notifications when events occur:

  • Invoice sent
  • Invoice paid
  • Customer created
  • Expense added

Set up webhooks in Settings > API Keys > Webhooks.

Tips

  • Use pagination for large datasets
  • Cache responses where appropriate to reduce API calls
  • Implement retry logic with exponential backoff for rate limits
  • Use webhooks instead of polling for real-time updates

MyCompanyDesk — Accounting made simple.