SidetalkGuides
Sidetalk website ↗Open dashboard

Create/Update Customer Contact API

Purpose

This API creates or updates Sidetalk customer contacts using information collected by external service signup, reservation, or inquiry forms.
If the same memberId exists, it updates the existing customer. Otherwise, it creates a new customer.

URL

JavaScript
💡https://api.sidetalk.ai/v1/users

HTTP method

POST

Headers

HeadersValueDescription
Content-Typeapplication/jsonIndicates that the request body is JSON.
AuthorizationBearer <api_key>Use the API key provided in Install in the Sidetalk dashboard.

Body

ParameterTypeRequiredDescription
userInfoIdNumber/StringConditionally requiredThe Sidetalk customer information ID, used to update an existing contact directly.
memberIdStringConditionally requiredThe external service’s unique member ID. If the same memberId exists, the existing contact is updated.
sessionIdStringConditionally requiredThe chat session ID, used to create/update contacts for non-member chat sessions.
userNameStringNoThe customer’s name, saved as userName in Sidetalk customer information.
userEmailStringNoThe customer’s email, saved as userEmail in Sidetalk customer information.
userPhoneStringNoThe customer’s phone number, saved as userPhone in Sidetalk customer information.
customerMemoryStringNoCustomer notes.
extraFieldsObjectNoAdditional customer fields. Keys must match field keys in the dashboard’s Customer Information Settings.
customerAliasStringNoA customer alias managed separately from userName. If omitted, the existing alias is retained.
At least one of userInfoId, memberId, or sessionId is required.

How to use extraFields

For additional fields created in Sidetalk Customer Information Settings, use each field key as the key in extraFields.
For example, if Customer Information Settings contains these fields:
Field nameField key
Company namecompany_name
Send the request body as follows.
JavaScript
{
  "extraFields": {
    "company_name": "코스모스팜"
  }
}

Example request


Create/update a member customer
Creates or updates customer contacts by memberId. Use for signup, synchronization of signed-in members, or external service member integration.
JavaScript
curl -X POST https://api.sidetalk.ai/v1/users \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer ${API_KEY}" \
  -d '{
      "memberId": "user_123",
      "userName": "홍길동",
      "userEmail": "hong@example.com",
      "customerAlias": "VIP 고객",
      "userPhone": "01012345678",
      "customerMemory": "VIP 고객",
      "extraFields": {
          "company_name": "코스모스팜"
      }
  }'

Create/update a non-member customer
Creates or updates contacts based on sessionId.
Use for customers without member IDs, such as chat sessions, guest reservations, or guest inquiry forms.
JavaScript
curl -X POST https://api.sidetalk.ai/v1/users \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${API_KEY}" \
-d '{
		"sessionId": "chat_session_abc123",
		"userName": "홍길동",
		"customerAlias": "VIP 고객",
		"userEmail": "hong@example.com",
		"userPhone": "01012345678",
		"customerMemory": "VIP 고객",
		"extraFields": {
		"company_name": "코스모스팜"
	}
}'
Directly update an existing customer contact
If you know the Sidetalk customer information ID, update directly using userInfoId.
JavaScript
curl -X POST https://api.sidetalk.ai/v1/users \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer ${API_KEY}" \
  -d '{
      "userInfoId": 123,
      "userName": "홍길동",
      "customerMemory": "상담 후 VIP 고객으로 변경"
  }'

Response body

JavaScript
{
  "success": true,
  "data": {
    "siteId": 1,
    "userInfoId": 123,
    "sessionId": "",
    "memberId": "user_123",
    "userName": "홍길동",
    "customerAlias": "VIP 고객",
    "userEmail": "hong@example.com",
    "userPhone": "821012345678",
    "userPhoneCountryCode": "82",
    "customerMemory": "{\"_sidetalk_customer_profile\":\"1\",\"memo\":\"VIP 고객\",\"extra_fields\":{\"company_name\":\"코스모스팜\"}}",
    "isManual": "1",
    "createdAt": "20260527143000",
    "updatedAt": "20260527143000"
  }
}
- userPhone may be normalized to digits when saved. Example: 01012345678 → 821012345678 - userPhoneCountryCode may also be saved. Example: 82

Response fields

FieldTypeDescription
successBooleanWhether the request succeeded.
dataObjectThe saved customer information.
data.userInfoIdNumberThe Sidetalk customer information ID.
data.memberIdStringThe requested external member ID.
data.sessionIdStringThe linked chat session ID.
data.userNameStringThe saved customer name.
data.userEmailStringThe saved customer email.
data.userPhoneStringThe saved customer phone number.
data.customerMemoryStringCustomer notes and additional field data.
data.userPhoneCountryCodeStringThe saved phone country code.
data.isManualStringWhether it was entered directly: 1 or 0.
data.createdAtStringCreation date and time.
data.updatedAtStringModification date and time.

Error response

JavaScript
{
  "success": false,
  "error": "userInfoId, memberId, or sessionId is required."
}
JavaScript
{
  "success": false,
  "error": "At least one customer field is required."
}
JavaScript
{
  "success": false,
  "error": "Name must be at least 2 characters."
}
JavaScript
{
  "success": false,
  "error": "Invalid phone format."
}
FieldTypeDescription
successBooleanWhether the request failed.
errorStringThe error message.

Example image

Original guide image

Notes

  • Sending memberId and sessionId together can link CRM activities from a guest chat session to the memberId customer contact.
  • Contacts saved through this API are used as the customer reference for CRM activity history.
  • Contacts saved by an external API show an External API Integration history in Customer Contacts.
  • If the same userInfoId exists, updates that contact directly.
  • If the same sessionId exists, creates or updates the contact for that guest session.
  • The following aliases are also supported for backward compatibility and easier external integration.
  • customerAlias is stored separately from userName.
  • If customerAlias is omitted, the existing alias is unchanged.
Primary fieldSupported aliases
userInfoId user_info_id, id
memberId member_id, wpUserId, wp_user_id, userId, user_id
sessionId session_id
userName user_name
userEmail user_email
userPhone user_phone
userPhoneCountryCode user_phone_country_code
customerMemory customer_memory
extraFields extra_fields
isManual is_manual
customerAliascustomer_alias