Create a Custom Activity Type

This API will create a new custom activity type. Only ActivityEventName is mandatory in the request body.

While creating Activity type, you can create up to 50 custom fields associated with the activities. The schema name of these fields is from mx_Custom_1 to mx_Custom_50.

API URL

POST
https://{host}/v2/ProspectActivity.svc/CreateType?accessKey=AccessKey&secretKey=SecretKey
Copy URL

Request

JSON Body/Payload

Content-Type: application/json

{
    "ActivityEventName": "New Custom Activity Type",
    "Score": 5,
    "Description": "Activity type description",
    "Direction": 0,
    "TrackLocation": 1,
    "AllowAttachments": 1,
    "ShowInActivityGrid": 1,
    "CanDeleteActivity": false,
    "Fields": [
        {
            "SchemaName": "mx_Custom_1",
            "DisplayName": "Custom 1",
            "Value": null,
            "DataType": "String",
            "IsMandatory": false,
            "ShowInForm": false,
            "Sequence": 1,
            "OptionSet": null
        },
        {
            "SchemaName": "mx_Custom_2",
            "DisplayName": "Custom 2",
            "Value": null,
            "DataType": "String",
            "IsMandatory": false,
            "ShowInForm": false,
            "Sequence": 2,
            "OptionSet": null
        },
        {
            "SchemaName": "mx_Custom_3",
            "DisplayName": "Custom 3",
            "Value": null,
            "DataType": "String",
            "IsMandatory": false,
            "ShowInForm": false,
            "Sequence": 3,
            "OptionSet": null
        }
    ]
}

JSON Properties

Parameter Description
ActivityEventName

Name or label of the activity.

Score

Every activity can have a numerical score. It can be -ve, zero or +ve. When the activity is posted to a lead, this score gets added to the overall lead and engagement scores.

Description

Activity description.

Direction

Use ‘1’ as direction for an outbound activity and ‘0’ for an inbound activity. The default value is 0.

TrackLocation

Tracks the location the activity was created from (for mobile app users).

  • Pass “1” to track the location where the activity was created from.
  • Pass “0” if you don’t want to track the location.
AllowAttachments

Allows attachments to be uploaded for the activity (for mobile app users).

  • Pass “1” to enable the feature.
  • Pass “0” to disable it.
ShowInActivityGrid

Shows the activity type in the grid on the Manage Activities page.

  • Pass “1” to display the activity.
  • Pass “0” if you don’t want it displayed.
CanDeleteActivity

Whether the activity can be deleted. The default value is false.

Fields

Create multiple activity fields by passing their schema names, data-types, values, etc.

Response

200 OK

Content-Type: application/json

{
    "Status": "Success",
    "Message": {
        "Id": "206"
    }
}

HTTP Response Code

Code Description
200 OK

This is the status code for successful API call.

401 Unauthorized

The API call was made with invalid access credentials. Check your AccessKey and SecretKey.

400 Bad Request

The message body on the request is not as per API specification. Make sure that content type is set to “application/json” and the JSON body has correct attribute names and structure.

404 Not Found

The API could not be found. Please check the API signature.

429 Too Many Requests

API calls exceeded the limit of 25 in 5 second(s)

500 Internal Server Error

The API called failed. There could be many reasons for it. Check the exception message to get more details.