CRMchat APIBeta

Create contact

POST
/workspaces/{workspaceId}/contacts

Creates a new contact in a workspace.

Authorization

bearerAuth
AuthorizationBearer <token>

API key (sk_...) as Bearer token

In: header

Path Parameters

workspaceId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

ownerId?string

Contact owner. Defaults to the authenticated user.

Length1 <= length
type?string

Value in

  • "contact"
  • "group"
fullName*string
Length1 <= length
description?string
avatarUrl?string
email?string
Formatemail
phone?string
url?string
Formaturi
amount?number
telegram?
custom?

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/workspaces/string/contacts" \  -H "Content-Type: application/json" \  -d '{    "fullName": "string"  }'
{  "data": {    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z",    "workspaceId": "string",    "ownerId": "string",    "type": "contact",    "fullName": "string",    "description": "string",    "avatarUrl": "string",    "email": "string",    "phone": "string",    "url": "string",    "amount": 0,    "telegram": {      "id": 0,      "username": "string",      "folders": [        "string"      ],      "inviteLink": "string"    },    "custom": {      "property1": "string",      "property2": "string"    },    "id": "string",    "_meta": {      "properties": {        "property1": {          "type": "single-select",          "name": "string",          "selected": {            "label": "string",            "value": "string"          }        },        "property2": {          "type": "single-select",          "name": "string",          "selected": {            "label": "string",            "value": "string"          }        }      }    }  }}