Skip to Content
Contacts

Update a contact

PATCH
/api/v1/contacts/{id}

Update contact information. Omit a field to keep its value, or pass null to clear it.

Updating a contact doesn't change the parties of existing documents. Changes apply only to new documents.

Authorization

headerAuthorizationBearer <token>

API key, e.g. Authorization: Bearer sajn_svc_.... Not scope-limited: acts with its owner's workspace role.

Path Parameters

id*string

The contact ID.

Header Parameters

Sajn-Version?string

API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request.

Value in"2026-09""2026-10"
Sajn-Workspace?string

ID of the workspace this request acts in, from GET /api/v1/workspaces. Without it, an API key acts in its default workspace. The token's user must be a member of the workspace; an OAuth token only accepts the workspace it was granted for. A workspace that doesn't exist or can't be reached returns 403 WORKSPACE_ACCESS_DENIED.

Idempotency-Key?string

Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header Idempotent-Replayed: true); the same key with a different request returns 400.

Lengthlength <= 255

Request Body

Body

application/json
  1. body

Update contact request. Omit a field to keep it, or pass null to clear it.

firstName?string

Contact first name

lastName?string

Contact last name

email?|

Contact email address. Pass null to remove it.

Match^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
Formatemail
phone?|

Contact phone number. Pass null to remove it.

nationalId?|

National identity number, such as a Swedish personnummer. Pass null to remove it.

externalId?|

Your external reference ID. Pass null to remove it.

companyId?|

ID of company to associate with. Omit to keep the current company, or pass null to unlink it.

companyRole?|

Role/title within the company. Pass null to remove it.

addressLine1?|

First line of the street address

addressLine2?|

Second line of the street address, such as a c/o line

postalCode?|

Postal code of the address

city?|

City of the address

state?|

State or region of the address

country?|

Country of the address, as free text, such as Sverige. It isn't validated as a country code.

Response Body

200

application/json
  1. response
id*string

Unique contact identifier

email*|

Contact email address

phone*|

Contact phone number

firstName*string

Contact first name

lastName*string

Contact last name

nationalId*|

National identity number, such as a Swedish personnummer

externalId*|

Your external reference ID

addressLine1*|

First line of the street address

addressLine2*|

Second line of the street address, such as a c/o line

postalCode*|

Postal code of the address

city*|

City of the address

state*|

State or region of the address

country*|

Country of the address, as free text, as it was entered or imported. It isn't a country code, unlike a party's country.

createdAt*string

Date and time when contact was created

Formatdate-time
updatedAt*string

Date and time when contact was last updated

Formatdate-time
companyRole*|

Role/title within the associated company

company*|

The company the contact belongs to

Example Request
curl -X PATCH 'https://app.sajn.se/api/v1/contacts/cm4k2x9p10006abcd1234efgh' \  -H 'Content-Type: application/json' \  -d '{  "phone": "+46701740605"}'
Example Response
{  "id": "cm4k2x9p10006abcd1234efgh",  "email": "kai@example.com",  "phone": "+46701740605",  "firstName": "Kai",  "lastName": "Lindqvist",  "nationalId": "191212121212",  "externalId": "EMP-0142",  "addressLine1": "Storgatan 12",  "addressLine2": null,  "postalCode": "411 38",  "city": "Göteborg",  "state": null,  "country": "Sverige",  "createdAt": "2026-09-15T10:30:00.000Z",  "updatedAt": "2026-09-15T10:30:00.000Z",  "companyRole": null,  "company": null}

Was this page helpful?