Deals

The opportunities in your pipeline: what is being sold, to whom, for how much, and how far it has come. A deal moves through stages (draft → contract_signed) while it is open, and is closed by marking it won or lost.

List deals

GET/deals

Returns the organization's deals as a cursor-paginated list, newest first unless you ask for another order.

Filters combine with AND. To match several values of one filter, repeat it with brackets: filter[stage][]=sent&filter[stage][]=opened. q searches the title, case-insensitively and with å, ä and ö folded correctly.

Page through with cursor: pass meta.next_cursor from the previous page until it is null. links.next is the same request with the cursor filled in, filters included.

curl 'https://api.closepact.com/v1/api/deals' \
  -H "Authorization: Bearer $CLOSEPACT_API_KEY"
Response · 200
{
  "data": [
    {
      "id": "01a15c2e-4b7a-7f3e-9c1d-2e8f6a0b4c71",
      "title": "Hemstäd RUT – Henrik Ny",
      "value_cents": 320000,
      "currency": "SEK",
      "stage": "sent",
      "status": "open",
      "expected_close_date": "2026-11-30",
      "closed_at": null,
      "lost_reason": null,
      "owner": {
        "id": "01a14eb3-c634-7238-bc76-18b09b287f98",
        "name": "Anna Lindqvist",
        "email": "anna@nordiskfastighet.se",
        "avatar_url": null
      },
      "account": {
        "id": "01a15b90-2d44-7c1a-8e5f-9b3c7d2e1a08",
        "name": "Henrik Ny",
        "domain": null
      },
      "custom_fields": {
        "crm_id": "HS-1042"
      },
      "created_at": "2026-10-12T08:14:03+00:00",
      "updated_at": "2026-10-14T13:02:47+00:00"
    }
  ],
  "links": {
    "first": null,
    "last": null,
    "prev": null,
    "next": "https://api.closepact.com/v1/api/deals?filter%5Bstage%5D=sent&cursor=eyJjcmVhdGVkX2F0IjoiMjAyNi0xMC0xMiIsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0"
  },
  "meta": {
    "path": "https://api.closepact.com/v1/api/deals",
    "per_page": 25,
    "next_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNi0xMC0xMiIsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0",
    "prev_cursor": null
  }
}

Query parameters

  • filter[stage]string

    Only deals at this stage.

    One ofdraftready_to_sendsentopenedengagedin_negotiationproposal_approvedcontract_sentcontract_signed

  • filter[status]string

    Only deals with this status.

    One ofopenwonlostarchived

  • filter[owner_id]string(uuid)

    Only deals owned by this member.

  • filter[account_id]string(uuid)

    Only deals for this customer.

  • qstring

    Text the deal title contains.

    Example RUT

  • sortstring

    Comma-separated sort fields, each optionally prefixed with - for descending: created_at, updated_at, expected_close_date, value_cents, title, stage. Unknown fields are ignored. stage sorts by the stage key alphabetically, not by pipeline order. Deals without an expected close date sort as though dated 9999-12-31, so they come last in ascending order.

    Default -created_atExample -value_cents,title

  • limitinteger

    Items per page. Values outside 1–100 are clamped.

    Default 251–100

  • cursorstring

    Opaque cursor from meta.next_cursor or meta.prev_cursor of the previous page.

Responses

  • Headers

    • X-RateLimit-Limit — Requests this key may make per minute.
    • X-RateLimit-Remaining — Requests left in the current minute.
    • dataarray of objectsrequired
      • idstring(uuid)required
      • titlestringrequired
      • value_centsintegerrequired

        The deal's value in the currency's minor unit (öre for SEK): 320000 is 3 200 kr.

        ≥ 0

      • currencystringrequired

        ISO 4217 code, upper case.

        exactly 3 charactersExample "SEK"

      • stagestringrequired

        Where an open deal stands, in pipeline order: draft, ready_to_send, sent, opened, engaged, in_negotiation, proposal_approved, contract_sent, contract_signed.

        One ofdraftready_to_sendsentopenedengagedin_negotiationproposal_approvedcontract_sentcontract_signed

      • statusstringrequired

        open while being worked; won or lost once closed; archived when put away in the panel.

        One ofopenwonlostarchived

      • expected_close_datestring(date)nullablerequired
      • closed_atstring(date-time)nullablerequired

        When the deal was marked won or lost.

      • lost_reasonstringnullablerequired
      • ownerobjectrequired

        A member of the organization, as shown on records they own or created.

      • accountobjectnullablerequired

        The customer the deal is with, if any.

      • custom_fieldsobject | array of valuesnullablerequired

        Free-form values your organization keeps on the deal — a good place for your own system's id. An empty set comes back as [].

        at most 0 items

      • created_atstring(date-time)required
      • updated_atstring(date-time)required
    • linksobjectrequired
    • metaobjectrequired
  • 401No key, or the key is invalid, revoked or expired, or its creator no longer has access.
    Errors
  • 402The organization has not bought the module this endpoint belongs to, or it has lapsed to read-only, or its tier does not include what the operation needs: feature names the capability (the operation's x-feature) and required_tier the cheapest tier that grants it. Every operation answers this with "feature": "core.api" when no module the organization holds is on a tier that includes the API.
    Errors
  • 403The key lacks the scope, or the member it acts as lacks the permission or holds no seat in the module (module_seat_required — an administrator assigns seats under Settings → Users), or the organization is suspended.
    Errors
  • 429The key has made more requests this minute than its limit allows.
    Errors

Create a deal

POST/deals

Creates an open deal at the stage you give. The deal is owned by owner_id, or by the member the key acts as when you leave it out, and the creation is recorded in the deal's history under that member.

Fires the deal.created webhook, and is pushed to the organization's connected CRM if there is one.

Not idempotent: sending the same request twice creates two deals. Store the returned id (or keep your own id in custom_fields) before retrying a request whose answer you did not receive.

curl -X POST 'https://api.closepact.com/v1/api/deals' \
  -H "Authorization: Bearer $CLOSEPACT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "title": "Hemstäd RUT – Henrik Ny",
  "value_cents": 320000,
  "currency": "SEK",
  "stage": "draft",
  "account_id": "01a15b90-2d44-7c1a-8e5f-9b3c7d2e1a08",
  "expected_close_date": "2026-11-30",
  "custom_fields": {
    "crm_id": "HS-1042"
  }
}'
Response · 201
{
  "data": {
    "id": "01a15c2e-4b7a-7f3e-9c1d-2e8f6a0b4c71",
    "title": "Hemstäd RUT – Henrik Ny",
    "value_cents": 320000,
    "currency": "SEK",
    "stage": "draft",
    "status": "open",
    "expected_close_date": "2026-11-30",
    "closed_at": null,
    "lost_reason": null,
    "owner": {
      "id": "01a14eb3-c634-7238-bc76-18b09b287f98",
      "name": "Anna Lindqvist",
      "email": "anna@nordiskfastighet.se",
      "avatar_url": null
    },
    "account": {
      "id": "01a15b90-2d44-7c1a-8e5f-9b3c7d2e1a08",
      "name": "Henrik Ny",
      "domain": null
    },
    "custom_fields": {
      "crm_id": "HS-1042"
    },
    "created_at": "2026-10-12T08:14:03+00:00",
    "updated_at": "2026-10-12T08:14:03+00:00"
  }
}

Request body

application/json · required

  • titlestringrequired

    1–255 characters

  • value_centsintegerrequired

    In the currency's minor unit (öre for SEK).

    ≥ 0

  • currencystringrequired

    ISO 4217 code. Stored upper case.

    exactly 3 characters

  • stagestringrequired

    Where an open deal stands, in pipeline order: draft, ready_to_send, sent, opened, engaged, in_negotiation, proposal_approved, contract_sent, contract_signed.

    One ofdraftready_to_sendsentopenedengagedin_negotiationproposal_approvedcontract_sentcontract_signed

  • account_idstring(uuid)nullable

    A customer in this organization.

  • owner_idstring(uuid)nullable

    An active member of this organization. Defaults to the member the key acts as.

  • expected_close_datestring(date)nullable
  • custom_fieldsobjectnullable

Responses

  • Headers

    • X-RateLimit-Limit — Requests this key may make per minute.
    • X-RateLimit-Remaining — Requests left in the current minute.
    • dataobjectrequired
      • idstring(uuid)required
      • titlestringrequired
      • value_centsintegerrequired

        The deal's value in the currency's minor unit (öre for SEK): 320000 is 3 200 kr.

        ≥ 0

      • currencystringrequired

        ISO 4217 code, upper case.

        exactly 3 charactersExample "SEK"

      • stagestringrequired

        Where an open deal stands, in pipeline order: draft, ready_to_send, sent, opened, engaged, in_negotiation, proposal_approved, contract_sent, contract_signed.

        One ofdraftready_to_sendsentopenedengagedin_negotiationproposal_approvedcontract_sentcontract_signed

      • statusstringrequired

        open while being worked; won or lost once closed; archived when put away in the panel.

        One ofopenwonlostarchived

      • expected_close_datestring(date)nullablerequired
      • closed_atstring(date-time)nullablerequired

        When the deal was marked won or lost.

      • lost_reasonstringnullablerequired
      • ownerobjectrequired

        A member of the organization, as shown on records they own or created.

      • accountobjectnullablerequired

        The customer the deal is with, if any.

      • custom_fieldsobject | array of valuesnullablerequired

        Free-form values your organization keeps on the deal — a good place for your own system's id. An empty set comes back as [].

        at most 0 items

      • created_atstring(date-time)required
      • updated_atstring(date-time)required
  • 401No key, or the key is invalid, revoked or expired, or its creator no longer has access.
    Errors
  • 402The organization has not bought the module this endpoint belongs to, or it has lapsed to read-only, or its tier does not include what the operation needs: feature names the capability (the operation's x-feature) and required_tier the cheapest tier that grants it. Every operation answers this with "feature": "core.api" when no module the organization holds is on a tier that includes the API.
    Errors
  • 403The key lacks the scope, or the member it acts as lacks the permission or holds no seat in the module (module_seat_required — an administrator assigns seats under Settings → Users), or the organization is suspended.
    Errors
  • 422The request body or query failed validation.
    Errors
  • 429The key has made more requests this minute than its limit allows.
    Errors

Retrieve a deal

GET/deals/{deal}

Returns one deal with its owner and customer. A deal that was deleted, or that belongs to another organization, is a 404.

curl 'https://api.closepact.com/v1/api/deals/01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40' \
  -H "Authorization: Bearer $CLOSEPACT_API_KEY"
Response · 200
{
  "data": {
    "id": "01a15c2e-4b7a-7f3e-9c1d-2e8f6a0b4c71",
    "title": "Hemstäd RUT – Henrik Ny",
    "value_cents": 320000,
    "currency": "SEK",
    "stage": "engaged",
    "status": "open",
    "expected_close_date": "2026-11-30",
    "closed_at": null,
    "lost_reason": null,
    "owner": {
      "id": "01a14eb3-c634-7238-bc76-18b09b287f98",
      "name": "Anna Lindqvist",
      "email": "anna@nordiskfastighet.se",
      "avatar_url": null
    },
    "account": null,
    "custom_fields": null,
    "created_at": "2026-10-12T08:14:03+00:00",
    "updated_at": "2026-10-15T09:41:10+00:00"
  }
}

Path parameters

  • dealstring(uuid)required

    The deal's id.

Responses

  • Headers

    • X-RateLimit-Limit — Requests this key may make per minute.
    • X-RateLimit-Remaining — Requests left in the current minute.
    • dataobjectrequired
      • idstring(uuid)required
      • titlestringrequired
      • value_centsintegerrequired

        The deal's value in the currency's minor unit (öre for SEK): 320000 is 3 200 kr.

        ≥ 0

      • currencystringrequired

        ISO 4217 code, upper case.

        exactly 3 charactersExample "SEK"

      • stagestringrequired

        Where an open deal stands, in pipeline order: draft, ready_to_send, sent, opened, engaged, in_negotiation, proposal_approved, contract_sent, contract_signed.

        One ofdraftready_to_sendsentopenedengagedin_negotiationproposal_approvedcontract_sentcontract_signed

      • statusstringrequired

        open while being worked; won or lost once closed; archived when put away in the panel.

        One ofopenwonlostarchived

      • expected_close_datestring(date)nullablerequired
      • closed_atstring(date-time)nullablerequired

        When the deal was marked won or lost.

      • lost_reasonstringnullablerequired
      • ownerobjectrequired

        A member of the organization, as shown on records they own or created.

      • accountobjectnullablerequired

        The customer the deal is with, if any.

      • custom_fieldsobject | array of valuesnullablerequired

        Free-form values your organization keeps on the deal — a good place for your own system's id. An empty set comes back as [].

        at most 0 items

      • created_atstring(date-time)required
      • updated_atstring(date-time)required
  • 401No key, or the key is invalid, revoked or expired, or its creator no longer has access.
    Errors
  • 402The organization has not bought the module this endpoint belongs to, or it has lapsed to read-only, or its tier does not include what the operation needs: feature names the capability (the operation's x-feature) and required_tier the cheapest tier that grants it. Every operation answers this with "feature": "core.api" when no module the organization holds is on a tier that includes the API.
    Errors
  • 403The key lacks the scope, or the member it acts as lacks the permission or holds no seat in the module (module_seat_required — an administrator assigns seats under Settings → Users), or the organization is suspended.
    Errors
  • 404No such record in this organization.
    Errors
  • 429The key has made more requests this minute than its limit allows.
    Errors

Update a deal

PATCH/deals/{deal}
Scope write Module Proposals & e-signing Any permission of deals.update.any,deals.update.owned

Changes the fields you send and leaves the rest alone. Every field that actually changed is recorded in the deal's history, with its old and new value, under the member the key acts as.

Stage and status are not changed here: use Move a deal to a stage, Mark a deal won and Mark a deal lost. Fields this endpoint does not know are ignored.

A member who holds deals.update.owned but not deals.update.any may update only the deals they own; anyone else's is a 403 forbidden. custom_fields is replaced as a whole, not merged.

curl -X PATCH 'https://api.closepact.com/v1/api/deals/01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40' \
  -H "Authorization: Bearer $CLOSEPACT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "value_cents": 450000,
  "expected_close_date": "2026-12-15"
}'
Response · 200
{
  "data": {
    "id": "01a15c2e-4b7a-7f3e-9c1d-2e8f6a0b4c71",
    "title": "Hemstäd RUT – Henrik Ny",
    "value_cents": 450000,
    "currency": "SEK",
    "stage": "engaged",
    "status": "open",
    "expected_close_date": "2026-12-15",
    "closed_at": null,
    "lost_reason": null,
    "owner": {
      "id": "01a14eb3-c634-7238-bc76-18b09b287f98",
      "name": "Anna Lindqvist",
      "email": "anna@nordiskfastighet.se",
      "avatar_url": null
    },
    "account": {
      "id": "01a15b90-2d44-7c1a-8e5f-9b3c7d2e1a08",
      "name": "Henrik Ny",
      "domain": null
    },
    "custom_fields": {
      "crm_id": "HS-1042"
    },
    "created_at": "2026-10-12T08:14:03+00:00",
    "updated_at": "2026-10-16T10:05:22+00:00"
  }
}

Path parameters

  • dealstring(uuid)required

    The deal's id.

Request body

application/json · required

  • titlestring

    1–255 characters

  • value_centsinteger

    ≥ 0

  • currencystring

    ISO 4217 code. Send it upper case: unlike on create, it is stored as sent.

    exactly 3 characters

  • account_idstring(uuid)nullable

    A customer in this organization, or null to detach it.

  • owner_idstring(uuid)

    An active member of this organization.

  • expected_close_datestring(date)nullable
  • custom_fieldsobjectnullable

    Replaces the whole object.

Responses

  • Headers

    • X-RateLimit-Limit — Requests this key may make per minute.
    • X-RateLimit-Remaining — Requests left in the current minute.
    • dataobjectrequired
      • idstring(uuid)required
      • titlestringrequired
      • value_centsintegerrequired

        The deal's value in the currency's minor unit (öre for SEK): 320000 is 3 200 kr.

        ≥ 0

      • currencystringrequired

        ISO 4217 code, upper case.

        exactly 3 charactersExample "SEK"

      • stagestringrequired

        Where an open deal stands, in pipeline order: draft, ready_to_send, sent, opened, engaged, in_negotiation, proposal_approved, contract_sent, contract_signed.

        One ofdraftready_to_sendsentopenedengagedin_negotiationproposal_approvedcontract_sentcontract_signed

      • statusstringrequired

        open while being worked; won or lost once closed; archived when put away in the panel.

        One ofopenwonlostarchived

      • expected_close_datestring(date)nullablerequired
      • closed_atstring(date-time)nullablerequired

        When the deal was marked won or lost.

      • lost_reasonstringnullablerequired
      • ownerobjectrequired

        A member of the organization, as shown on records they own or created.

      • accountobjectnullablerequired

        The customer the deal is with, if any.

      • custom_fieldsobject | array of valuesnullablerequired

        Free-form values your organization keeps on the deal — a good place for your own system's id. An empty set comes back as [].

        at most 0 items

      • created_atstring(date-time)required
      • updated_atstring(date-time)required
  • 401No key, or the key is invalid, revoked or expired, or its creator no longer has access.
    Errors
  • 402The organization has not bought the module this endpoint belongs to, or it has lapsed to read-only, or its tier does not include what the operation needs: feature names the capability (the operation's x-feature) and required_tier the cheapest tier that grants it. Every operation answers this with "feature": "core.api" when no module the organization holds is on a tier that includes the API.
    Errors
  • 403The key lacks the scope, or the member it acts as lacks the permission or holds no seat in the module (module_seat_required — an administrator assigns seats under Settings → Users), or the organization is suspended.
    Errors
  • 404No such record in this organization.
    Errors
  • 422The request body or query failed validation.
    Errors
  • 429The key has made more requests this minute than its limit allows.
    Errors

Delete a deal

DELETE/deals/{deal}
Scope write Module Proposals & e-signing Any permission of deals.delete.any,deals.delete.owned

Deletes the deal. It disappears from lists and lookups at once (a later request for it is a 404); rooms, quotes and proposals linked to it are kept and keep their deal_id.

A member who holds deals.delete.owned but not deals.delete.any may delete only the deals they own. No webhook fires.

curl -X DELETE 'https://api.closepact.com/v1/api/deals/01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40' \
  -H "Authorization: Bearer $CLOSEPACT_API_KEY"
Response · 200
{
  "deleted": true
}

Path parameters

  • dealstring(uuid)required

    The deal's id.

Responses

  • Confirmation that the record was deleted.

    • deletedbooleanrequired

      One oftrue

  • 401No key, or the key is invalid, revoked or expired, or its creator no longer has access.
    Errors
  • 402The organization has not bought the module this endpoint belongs to, or it has lapsed to read-only, or its tier does not include what the operation needs: feature names the capability (the operation's x-feature) and required_tier the cheapest tier that grants it. Every operation answers this with "feature": "core.api" when no module the organization holds is on a tier that includes the API.
    Errors
  • 403The key lacks the scope, or the member it acts as lacks the permission or holds no seat in the module (module_seat_required — an administrator assigns seats under Settings → Users), or the organization is suspended.
    Errors
  • 404No such record in this organization.
    Errors
  • 429The key has made more requests this minute than its limit allows.
    Errors

Move a deal to a stage

POST/deals/{deal}/stage
Scope write Module Proposals & e-signing Any permission of deals.update.any,deals.update.owned

Moves the deal to another pipeline stage. Stages may be skipped and moved backwards; the stage is independent of the deal's status, so this works on open and closed deals alike.

When the stage actually changes, the move is recorded in the deal's history with your reason, the deal.stage_changed webhook fires (with from_stage, to_stage and reason), and the change is pushed to a connected CRM. The first move to sent or any later stage also stamps the moment the deal was sent, which cycle-time reporting counts from.

Idempotent: moving a deal to the stage it is already at changes nothing, records nothing and fires nothing.

curl -X POST 'https://api.closepact.com/v1/api/deals/01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40/stage' \
  -H "Authorization: Bearer $CLOSEPACT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "stage": "in_negotiation",
  "reason": "Kunden vill ha veckovis städning i stället"
}'
Response · 200
{
  "data": {
    "id": "01a15c2e-4b7a-7f3e-9c1d-2e8f6a0b4c71",
    "title": "Hemstäd RUT – Henrik Ny",
    "value_cents": 320000,
    "currency": "SEK",
    "stage": "in_negotiation",
    "status": "open",
    "expected_close_date": "2026-11-30",
    "closed_at": null,
    "lost_reason": null,
    "owner": {
      "id": "01a14eb3-c634-7238-bc76-18b09b287f98",
      "name": "Anna Lindqvist",
      "email": "anna@nordiskfastighet.se",
      "avatar_url": null
    },
    "account": null,
    "custom_fields": null,
    "created_at": "2026-10-12T08:14:03+00:00",
    "updated_at": "2026-10-16T14:30:00+00:00"
  }
}

Path parameters

  • dealstring(uuid)required

    The deal's id.

Request body

application/json · required

  • stagestringrequired

    Where an open deal stands, in pipeline order: draft, ready_to_send, sent, opened, engaged, in_negotiation, proposal_approved, contract_sent, contract_signed.

    One ofdraftready_to_sendsentopenedengagedin_negotiationproposal_approvedcontract_sentcontract_signed

  • reasonstringnullable

    Why the deal moved, kept in its history and sent with the webhook.

    at most 500 characters

Responses

  • Headers

    • X-RateLimit-Limit — Requests this key may make per minute.
    • X-RateLimit-Remaining — Requests left in the current minute.
    • dataobjectrequired
      • idstring(uuid)required
      • titlestringrequired
      • value_centsintegerrequired

        The deal's value in the currency's minor unit (öre for SEK): 320000 is 3 200 kr.

        ≥ 0

      • currencystringrequired

        ISO 4217 code, upper case.

        exactly 3 charactersExample "SEK"

      • stagestringrequired

        Where an open deal stands, in pipeline order: draft, ready_to_send, sent, opened, engaged, in_negotiation, proposal_approved, contract_sent, contract_signed.

        One ofdraftready_to_sendsentopenedengagedin_negotiationproposal_approvedcontract_sentcontract_signed

      • statusstringrequired

        open while being worked; won or lost once closed; archived when put away in the panel.

        One ofopenwonlostarchived

      • expected_close_datestring(date)nullablerequired
      • closed_atstring(date-time)nullablerequired

        When the deal was marked won or lost.

      • lost_reasonstringnullablerequired
      • ownerobjectrequired

        A member of the organization, as shown on records they own or created.

      • accountobjectnullablerequired

        The customer the deal is with, if any.

      • custom_fieldsobject | array of valuesnullablerequired

        Free-form values your organization keeps on the deal — a good place for your own system's id. An empty set comes back as [].

        at most 0 items

      • created_atstring(date-time)required
      • updated_atstring(date-time)required
  • 401No key, or the key is invalid, revoked or expired, or its creator no longer has access.
    Errors
  • 402The organization has not bought the module this endpoint belongs to, or it has lapsed to read-only, or its tier does not include what the operation needs: feature names the capability (the operation's x-feature) and required_tier the cheapest tier that grants it. Every operation answers this with "feature": "core.api" when no module the organization holds is on a tier that includes the API.
    Errors
  • 403The key lacks the scope, or the member it acts as lacks the permission or holds no seat in the module (module_seat_required — an administrator assigns seats under Settings → Users), or the organization is suspended.
    Errors
  • 404No such record in this organization.
    Errors
  • 422The request body or query failed validation.
    Errors
  • 429The key has made more requests this minute than its limit allows.
    Errors

Mark a deal won

POST/deals/{deal}/won
Scope write Module Proposals & e-signing Any permission of deals.update.any,deals.update.owned

Closes the deal as won: status becomes won, closed_at is set to now and any lost_reason is cleared. The stage is left as it is. Works on a lost deal too, which is how a lost deal is won back.

Recorded in the deal's history and fires the deal.won webhook. Idempotent: a deal that is already won is returned unchanged and nothing fires again. No request body.

curl -X POST 'https://api.closepact.com/v1/api/deals/01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40/won' \
  -H "Authorization: Bearer $CLOSEPACT_API_KEY"
Response · 200
{
  "data": {
    "id": "01a15c2e-4b7a-7f3e-9c1d-2e8f6a0b4c71",
    "title": "Hemstäd RUT – Henrik Ny",
    "value_cents": 320000,
    "currency": "SEK",
    "stage": "contract_signed",
    "status": "won",
    "expected_close_date": "2026-11-30",
    "closed_at": "2026-10-18T09:12:44+00:00",
    "lost_reason": null,
    "owner": {
      "id": "01a14eb3-c634-7238-bc76-18b09b287f98",
      "name": "Anna Lindqvist",
      "email": "anna@nordiskfastighet.se",
      "avatar_url": null
    },
    "account": {
      "id": "01a15b90-2d44-7c1a-8e5f-9b3c7d2e1a08",
      "name": "Henrik Ny",
      "domain": null
    },
    "custom_fields": null,
    "created_at": "2026-10-12T08:14:03+00:00",
    "updated_at": "2026-10-18T09:12:44+00:00"
  }
}

Path parameters

  • dealstring(uuid)required

    The deal's id.

Responses

  • Headers

    • X-RateLimit-Limit — Requests this key may make per minute.
    • X-RateLimit-Remaining — Requests left in the current minute.
    • dataobjectrequired
      • idstring(uuid)required
      • titlestringrequired
      • value_centsintegerrequired

        The deal's value in the currency's minor unit (öre for SEK): 320000 is 3 200 kr.

        ≥ 0

      • currencystringrequired

        ISO 4217 code, upper case.

        exactly 3 charactersExample "SEK"

      • stagestringrequired

        Where an open deal stands, in pipeline order: draft, ready_to_send, sent, opened, engaged, in_negotiation, proposal_approved, contract_sent, contract_signed.

        One ofdraftready_to_sendsentopenedengagedin_negotiationproposal_approvedcontract_sentcontract_signed

      • statusstringrequired

        open while being worked; won or lost once closed; archived when put away in the panel.

        One ofopenwonlostarchived

      • expected_close_datestring(date)nullablerequired
      • closed_atstring(date-time)nullablerequired

        When the deal was marked won or lost.

      • lost_reasonstringnullablerequired
      • ownerobjectrequired

        A member of the organization, as shown on records they own or created.

      • accountobjectnullablerequired

        The customer the deal is with, if any.

      • custom_fieldsobject | array of valuesnullablerequired

        Free-form values your organization keeps on the deal — a good place for your own system's id. An empty set comes back as [].

        at most 0 items

      • created_atstring(date-time)required
      • updated_atstring(date-time)required
  • 401No key, or the key is invalid, revoked or expired, or its creator no longer has access.
    Errors
  • 402The organization has not bought the module this endpoint belongs to, or it has lapsed to read-only, or its tier does not include what the operation needs: feature names the capability (the operation's x-feature) and required_tier the cheapest tier that grants it. Every operation answers this with "feature": "core.api" when no module the organization holds is on a tier that includes the API.
    Errors
  • 403The key lacks the scope, or the member it acts as lacks the permission or holds no seat in the module (module_seat_required — an administrator assigns seats under Settings → Users), or the organization is suspended.
    Errors
  • 404No such record in this organization.
    Errors
  • 422The request body or query failed validation.
    Errors
  • 429The key has made more requests this minute than its limit allows.
    Errors

Mark a deal lost

POST/deals/{deal}/lost
Scope write Module Proposals & e-signing Any permission of deals.update.any,deals.update.owned

Closes the deal as lost: status becomes lost, closed_at is set to now and lost_reason to the reason you give. The stage is left as it is. Works on a won deal too.

Recorded in the deal's history. No webhook fires for a lost deal; to notice them, list with filter[status]=lost. Idempotent: a deal that is already lost is returned unchanged, and a second call does not replace the reason.

curl -X POST 'https://api.closepact.com/v1/api/deals/01a14f2c-7c1e-7d0b-9a3e-3f5b2c8d1e40/lost' \
  -H "Authorization: Bearer $CLOSEPACT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "reason": "Valde en leverantör med lägre timpris"
}'
Response · 200
{
  "data": {
    "id": "01a15c31-90fd-7a0e-b6d2-5c1e8f3a9d02",
    "title": "Flyttstäd – Sara Ek",
    "value_cents": 540000,
    "currency": "SEK",
    "stage": "sent",
    "status": "lost",
    "expected_close_date": null,
    "closed_at": "2026-10-18T09:20:05+00:00",
    "lost_reason": "Valde en leverantör med lägre timpris",
    "owner": {
      "id": "01a14eb3-c634-7238-bc76-18b09b287f98",
      "name": "Anna Lindqvist",
      "email": "anna@nordiskfastighet.se",
      "avatar_url": null
    },
    "account": null,
    "custom_fields": null,
    "created_at": "2026-10-02T11:00:00+00:00",
    "updated_at": "2026-10-18T09:20:05+00:00"
  }
}

Path parameters

  • dealstring(uuid)required

    The deal's id.

Request body

application/json

  • reasonstringnullable

    Why the deal was lost.

    at most 500 characters

Responses

  • Headers

    • X-RateLimit-Limit — Requests this key may make per minute.
    • X-RateLimit-Remaining — Requests left in the current minute.
    • dataobjectrequired
      • idstring(uuid)required
      • titlestringrequired
      • value_centsintegerrequired

        The deal's value in the currency's minor unit (öre for SEK): 320000 is 3 200 kr.

        ≥ 0

      • currencystringrequired

        ISO 4217 code, upper case.

        exactly 3 charactersExample "SEK"

      • stagestringrequired

        Where an open deal stands, in pipeline order: draft, ready_to_send, sent, opened, engaged, in_negotiation, proposal_approved, contract_sent, contract_signed.

        One ofdraftready_to_sendsentopenedengagedin_negotiationproposal_approvedcontract_sentcontract_signed

      • statusstringrequired

        open while being worked; won or lost once closed; archived when put away in the panel.

        One ofopenwonlostarchived

      • expected_close_datestring(date)nullablerequired
      • closed_atstring(date-time)nullablerequired

        When the deal was marked won or lost.

      • lost_reasonstringnullablerequired
      • ownerobjectrequired

        A member of the organization, as shown on records they own or created.

      • accountobjectnullablerequired

        The customer the deal is with, if any.

      • custom_fieldsobject | array of valuesnullablerequired

        Free-form values your organization keeps on the deal — a good place for your own system's id. An empty set comes back as [].

        at most 0 items

      • created_atstring(date-time)required
      • updated_atstring(date-time)required
  • 401No key, or the key is invalid, revoked or expired, or its creator no longer has access.
    Errors
  • 402The organization has not bought the module this endpoint belongs to, or it has lapsed to read-only, or its tier does not include what the operation needs: feature names the capability (the operation's x-feature) and required_tier the cheapest tier that grants it. Every operation answers this with "feature": "core.api" when no module the organization holds is on a tier that includes the API.
    Errors
  • 403The key lacks the scope, or the member it acts as lacks the permission or holds no seat in the module (module_seat_required — an administrator assigns seats under Settings → Users), or the organization is suspended.
    Errors
  • 404No such record in this organization.
    Errors
  • 422The request body or query failed validation.
    Errors
  • 429The key has made more requests this minute than its limit allows.
    Errors