Create a contact
Changed onCreate a new contact. At least one of email or phone_number is required.
If a contact with the same email or phone number already exists, a 409 Conflict error is returned with the id of the existing contact in error.id. Use the Update a contact endpoint to modify existing contacts.
If a previously deleted contact matches the provided email or phone number, the contact is restored with the new data.
When sms_consent is subscribed, Privy automatically sends a TCPA-required welcome SMS to the contact. Pass send_welcome_sms: false to suppress this message if you have already collected consent outside of Privy.
Required scope: contacts_write
Request
- Base URLhttps://api.privy.com/v1
- AuthHTTP bearer
Headers
Target a subaccount instead of the main connected account. Pass a subaccount id from get_account's subaccounts list. Only direct subaccounts of the connected account are reachable — omit this for the main account itself.
Request body
Example request
{
"email": "jane@example.com",
"phone_number": "+15551234567",
"first_name": "Jane",
"last_name": "Doe",
"tags": [
"vip",
"repeat-buyer"
],
"custom_fields": {
"loyalty_tier": "gold"
},
"email_consent": "subscribed",
"sms_consent": "never_subscribed"
}Response
Contact created successfully.
Example response
{
"data": {
"id": "cus_a1b2c3d4e5f6g7h8",
"first_name": "Jane",
"last_name": "Doe",
"email": "jane@example.com",
"email_consent": "subscribed",
"email_consent_at": "2025-03-20T14:22:00Z",
"phone_number": "+15551234567",
"sms_consent": "subscribed",
"sms_consent_at": "2025-03-20T14:22:00Z",
"source": "csv",
"source_type": "import",
"imported": true,
"import_ids": [
"im_k2R5m8Q"
],
"tags": [
"vip",
"repeat-buyer"
],
"custom_fields": {
"loyalty_tier": "gold",
"referral_code": "JANE2024"
},
"created_at": "2025-01-15T10:30:00Z",
"updated_at": "2025-03-20T14:22:00Z"
}
}Changes
- warning
added the new
forbiddenenum value to the/response property for the response status - warning
added the new
forbiddenenum value to the/response property for the response status - warning
added the new
forbiddenenum value to the/response property for the response status - warning
added the new
forbiddenenum value to the/response property for the response status - warning
added the new
segment_builder_requiredenum value to the/response property for the response status - warning
added the new
segment_builder_requiredenum value to the/response property for the response status - warning
added the new
segment_builder_requiredenum value to the/response property for the response status - warning
added the new
segment_builder_requiredenum value to the/response property for the response status
- warning
- breaking
the response property
/became nullable for the status - breaking
the response property
/became nullable for the status - breaking
the response property
/became nullable for the status - breaking
the response property
/became nullable for the status - warning
added the new
api_access_requiredenum value to the/response property for the response status - warning
added the new
api_access_requiredenum value to the/response property for the response status - warning
added the new
api_access_requiredenum value to the/response property for the response status - warning
added the new
api_access_requiredenum value to the/response property for the response status - warning
added the new
contacts_not_readyenum value to the/response property for the response status - warning
added the new
contacts_not_readyenum value to the/response property for the response status - warning
added the new
contacts_not_readyenum value to the/response property for the response status - warning
added the new
contacts_not_readyenum value to the/response property for the response status - warning
added the new
no_connected_storeenum value to the/response property for the response status - warning
added the new
no_connected_storeenum value to the/response property for the response status - warning
added the new
no_connected_storeenum value to the/response property for the response status - warning
added the new
no_connected_storeenum value to the/response property for the response status - warning
added the new
paid_plan_requiredenum value to the/response property for the response status - warning
added the new
paid_plan_requiredenum value to the/response property for the response status - warning
added the new
paid_plan_requiredenum value to the/response property for the response status - warning
added the new
paid_plan_requiredenum value to the/response property for the response status - warning
added the new
store_unavailableenum value to the/response property for the response status - warning
added the new
store_unavailableenum value to the/response property for the response status - warning
added the new
store_unavailableenum value to the/response property for the response status - warning
added the new
store_unavailableenum value to the/response property for the response status - info
added the new optional
headerrequest parameterPrivy-Account-Id - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status
- breaking