Skip to main content
Contacts

Create or update a contact

Creates a new contact or updates an existing one.

POST
/v2/contacts

If a contact with the given email or userId already exists, it will be updated. Otherwise, a new contact will be created.

At least one of email or userId must be provided for identification.

Request Body

FieldTypeRequiredDescription
emailstringOne of email/userIdContact email address
userIdstringOne of email/userIdExternal user ID from your system
namestringNoContact display name
profilePicturestringNoProfile picture URL
companiesarrayNoCompanies the contact belongs to
customFieldsobjectNoCustom field values
subscribedToChangelogbooleanNoWhether subscribed to changelog
localestringNoContact locale/language
phonestringNoContact phone number
rolesarrayNoRole (User Tag) names to assign
userHashstringNoHMAC hash for identity verification
createdAtstringNoWhen the contact was created (ISO 8601)

Company Object

Each company in the companies array can have:

  • id (required) - External company ID from your system
  • name (required) - Company name
  • monthlySpend - Monthly spend/revenue
  • customFields - Custom field values
  • industry - Industry
  • website - Company website URL
  • plan - Current plan/subscription
  • companySize - Number of employees
  • createdAt - When the company was created

Response

Returns the created or updated contact object.

  • 201 Created - A new contact was created
  • 200 OK - An existing contact was updated

Example Request

{
  "email": "john@example.com",
  "name": "John Doe",
  "userId": "usr_12345",
  "companies": [
    {
      "id": "company_123",
      "name": "Acme Inc",
      "monthlySpend": 500,
      "plan": "enterprise"
    }
  ],
  "customFields": {
    "plan": "pro",
    "signupSource": "website"
  },
  "subscribedToChangelog": true
}

Example Response

{
  "object": "contact",
  "id": "676f0f6765bdaa7d7d760f88",
  "email": "john@example.com",
  "name": "John Doe",
  "userId": "usr_12345",
  "type": "customer",
  "companies": [...],
  "customFields": {...},
  ...
}

Version Availability

This endpoint is only available in API version 2026-01-01.nova and newer.

Authorizationstringheaderrequired

API key as Bearer token. Use: Authorization: Bearer sk_...

Featurebase-Versionenum<string>header

API version for this request. Defaults to your organization's configured API version if not specified.

Available options: 2026-01-01.nova, 2025-12-12.clover
Example: 2026-01-01.nova

Body

application/json
companiesobject[]

Companies the contact belongs to

Maximum array length: 100
createdAtstring | null

When the contact was created in your system (ISO 8601)

Example: 2024-01-15T10:30:00Z
customFieldsobject

Custom field values on the contact. Values can be string, number, boolean, null, or array of primitives.

emailstring

Contact email address. Used for identification if userId is not provided.

Maximum string length: 500
Example: john@example.com
localestring

Contact locale/language preference

Maximum string length: 10
Example: en
namestring

Contact display name

Maximum string length: 500
Example: John Doe
phonestring | null

Contact phone number

Maximum string length: 500
Example: +1234567890
profilePicturestring | null

Profile picture URL

Example: https://example.com/avatar.png
rolesstring[]

Array of role (User Tag) names to assign to the contact

Maximum array length: 100
subscribedToChangelogboolean

Whether the contact is subscribed to changelog updates

Example: true
userHashstring

HMAC-SHA256 hash of userId or email for identity verification

Maximum string length: 256
Example: a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6
userIdstring

External user ID from your system. Takes precedence over email for identification.

Maximum string length: 500
Example: usr_12345

Response

application/json

Created

commentsCreatednumber

Number of comments created

Example: 0
companiesobject[]

Companies the contact belongs to

customFieldsobject

Custom field values on the contact

descriptionstring

Contact description/bio

Example:
emailstring | null

Contact email

Example: john@example.com
idstringrequired

Unique identifier

Example: 676f0f6765bdaa7d7d760f88
lastActivitystring

Last activity ISO timestamp

Example: 2025-01-03T21:42:30.181Z
localestring

Contact locale

Example: en
manuallyOptedOutFromChangelogboolean

Whether manually opted out from changelog

Example: false
namestringrequired

Contact display name

Example: John Steezy
objectenum<string>required

Object type identifier

Available options: contact
Example: contact
organizationIdstring

Organization ID the contact belongs to

Example: 5febde12dc56d60012d47db6
postsCreatednumber

Number of posts created

Example: 0
profilePicturestring | null

Profile picture URL

Example: https://global.featurebase-attachments.com/c/static/legacy/anon_23.png
rolesstring[]

Contact roles

subscribedToChangelogboolean

Whether subscribed to changelog

Example: true
typeenum<string>required

Type of contact

Available options: customer, lead
Example: customer
userIdstring

External user ID from SSO

Example: 676f0f673dbb299c8a4f3057
verifiedboolean

Whether email is verified

Example: true