Closepact API · v1

Build on Closepact

One REST API for the deals, documents, bookings and invoices your team runs in Closepact. Connect your CRM, ERP, webshop or bookkeeping to the same data, with the same permissions, as the panel.

Base URLhttps://api.closepact.com/v1/api

Quickstart

Your first request in three steps

  1. Create an API key

    In the panel, open Settings → API keys (Inställningar → API-nycklar) and create a key. Give it a name you will recognise later, and only the scopes it needs: read for a report, write for a sync.

    The secret is shown once. Store it where your code reads secrets — never in the browser or a mobile app.

    Open API keys
    Keep the key in an environment variable
    # In .env or your secrets manager
    export CLOSEPACT_API_KEY="cp_live_…"
  2. Call GET /me

    It returns the key, the organization it belongs to, the member it acts as, and the modules the organization holds. If this works, authentication works — and the response tells you what the key can reach.

    A 401 means the key is wrong or revoked; a 403 with ip_not_allowed means your organization has an IP allowlist. See Authentication.

    curl 'https://api.closepact.com/v1/api/me' \
      -H "Authorization: Bearer $CLOSEPACT_API_KEY"
    Response · 200
    {
      "data": {
        "api_key": {
          "id": "01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40",
          "name": "CRM sync",
          "prefix": "cp_live_Hx3p",
          "scopes": [
            "read",
            "write"
          ],
          "rate_limit_per_minute": 120,
          "expires_at": null
        },
        "organization": {
          "id": "01a14eb3-c5f0-7c55-8c2e-6a0e1f7b9d21",
          "name": "Nordisk Fastighetsservice AB"
        },
        "acting_as": {
          "id": "01a14eb3-c634-7238-bc76-18b09b287f98",
          "name": "Anna Lindqvist",
          "email": "anna@nordiskfastighet.se"
        },
        "modules": [
          {
            "key": "proposals",
            "tier": "pro",
            "status": "active",
            "writable": true
          },
          {
            "key": "booking",
            "tier": "grow",
            "status": "trialing",
            "writable": true
          }
        ]
      }
    }

Use cases

What you can build

Keep your CRM in step

Create deals and contacts from the CRM your team already lives in, move them through stages, and get a webhook when a deal is won.

DealsContacts

Quotes and e-signing from your own system

Build quotes from your product catalogue, send documents for signature, and hear back the moment the last signer is done.

QuotesDocumentsSignatures

Bookings from your webshop or booking form

Create customers and work orders, assign employees and services, and set up recurring jobs without anyone retyping them.

Work ordersEmployeesRecurrences

Time into payroll

Read time entries into payroll or project accounting instead of exporting spreadsheets at the end of the month.

Time entries

Invoices into bookkeeping

Create invoices from your own orders, keep articles in step with your ERP, and read invoice status back.

InvoicesArticles

One customer register

All three modules share one customer register. Keep it in sync with your ERP or CRM in both directions.

Customers

Guides

How the API behaves

Reference

Every endpoint, by area

All endpoints →