> ## Documentation Index
> Fetch the complete documentation index at: https://developer.rocket.chat/llms.txt
> Use this file to discover all available pages before exploring further.
# Create Contact
>
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 |
## OpenAPI
````json POST /api/v1/contacts.create
{
"openapi": "3.0.0",
"info": {
"version": "1.0.0",
"title": "Miscellaneous"
},
"servers": [
{
"url": "https://apiexplorer.support.rocket.chat"
}
],
"tags": [
{
"name": "Commands"
},
{
"name": "Email Inbox"
},
{
"name": "Licenses"
},
{
"name": "Mailer"
},
{
"name": "Calendar Events"
},
{
"name": "Exchange"
},
{
"name": "Contacts"
},
{
"name": "WhatsApp"
},
{
"name": "Rasa App"
},
{
"name": "Jitsi App"
}
],
"paths": {
"/api/v1/contacts.create": {
"post": {
"summary": "Create Contact",
"tags": [
"Contacts"
],
"operationId": "post-api-v1-contacts.create",
"description": "\n\nCreate a local personal contact for the authenticated user. The contact `source` is always `local`. `displayName` is built from `givenName` and optional `surname`.\n\n### Changelog\n| Version | Description |\n| ------- | ----------- |\n| 9.1.0 | Added |",
"parameters": [
{
"$ref": "#/components/parameters/Auth-Token"
},
{
"$ref": "#/components/parameters/UserId"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"givenName"
],
"additionalProperties": false,
"properties": {
"givenName": {
"type": "string",
"description": "Enter the contact's given name. Required and must contain a non-whitespace character.",
"minLength": 1
},
"surname": {
"type": "string",
"description": "Enter the contact's surname."
},
"companyName": {
"type": "string",
"description": "Enter the contact's company name."
},
"emails": {
"type": "array",
"maxItems": 10,
"description": "Up to 10 email addresses.",
"items": {
"type": "object",
"required": [
"address"
],
"additionalProperties": false,
"properties": {
"address": {
"type": "string"
},
"label": {
"type": "string"
}
}
}
},
"phones": {
"type": "array",
"maxItems": 10,
"description": "Up to 10 phone numbers. When `raw` includes a resolvable country code, the response also includes `e164`.",
"items": {
"type": "object",
"required": [
"raw"
],
"additionalProperties": false,
"properties": {
"raw": {
"type": "string"
},
"label": {
"type": "string"
}
}
}
}
}
},
"examples": {
"Example 1": {
"value": {
"givenName": "John",
"surname": "Doe",
"companyName": "Example Corp",
"emails": [
{
"address": "john.doe@example.com",
"label": "work"
}
],
"phones": [
{
"raw": "+1 555 0100",
"label": "mobile"
}
]
}
}
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"contact": {
"$ref": "#/components/schemas/Contact"
},
"success": {
"type": "boolean"
}
}
},
"examples": {
"Example 1": {
"value": {
"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.42Z"
},
"success": true
}
}
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"error": {
"type": "string"
}
}
},
"examples": {
"Missing Given Name": {
"value": {
"success": false,
"error": "must have required property 'givenName' [error-invalid-params]"
}
},
"Not Created": {
"value": {
"success": false,
"error": "error-contact-not-created"
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/authorizationError"
},
"403": {
"$ref": "#/components/responses/forbiddenError"
}
}
}
}
},
"components": {
"parameters": {
"Auth-Token": {
"name": "X-Auth-Token",
"in": "header",
"description": "The `authToken` of the authenticated user.",
"required": true,
"schema": {
"type": "string"
},
"example": "RScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f"
},
"UserId": {
"name": "X-User-Id",
"in": "header",
"description": "The `userId` of the authenticated user.",
"required": true,
"schema": {
"type": "string"
},
"example": "rbAXPnMktTFbNpwtJ"
}
},
"schemas": {
"Contact": {
"type": "object",
"description": "A personal contact returned by the Contacts API. Sync-only fields (`uid`, `externalId`, `folderId`, `lastSyncAt`) are never included.",
"properties": {
"_id": {
"type": "string"
},
"source": {
"type": "string",
"description": "`local` for contacts created in Rocket.Chat. `outlook` for contacts imported by Microsoft Exchange server-to-server sync.",
"enum": [
"local",
"outlook"
]
},
"displayName": {
"type": "string"
},
"givenName": {
"type": "string"
},
"surname": {
"type": "string"
},
"companyName": {
"type": "string"
},
"officeLocation": {
"type": "string"
},
"emails": {
"type": "array",
"items": {
"type": "object",
"properties": {
"address": {
"type": "string"
},
"label": {
"type": "string",
"description": "Present on local contacts. Exchange imports may omit it."
}
}
}
},
"phones": {
"type": "array",
"items": {
"type": "object",
"properties": {
"raw": {
"type": "string"
},
"e164": {
"type": "string",
"description": "E.164 form when `raw` includes a resolvable country code."
},
"label": {
"type": "string"
}
}
}
},
"categories": {
"type": "array",
"items": {
"type": "string"
}
},
"favorite": {
"type": "boolean"
},
"syncProvider": {
"type": "string",
"description": "Set on Outlook-synced contacts. Either `ews` or `graph`.",
"enum": [
"ews",
"graph"
]
},
"_updatedAt": {
"type": "string"
}
}
}
},
"responses": {
"authorizationError": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"error": {
"type": "string"
}
}
},
"examples": {
"Authorization Error": {
"value": {
"success": false,
"error": "You must be logged in to do this."
}
}
}
}
}
},
"forbiddenError": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"error": {
"type": "string"
},
"errorType": {
"type": "string"
}
}
},
"examples": {
"Permission Error": {
"value": {
"success": false,
"error": "User does not have the permissions required for this action",
"errorType": "error-forbidden"
}
}
}
}
}
}
}
}
}
````