Create a local personal contact for the authenticated user. The contact source is always local. displayName is built from givenName and optional surname.
Changelog
| Version | Description |
|---|---|
| 9.1.0 | Added |
The authToken of the authenticated user.
The userId of the authenticated user.
{
"givenName": "John",
"surname": "Doe",
"companyName": "Example Corp",
"emails": [
{
"address": "john.doe@example.com",
"label": "work"
}
],
"phones": [
{
"raw": "+1 555 0100",
"label": "mobile"
}
]
}Enter the contact's given name. Required and must contain a non-whitespace character.
Enter the contact's surname.
Enter the contact's company name.
Up to 10 email addresses.
Up to 10 phone numbers. When raw includes a resolvable country code, the response also includes e164.
OK
{
"contact": {
"_id": "690c2b2d4e7e8bcf6985b3d8",
"source": "local",
"displayName": "John Doe",
"givenName": "John",
"surname": "Doe",
"companyName": "Example Corp",
"emails": [
{
"address": "john.doe@example.com",
"label": "work"
}
],
"phones": [
{
"raw": "+1 555 0100",
"e164": "+15550100",
"label": "mobile"
}
],
"_updatedAt": "2025-11-05T07:53:43.420Z"
},
"success": true
}A personal contact returned by the Contacts API. Sync-only fields (uid, externalId, folderId, lastSyncAt) are never included.
local for contacts created in Rocket.Chat. outlook for contacts imported by Microsoft Exchange server-to-server sync.
Present on local contacts. Exchange imports may omit it.
E.164 form when raw includes a resolvable country code.
Set on Outlook-synced contacts. Either ews or graph.
Bad Request
{
"success": false,
"error": "must have required property 'givenName' [error-invalid-params]"
}{
"success": false,
"error": "error-contact-not-created"
}Unauthorized
{
"success": false,
"error": "You must be logged in to do this."
}Forbidden
{
"success": false,
"error": "User does not have the permissions required for this action",
"errorType": "error-forbidden"
}