Skip to main content
POST
/
contacts
/
create
Create a new contact
curl --request POST \
  --url https://api-dev.iclosed.io/contacts/create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "email": "[email protected]",
  "firstName": "<string>",
  "lastName": "<string>",
  "phoneNumber": "<string>",
  "status": "POTENTIAL",
  "tag": "<string>",
  "joinedTime": "2023-11-07T05:31:56Z",
  "eventId": 2,
  "utm": "<string>",
  "country": "<string>",
  "timeZone": "<string>",
  "ipAddress": "<string>",
  "referrerUrl": "<string>"
}
'
{
  "data": {
    "contact": {
      "id": 123,
      "accountId": 123,
      "userId": 123,
      "email": "<string>",
      "firstName": "<string>",
      "lastName": "<string>",
      "status": "<string>",
      "phoneNumber": "<string>",
      "previewId": "<string>",
      "tagId": 123,
      "blockedByRecaptcha": true,
      "joinedTime": "2023-11-07T05:31:56Z",
      "country": "<string>",
      "timeZone": "<string>",
      "ipAddress": "<string>",
      "blockedId": 123,
      "referrerUrl": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "deletedAt": "2023-11-07T05:31:56Z",
      "tracking": {}
    }
  }
}

Authorizations

Authorization
string
header
required

API key required in 'Authorization' header. Format: iclosed-

Body

application/json
email
string<email>
required

Contact's email address

Maximum string length: 255
firstName
string

Contact's first name

Maximum string length: 25
lastName
string

Contact's last name.

Maximum string length: 25
phoneNumber
string

Contact's phone number

Maximum string length: 20
status
enum<string>
default:POTENTIAL

Contact status

Available options:
POTENTIAL,
QUALIFIED,
DISQUALIFIED
tag
string

Tag for the contact

Maximum string length: 100
joinedTime
string<date-time>

When the contact joined

eventId
integer

Associated event ID

Required range: x >= 1
utm
string

UTM parameters

Maximum string length: 1000
country
string

Contact's country (optional when phoneNumber is provided as it can be auto-detected)

Maximum string length: 2
timeZone
string

Contact's timezone

Maximum string length: 50
ipAddress
string

Contact's IP address

Maximum string length: 45
referrerUrl
string

Referrer URL

Maximum string length: 500

Response

Successfully created contact

data
object