Skip to Content
Contacts

Create a new contact

POST
/api/v1/contacts

Create a new contact in your organization.

Required Fields:

  • firstName - Contact's first name

Optional Fields:

  • lastName - Contact's last name (omit or send an empty string for single-name contacts)
  • email - Email address
  • phone - Phone number (for SMS notifications)
  • nationalId - National identity number, such as a Swedish personnummer, for eID verification
  • externalId - Your external reference ID for tracking
  • companyId - Associate with existing company
  • companyRole - Role within the company
  • addressLine1, addressLine2, postalCode, city, state, country - The contact's address

Authorization

headerAuthorizationBearer <token>

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

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

Create contact request

firstName*string

Contact first name (required)

Length1 <= length
lastName?string

Contact last name (optional, e.g. for single-name contacts)

email?string

Contact email address

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?string

Contact phone number

externalId?string

Your external reference ID for this contact

companyId?string

ID of company to associate with

companyRole?string

Role/title within the company

nationalId?string

National identity number, such as a Swedish personnummer

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 POST 'https://app.sajn.se/api/v1/contacts' \  -H 'Content-Type: application/json' \  -d '{  "firstName": "Kai",  "lastName": "Lindqvist",  "email": "kai@example.com",  "phone": "+46701740605",  "externalId": "EMP-0142"}'
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?