Create a new contact
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 addressphone- Phone number (for SMS notifications)nationalId- National identity number, such as a Swedish personnummer, for eID verificationexternalId- Your external reference ID for trackingcompanyId- Associate with existing companycompanyRole- Role within the companyaddressLine1,addressLine2,postalCode,city,state,country- The contact's address
AuthorizationBearer <token>API key, e.g. Authorization: Bearer sajn_svc_.... Not scope-limited: acts with its owner's workspace role.
Sajn-Version?stringAPI 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.
"2026-09""2026-10"Sajn-Workspace?stringID 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?stringMakes 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.
length <= 255Body
application/json- body
Create contact request
firstName*stringContact first name (required)
1 <= lengthlastName?stringContact last name (optional, e.g. for single-name contacts)
email?stringContact email address
^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$emailphone?stringContact phone number
externalId?stringYour external reference ID for this contact
companyId?stringID of company to associate with
companyRole?stringRole/title within the company
nationalId?stringNational 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.
200
application/json- response
id*stringUnique contact identifier
email*|Contact email address
phone*|Contact phone number
firstName*stringContact first name
lastName*stringContact 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*stringDate and time when contact was created
date-timeupdatedAt*stringDate and time when contact was last updated
date-timecompanyRole*|Role/title within the associated company
company*|The company the contact belongs to
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"}'{ "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?