LeadSquared Developer Centre


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.



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


Content-Type: application/json
JSON Body/Payload Icon
    "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

Request Parameters

Parameter Description

Name or label of the activity.


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.


Activity description.


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


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.

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

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

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.

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


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


200 OK
Content-Type: application/json
    "Status": "Success",
    "Message": {
        "Id": "206"

HTTP Response Codes

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.

On this page

© 2022 by MarketXpander Services Pvt Ltd. All Rights Reserved.