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 '{
  "firstName": "<string>",
  "lastName": "<string>",
  "email": "jsmith@example.com",
  "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-<token>

Body

application/json
  • Option 1
  • Option 2
email
string<email>
required

Contact's email address

Maximum length: 255
firstName
string

Contact's first name

Maximum length: 25
lastName
string

Contact's last name.

Maximum length: 25
phoneNumber
string

Contact's phone number

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

Contact status

Available options:
POTENTIAL,
QUALIFIED,
DISQUALIFIED
tag
string

Tag for the contact

Maximum length: 100
joinedTime
string<date-time>

When the contact joined

eventId
integer

Associated event ID

Required range: x >= 1
utm
string

UTM parameters

Maximum length: 1000
country
string

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

Maximum length: 2
timeZone
string

Contact's timezone

Maximum length: 50
ipAddress
string

Contact's IP address

Maximum length: 45
referrerUrl
string

Referrer URL

Maximum length: 500

Response

Successfully created contact

data
object
I