Create a Team
Create a new team in your LeadSquared account. It is mandatory to pass the “Name” parameter. All other parameters are optional.
API URL
Request
Content-Type: application/json{ "Name": "India Sales Team", "Description": "Indian Sales Team", "Sequence": 0, "ParentCode": 0, "WorkdayTemplateCode": 0, "HolidayCalendarCode": 0, "SmartViewCode": 0, "DashboardCodes": [ 1, 2 ], "DefaultDashboardCode": 1 }
Request Parameters
Parameter | Description |
---|---|
Name | Enter the name of the team. This parameter is mandatory. |
Description | Enter a description of the team. |
Sequence | Decides the position of the team under the parent team. Note: The value passed cannot be less than 0. It also cannot be more than the maximum sequence in the node + 1. |
ParentCode | Lets you assign the team to a parent team. The code is available on the teams grid (Navigate to My Profile>Settings>Users and Permissions>Teams) Note: If you don’t pass this parameter, the new team will be assigned to the root team in your account. |
WorkDayTemplateCode | Assigns a work day template to the team. The code is available on the work day template grid (Navigate to My Profile>Settings>Users and Permissions>Work Day Templates) Note: If you don’t pass this parameter, the new team will inherit the work day template assigned to the parent team. |
HolidayCalendarCode | Assigns a holiday calendar to the team. The code is available on the holiday calendar grid (Navigate to My Profile>Settings>Users and Permissions>Holiday Calendar) Note: If you don’t pass this parameter, the new team will inherit the holiday calendar assigned to the parent team. |
SmartViewCode | Assigns a Smart View to the team. The code is available on the smart views grid (Navigate to My Profile>Settings>Customization>Smart Views) Note: If you don’t pass this parameter, the new team will inherit the smart views assigned to the parent team. |
DashboardCodes | Assigns array of dashboards to teams. To find the dashboard code, navigate to My Profile>Settings>Analytics>Dashboards. Or refer to Get Teams API. |
DefaultDashboardCode | Specify a default dashboard for your team from the array of dashboards passed in the “DashboardCodes” parameter. |
Response
{ "Status":"Success", "Message":{ "Id":"3acee002-ee4f-11e9-aebf-02b00a4d022c", "IsSuccessful":true, "Code":8 } }
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. |