Skip to main content
API Docs (rev 1.22)

Connect CLOSEM to other software

Robert Moore avatar
Written by Robert Moore
Updated over 2 years ago

You can connect thousands of other applications to CLOSEM using our API links shown on this page. You must be logged in to your CLOSEM account.

Once logged in, this page will automatically populate with your unique content, including your Base URL, contacts lists and tags as shown below.

You can use these links to tie a form on your website to CLOSEM, or use Zapier to link with thousands of other applications.

## Base URL

A POST request must be sent to your company's base URL `https://app.closem.ai/?m=api&auth=`

```curl

curl --location --request POST 'https://app.closem.ai/?m=api&auth={APiKEY}'

```

## Required Parameter - Request Mode

The mode parameter is required with every request. This parameter lets you specify what action you want to be taken, such as adding a contact, starting a sequence, or scheduling an appointment.

Accepted modes: addcontact , runsequence , scheduleappointment

```curl

--form 'mode=addcontact'

Include upsert to modify existing contacts

--form 'upsert=true'

```

You can view the documentation for each mode below.

# Mode - Add Contact

Use this API call to add a new Users (and optionally run one a specified sequence on the newly added Users).

*The `mode` parameter must be set to `addcontact`.*

Include upsert to modify existing contacts

--form 'upsert=true'

```

### Required Parameters

Phone and/or email is required to add a Users.

### Phone Number

Accepted field names you can use for a phone number: `phone`, `phonenumber`, `number`, or `phone_number`

```curl

--form 'phone=9999999998' \

```

### Email Address

Accepted field names you can use for an email: `email`, `mail`, `emailaddress`, or `email_address`

```curl

--form 'email=[email protected]' \

```

Optional Parameters

Email is optional if phone is provided. Phone is optional if email is provided.

### Full Name

Accepted field names you can use for a Users's full name: `fullname`, `name`, or `full_name`

First and last name must be seperated by a space.

Will still work if only the first name is passed e.g. fullname:John

```curl

--form 'fullname=John Doe' \

```

### First Name

Accepted field names you can use for a Users's first name: `firstname`, `first`, or `first_name`

Field is ignored if full name is passed.

```curl

--form 'firstname=John' \

```

### Last Name

Accepted field names you can use for a Users's last name: `lastname`, `last`, or `last_name`

Field is ignored if full name is passed.

```curl

--form 'lastname=Doe' \

```

### Notes

Accepted field names you can use for Users notes: `notes`, or `note`

```curl

--form 'notes=Example Users note' \

```

### Address

Accepted field names you can use for Users address: `address`, or `street`

```curl

--form 'address=123 Testing Street' \

```

### City

Accepted field names you can use for Users city: `city`

```curl

--form 'city=Example Users city' \

```

### State

Accepted field names you can use for Users state: `state`

```curl

--form 'state=CA' \

```

### ZIP

Accepted field names you can use for Users ZIP: `zip`, `zip_code`, or `zipcode`

```curl

--form 'zip=99999' \

```

### Tag(s)

Accepted field names you can use for adding tag(s) to imported Users: `tags`, or `tag`

If assigning more than one tag, the tag IDs must be seperated by commas.

```curl

--form 'tags=42,57' \

```

### Contact List(s)

Accepted field names you can use for adding contact list(s) to imported Users: `contactlists`, `contactlist`, `contact_lists`, or `contact_list`

If assigning more than one contact list, the contact list IDs must be seperated by commas.

```curl

--form 'contactlists=18,32' \

```

### Sequence

Accepted field name for sequence ID to copy and run after importing the Users: sequence_id.

You can only send one sequence ID.

```curl

--form 'sequence_id=99' \

```

# Mode - Run Sequence

Use this API call to start a sequence on one or more Users, identified by either their email, phone, or contact list.

*The `mode` parameter must be set to `runsequence`.*

## Required Parameters

Sequence ID is required and one (or more) of the following parameters is required: `contact_emails`, `contact_phones`, `contact_lists`, or `tags`.

### Sequence ID

Accepted field names you can use for sequence ID: `sequence_id`

```curl

--form 'sequence_id=55'

```

### Contact Email(s)

Accepted field name you can use for contact email(s): `contact_emails`

If providing more than one contact email, the contact emails must be seperated by commas. This parameter is optional if contact phones, contact lists, or tags are specified.

```curl

--form 'contact_emails=[email protected],[email protected]'

```

### Contact Phone(s)

Accepted field name you can use for contact phone number(s): `contact_phones`

If providing more than one contact phone number, they must be seperated by commas. This parameter is optional if contact emails, contact lists, or tags are specified.

Accepted formats for phone number are: `+1 (###) ###-####`, `+1##########` , `1##########` , `1-###-###-####`

```curl

--form 'contact_phones=+15554443333,777-888-9999'

```

### Contact List(s)

Accepted field names are: `contactlists`, `contactlist`, `contact_lists`, or `contact_list`

All contacts belonging to the contact list(s) will get the sequence ran on them.

If assigning more than one contact list, the contact list IDs must be seperated by commas. This parameter is optional if contact phones, contact emails, or tags are specified.

```curl

--form 'contactlists=18,32'

```

### Tag(s)

Accepted field names are: tags, or tag

All contacts belonging to the tag(s) will get the sequence ran on them.

If specifying more than one tag, the tag IDs must be seperated by commas. This parameter is optional if contact emails, contact phones, or contact lists are specified.

```curl

--form 'tags=42,57'

```

# Mode - Schedule Appointment

Use this API call to start a sequence on one or more Users, identified by either their email, phone, or contact list.

The `mode` parameter must be set to `scheduleappointment`.

## Required Parameters

Appointment Note and Appointment Timestamp is required, and one (or more) of the following parameters is also required: contact_emails, contact_phones, contact_lists, or tags.

### Appointment Note

Accepted field name you can use for appointment note: `appointment_note`

```curl

--form 'appointment_note=Virtural Training Seminar'

```

### Appointment Timestamp

Accepted field name you can use for appointment timestamp: `appointment_timestamp`

This is when the appointment is scheduled for. This must be a time in the future (not the past!).

Additionally, you have one of two choices for this parameter:

1. You may send a UNIX timestamp (link to converter)

2. You may send a datetime string in one of the following format ONLY (AM/PM interchangable):

MM/DD/YY HH:MM AM

MM/DD/YYYY HH:MM PM

If you provide a datetime string, it will be assumed to be the same timezone as your companies CLOSEM timezone!

```curl

--form 'appointment_timestamp=04/01/2022 12:30 PM'

```

### Contact Email(s)

Accepted field name you can use for contact email(s): `contact_emails`

If providing more than one contact email, the contact emails must be seperated by commas. This parameter is optional if contact phones, contact lists, or tags are specified.

```curl

--form 'contact_emails=[email protected],[email protected]'

```

### Contact Phone(s)

Accepted field name you can use for contact phone number(s): `contact_phones`

If providing more than one contact phone number, they must be seperated by commas. This parameter is optional if contact emails, contact lists, or tags are specified.

```curl

--form 'contact_phones=+15554443333,1-777-888-9999'

```

### Contact List(s)

Accepted field names are: `contactlists`, `contactlist`, `contact_lists`, or `contact_list`

All contacts belonging to the contact list(s) will get the scheduled appointment.

If assigning more than one contact list, the contact list IDs must be seperated by commas. This parameter is optional if contact phones, contact emails, or tags are specified.

```curl

--form 'contactlists=18,32'

```

### Tag(s)

Accepted field names are: `tags`, or `tag`

All contacts belonging to the tag(s) will get the scheduled appointment.

If specifying more than one tag, the tag IDs must be seperated by commas. This parameter is optional if contact emails, contact phones, or contact lists are specified.

```curl

--form 'tags=42,57'

```

Did this answer your question?