POST /sms/v1/contacts/queueImport/{id}

Overview 

Queues a contact import.

URL Parameters 

NameTypeDescription
listIdstringRequiredthe list id

JSON Parameters 

NameTypeDescription
shortCodestringThe short code
keywordstringThe keyword
sendEmailNotificationbooleanSend email notification
emailAddressstringEmail address the notification goes to
importMappingTypestringField mapping type
fileNamestringThe name of the file, including extensions
fileTypestringThe only type supported is csv
isFirstRowHeaderbooleanFlag indicating whether or not the first row is the header
fieldMapsarrayList of field maps includes destination, ordinal, and source

Usage 

Example Request

1Host: https://YOUR_SUBDOMAIN.rest.marketingcloudapis.com
2POST /sms/v1/contacts/queueImport/UEhwdktFWXpFZUs3Z3hRUW45R2dBQTo2Mzow
3Content-Type: application/json
4Authorization: Bearer YOUR_ACCESS_TOKEN
5
6{
7    "ListId": "UEhwdktFWXpFZUs3Z3hRUW45R2dBQTo2Mzow",
8    "ShortCode": "90913",
9    "Keyword": "WELCOME",
10    "SendEmailNotification": "true",
11    "EmailAddress": "example@example.com",
12    "ImportMappingType": "MapByOrdinal",
13    "FileName": "testdata.csv",
14    "FileType": "csv",
15    "IsFirstRowHeader": "true",
16    "FieldMaps": [
17        {
18            "destination": "_MobileNumber",
19            "ordinal": 2,
20            "source": "mobile number"
21        },
22        {
23            "destination": "_CountryCode",
24            "ordinal": 3,
25            "source": "locale"
26        },
27        {
28            "destination": "_SubscriberKey",
29            "ordinal": 1,
30            "source": "subscriber key"
31        }
32    ]
33}

Example Response

1HTTP/1.1 202 Accepted
2{
3    "tokenId": "NzY2MTU6NDI6MA"
4}

DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!