Create Contacts (Batch)

Create contacts within an organization.

❗️

No duplicate contact check

This API DOES NOT return duplicate contact error message. If an existing externalId is passed, the API will update the existing externalId (and remove the fields not provided in the request)

Contact Object

Phone Numbers

The country code is required to know how to correctly dial some international phone numbers. To validate a phone number set “skipValidation” to false and provide the correct country code. The “skipValidation” is only used where the Google Library version implemented by Everbridge knows the number.

All non-numeric characters will be stripped off and only the digits are validated. E.g. “X781-555-1222” gets converted to "7815551222".

Expand for Phone Number examples

✅ Standard phone format.

    {
      "pathId" : 241901148045319,
      "countryCode" : "US",
      "value" : "7815551212",
    }

✅ Using “+1” as the dialing Country Code

    {
      "pathId" : 241901148045319,
      "value" : "+17815551212",
    }

❌ Dialing code is NOT a valid county code

    {
      "pathId" : 241901148045319,
      "countryCode" : "1",
      "value" : "7815551212",
    }

❌ Missing “+” character before the phone number will result in error

    {
      "pathId" : 241901148045319,
      "value" : "17815551212",
    }

Quiet Times

For Contact Update:

  1. If quietTimeFrames is present, timezoneId is required.
  2. If quietTimeFrames is non-empty value, quietTimeFrames for the path will be updated with the value.
  3. If quietTimeFrames is not present, quietTimeFrames for the path will not be updated.
  4. If quietTimeFrames is passed as an empty array, quietTimeFrames for the path will be removed.
Expand for quietTimeFrames examples

Examples:

"quietTimeFrames": [
              {
                "name": "All",
                "days": [
                  6,
                  7
                ],
                "fromHour": 0,
                "fromMin": 0,
                "toHour": 0,
                "toMin": 0
              }
            ]
"quietTimeFrames": [
              {
                "name": "MWF 9-5",
                "days": [
                  2,
                  6
                ],
                "fromHour": 9,
                "fromMin": 0,
                "toHour": 17,
                "toMin": 0
              }
            ]
"quietTimeFrames": [
        {
          "name": "Midnight to Noon",
          "days": [
            1
          ],
          "fromHour": 0,
          "fromMin": 0,
          "toHour": 12,
          "toMin": 0
        },
        {
          "name": "6 AM to 6 PM",
          "days": [
            1
          ],
          "fromHour": 6,
          "fromMin": 0,
          "toHour": 18,
          "toMin": 0
        }
      ]

Contact Paths

The “pathId” is NOT the ID of the contact path but the “pathId” found from the api call.
This ID is the same over ALL accounts and organizations. For example, the pathId for EMAIL 1 will be 241901148045316 for ALL accounts and orgs.
Below is map of the path system property and the pathId. This is subject to change.

Expand for Contact Path details

Example of Email 1

{
"waitTime": 0,
"pathId": 241901148045316,
"value": "[email protected]",
"skipValidation": false
}
System Path NamepathIdSystem Path NamepathId
Phone 1241901148045319Email N/A-1
Phone 2241901148045320SMS 1241901148045324
Phone 3241901148045314SMS 2241901148045315
Phone 4219910915489799SMS N/A-1
Phone 5219910915489800One Way SMS219910915489808
Phone 6219910915489801Plain Text Email - 1 Way219910915489803
Phone N/A-1Plain Text Email - 2 Way219910915489794
Extension Phone 1241901148045321Fax 1219910915489795
Extension Phone 2241901148045322Fax 2219910915489797
Extension Phone 3241901148045323Fax 3219910915489796
Extension Phone 4241901148045313Fax N/A-1
Extension Phone 5219910915489802TTY 1241901148045326
Extension Phone N/A-1TTY 2219910915489804
E-Mail Address 1241901148045316TTY 3219910915489805
E-Mail Address 2241901148045317Numeric Pager219910915489807
E-Mail Address 3241901148045318TAP Pager219910915489806
Mobile Push Alert241901148045325Mobile Member App241901148045325

Location

  1. For Locations the street is required.
  2. If a Lat/Lon is not provided, the system will automatically generate it.
  3. If an invalid street address is given, city/state will be used to store the center of the city as the geolocation.
  4. ALL locations require a locationName.

To add a building, the locationId must be provided. See List Assets API.

Expand for Location examples

Examples:

{
    "locationName": "SNPP Address",
    "locationId": 8096807921909958
}

The address below will geocode.
{
    "locationName": "Work",
    "streetAddress": "None",
    "postalCode": "02452",
    "state": "Massachusetts",
    "country": "US",
    "city": "Burlington"
}

Topics/Subscriptions

Subscription are defined under the “topics” property of the contact object. Topics can be found out from the manager portal. For Weather subscription IDs, one subscription per contact must be created. Note that the Weather Topic IDs are different for different organizations.

Delivery Paths

Delivery paths are returned in the order of preference. See List Contact Paths to get pathIds

Using Name to Identify ID Feature

Some name fields can be used to identify ID. If both exist, the id is high priority.

recordTypeId and recordTypeName

Expand for recordTypeName examples

There is a contact record type:
id: 1533823015714817 name: Employee
Examples:

{
    "firstName": "F",
    "lastName": "L",
    "externalId": "001",
    "recordTypeId": 1533823015714817
}

Below request also work well.
{
    "firstName": "F",
    "lastName": "L",
    "externalId": "001",
    "recordTypeName": "Employee"
}

groups and groupsName

Expand for groupsName examples

There are some groups:
id: 1 name: group1
id: 2 name: group2
id: 3 name: group3
Examples:

{
    "firstName": "F",
    "lastName": "L",
    "externalId": "001",
    "recordTypeId": 1533823015714817,
    "groups": [
        1,
        2,
        3
    ]
}

Below request also work well.
{
    "firstName": "F",
    "lastName": "L",
    "externalId": "001",
    "recordTypeId": 1533823015714817,
    "groupsName": [
        "group1",
        "group2",
        "group3"
    ]
}

Contact Attributes: orgAttrId and name

Expand for Contact Attributes examples

There is a Contact Attribute:

{
    "id": 1509768514502692,
    "name": "attr1",
    "dataType": "STRING",
    "definedValues": [
        "option1",
        "option2",
        "option3"
    ],
    "displayFormat": "S"
}

Examples:

{
    "firstName": "F",
    "lastName": "L",
    "externalId": "001",
    "recordTypeId": 1533823015714817,
    "contactAttributes": [
        {
            "orgAttrId": 1509768514502692,
            "name": "attr1",
            "values": [
              "option1",
              "option2"
            ]
        }
    ]
}

Below request also work well.
{
    "firstName": "F",
    "lastName": "L",
    "externalId": "001",
    "recordTypeId": 1533823015714817,
    "contactAttributes": [
        {
            "name": "attr1",
            "values": [
              "option1",
              "option2"
            ]
        }
    ]
}

Contact Path: pathId and prompt

Expand for Contact Path examples

There is a phone contact path:

{
    "pathId": 241901148045319,
    "prompt": "phone"
}

Examples:

{
    "firstName": "F",
    "lastName": "L",
    "externalId": "001",
    "recordTypeId": 1533823015714817,
    "paths": [
        {
            "pathId": 241901148045319,
            "countryCode": "CN",
            "value": "17525889654"
        }
    ]
}

Below request also work well.
{
    "firstName": "F",
    "lastName": "L",
    "externalId": "001",
    "recordTypeId": 1533823015714817,
    "paths": [
        {
            "prompt": "phone",
            "countryCode": "CN",
            "value": "17525889654"
        }
    ]
}

Request body

PropertyDescription
pathAn array of delivery paths. The order specified will be the order of preference.
pathId: List Contact Paths
{ "pathId":"{List Contact Paths}", "countryCode": "{delivery path value}", "value": "{ISO country code}" }

For quietTimeFrames of path, if quietTimeFrames is present, timezoneId is required

1. days: it is a list, where 1 stands for Sunday, 2 stands for Monday, and so on, 7 is for Saturday. Say Monday and Friday are selected. In DB it is like [2,6]

2. fromHour/toHour: presents in 24-hour clock; for example, 23 is for 11PM

3. fromMin/toMin: from 0 to 59

Something special for the update,

1. If quietTimeFrames is none empty value, quietTimeFrames for the path will be updated with the value.

2. If quietTimeFrames is not present, quietTimeFrames for the path will not be updated. In DB, it keeps the settings with no change

3. If quietTimeFrames is not present, quietTimeFrames for the path will not be updated. In DB, it keeps the settings with no change.

Error Messages

statusmessage
300The externalId recordType not found in org.
401Missing Organization Id
404Missing Contact Id
Language
Credentials
URL
Click Try It! to start a request and see the response here!