Upload Custom Event

POST https://restapi.actonsoftware.com/api/1/customevents

This endpoint allows you to add a new custom event into the account.

Click here for more information on Custom Events.


Name Parameter
Data Type Description
Authorization: Header false Required String Insert your generated access token.
(Bearer {access token})
destination form false Required String Specify a unique name for the custom event.
firstrow form false Required String Does the first row of the source data contain a heading?
fieldseparator form false Required String Set field separator character
quotecharacter form false Required String Set field quote character
customeventaction form false Required String Set the event type of the custom event.
emailcolidx form false Required String Column index (zero-based) for email in the source file.
datecolidx form false Required String Column index (zero-based) for the date for the custom event in the source file.
titlecolidx form false Required String Column index (zero-based) for the event title for the custom event in the source file.
notecolidx form false Optional String Column index (zero-based) for an optional note from the source file.
titlecount form false Required String Set the number of new titles you expect to add from the source file. There's no need to count existing titles already within the custom touch event
dateformat form false Required string The date format used to parse the source file date column.
filename form false Optional String Specify the name of the file being attached.
form false Required file The file to upload (in CSV format).

Parameter Notes

dateformat Examples:

SLASH FORMATS: MM/dd/yyyy (01/25/2011) dd/MM/yyyy (25/01/2011) MM/dd/yy (01/25/2011) dd/MM/yy (01/25/11) yyyy/MM/dd (2011/01/25)

DASH FORMATS: MM-dd-yyyy (01-25-2011) dd-MM-yyyy (25-01-2011) MM-dd-yy (01-25-2011) dd-MM-yy (01-25-11) yyyy-MM-dd (2011-01-25)

TEXTUAL MONTH: dd MMM yyyy (25 Jan 2011) MMM dd yyyy (Jan 25 2011) dd MMMM yyyy (25 Jaunuary 2011) EEE, dd MMM yyyy (Tue, 25 Jan 2011) EEEE, dd MMMM yyyy (Tuesday, 25 January 2011)


  "jobId": "15937380",
  "status": "success"

Code Examples


curl -X POST https://restapi.actonsoftware.com/api/1/customevents -H "Authorization: Bearer 12345678-9abc-defg-hijk-lmnopqrs" -H 'Cache-Control: no-cache' -H 'Content-Type: multipart/form-data' -H 'cache-control: no-cache' -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' -F destination=TestCustomEvent -F fieldseparator=COMMA -F quotecharacter=NONE  -F firstrow=Y -F customeventaction=CUSTOM_GENERAL -F emailcolidx=2 -F datecolidx=3 -F titlecolidx=4 -F dateformat=MM/dd/yyyy -F filename=customEvent.csv -F notecolidx=5 -F titlecount=1 -F [email protected]/Users/john.doe/Documents/customEvent.csv

import requests

url = "https://restapi.actonsoftware.com/api/1/customevents"

headers = {
'Authorization': "Bearer 12cd5289-7561-3f5d-81e5-fc956fa04d65",
'cache-control': "no-cache"

data = {'destination': 'TestCustomEvent',
'fieldseparator': 'COMMA',
'quotecharacter': 'NONE',
'firstrow': 'Y',
'customeventaction': 'CUSTOM_GENERAL',
'emailcolidx': '2',
'datecolidx': '3',
'titlecolidx': '4',
'dateformat': 'MM/dd/yyyy',
'filename': 'customEvent.csv',
'notecolidx': '5',
'titlecount': '1'}

files = {'file':('customEvent.csv', open('customEvent.csv', 'rb'))}

response = requests.request("POST", url, headers=headers, data = data, files = files)