POST https://api.actonsoftware.com/api/1/list
This endpoint allows you to upload a file to create a new list in the account
Customers wanting to access our API via our gateway in the EU can use this link:
POST https://api-eu.actonsoftware.com/api/1/list
Parameters
Name | Parameter Type |
Allow Multiple |
Required/ Optional |
Data Type | Description |
---|---|---|---|---|---|
Authorization: | Header | false | required | String | Insert your generated access token. ("Bearer {access token}") |
listname | form | false | required | string | Specify a unique name for the list. |
foldername | form | false | optional | string | Specify the folder name to store the list. Lists are stored in the default folder by default. |
headings | form | false | Optional | String | Does the first row of the source data contain a heading? ("Y","N") |
fieldseparator | form | false | Optional | String | Set field separator character ("COMMA", "SEMICOLON" ) |
quotecharacter | form | false | required | String | Set field quote character ("NONE", "SINGLE_QUOTE", "DOUBLE_QUOTE") |
uploadspecs | form | false | required | String | A JSON formatted object to describe the structure of the list that is being created. |
Body | false | optional | File | The file to upload (in CSV format). |
Parameter Notes
uploadspecs
Please see the uploadspecs page to learn how to format your uploadspecs.
Response
{ "status": "success", "message": "Upload completed", "jobId": "15959711" }
Code Examples
cURL
curl -X POST https://api.actonsoftware.com/api/1/list -H 'Authorization: Bearer 12345678-9abc-defg-hijk-lmnopqrs' -H 'Content-Type: multipart/form-data' -F 'listname=Example' -F 'headings=Y' -F 'fieldseperator=COMMA' -F 'quotecharacter=NONE' -F 'uploadspecs=[{"columnHeading": "E-mail Address", "ignoreColumn": "N", "columnType": "EMAIL", "columnIndex": "0"}, {"columnHeading": "First Name", "ignoreColumn": "N", "columnType": "FIRSTNAME", "columnIndex": "1"}, {"columnHeading": "Last Name", "ignoreColumn": "N", "columnType": "LASTNAME", "columnIndex": "2"},{"columnHeading": "Company", "ignoreColumn": "N", "columnType": "COMPANY", "columnIndex": "3"}]' -F file=@/Users/john.doe/Documents/exampleList.csv