Case creation API
Updated
Using this API, you can create a case within Sprinklr.
API Endpoint
https://api2.sprinklr.com/{{env}}/api/v2/case
Headers
API headers include the mandatory information you send along with the request URL and body. This information helps provide insights into request context and authorization credentials that, in turn, allows access to protected resources.
Key | Value | Description |
Authorization | Credential used by the API to authenticate a user with the server For generating authorization token, refer to Authorize section on the developer portal | |
Key | API key helps authenticate the application with the server For generating API key, refer to Getting Started guide | |
Content-Type | Content-Type is a representation header that determines the type of data (media/resource) present in the request body | |
Accept | Determines the acceptable response type from the server |
Request Parameters
Parameter | Required/Optional | Description | Type |
subject | Optional | The value of the subject field for this case | String |
description | Optional | Description of the case | String |
firstMessageId | Required | Message id for the first message associated to the case | String |
priority | Optional | The Urgency of the case with which case should be addressed | String |
caseType | Optional | The type of the case. e.g. Problem, Incident, Task | String |
externalCase | Optional | Object defining the schema for third party cases linked to universal case in Sprinklr. External case description table given below. | Object |
workflow | Required | Object describing the schema of partner level workflow in message/case. Workflow description table given below. | String, Integer |
contact | Optional | Describes the schema of contact in Case. Contact description table given below. | String |
dueDate | Optional | If case needs to be resolved within time limit then it has a due date. | Integer |
summary | Optional | Refers to the summary of the case | Integer |
queues | Optional | A list of queues to which to send the case. Queues are used to store cases based on like conditions that can be configured andautomated in the Rule Engine. You can think of queues as invisible folders that house and organise your cases. To fetch the queue ids, you can refer to Bootstrap Resources API documentation. | List[Long] |
External Case
Parameter | Required/Optional | Description | Type |
id | Case id. | String | |
caseNumber | case number of the case | Integer | |
channelType | channel type. e.g salesforce, zendesk, rightnow | String | |
permalink | link to the case on channel | String | |
createdTime | created time of the case on channel | Integer | |
modifiedTime | last modified time of the case on channel | Integer |
workflow - object Description Table
Parameter | Sub-Parameter | Required/Optional | Description | Type |
assignment | Optional | Object containing the case assignment details | Object | |
assigneeId | Required | The user Id of the user you want to assign the case to | Integer | |
assigneeType | Optional | Refers to the assignee type | String | |
assignedById | Optional | The user id of the user who assigned the case | Integer | |
assignmentTime | Optional | Refers to the time at which the case was assigned | Epoch | |
customProperties | Required | Refers to the custom properties of the case | Map < String>, List < String > |
Contact
Parameter | Required/Optional | Description | Type |
id | Required | Unique identifier of contact | string |
name | Optional | Name of the contact | string |
Example - Request
curl -X POST \ 'https://api2.sprinklr.com/{{env}}/api/v2/case' \ -H 'Authorization: Bearer {{Enter your Access Token}}' \ -H 'Key: {{Enter your API KEY}}' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -d ' { "subject": "API2.0 Case creation", "description": "This case is created with API2.012", "firstMessageId": "ACCOUNT_600001824_1582817880350_TWITTER_2_1233053677281304578", "priority": "high", "summary": "Urgent Case", "caseType": "Incident", "dueDate": 0, "workflow":{ "customProperties":{ "spr_uc_status":["New"], "spr_uc_priority":["High"], "spr_uc_type":["Complaint"] }, "queues": [] } }' |
Example - Response
{ "subject": "API2.0 Case creation", "description": "This case is created with API2.012", "firstMessageId": "ACCOUNT_600001824_1582817880350_TWITTER_2_1233053677281304578", "priority": "high", "summary": "Urgent Case", "caseType": "Incident", "dueDate": 0, "workflow":{ "customProperties":{ "spr_uc_status":["New"], "spr_uc_priority":["High"], "spr_uc_type":["Complaint"] }, "queues": [] } }' |
Response Parameters
Parameter | Description | Type |
id | Refers to the unique identifier for the case created | String |
caseNumber | Refers to the case number assigned to the case created | Integer |
subject | Refers to the subject of the issue for which the case has been created | String |
description | Refers to the description of the issue highlighted in the case | String |
version | Refers to the version number of the case | Integer |
status | Refers to the status of the case. Example: New, Open, Closed, etc. | String |
priority | The Urgency of the case with which case should be addressed | String |
caseType | The type of the case. e.g. Problem, Incident, Task | String |
externalCase | Object describing the schema for third party cases linked to universal case in Sprinklr. External case description table given below. | String, Integer |
workflow | Object describing the schema of partner level workflow in message/case. Workflow description table given below. | String, Integer |
queues | A list of queues to which to case is added. Queues are used to store cases based on like conditions that can be configured and automated in the Rule Engine. | List [Long] |
contact | Describes the schema of contact in Case. Contact description table given below. | String |
dueDate | If case needs to be resolved within time limit then it has a due date. | Integer |
summary | Case summary | Integer |
createdTime | created time of the case | Integer |
modifiedTime | last modified time of the case | Integer |
firstMessageId | message key for the first messages associated to the case. | String |
latestProfileMessageAssociatedTime | The last profile level message associated with the case. This could be the last message in the conversation. | Epoch |
firstMessageAssociatedTime | The time at which the first message was associated with the case | Epoch |
latestMessageAssociatedTime | The latest time at which the message was associated with the case | Epoch |
totalProcessingClockTime | Whenever the agent opens the case, the processing clock time starts. This stores the total time taken from opening the case to closing it. | Epoch |
allEngagedUsersList | List of users (corresponding userIds) involved in resolving the case | List [String] |
External Case
Parameter | Description | Type |
id | Case id | String |
caseNumber | case number of the case | Integer |
channelType | channel type. e.g salesforce, zendesk, rightnow | String |
permalink | link to the case on channel | String |
createdTime | created time of the case on channel | Integer |
modifiedTime | last modified time of the case on channel | Integer |
Contact
Parameter | Description | Type |
id | Unique identifier of contact | string |
name | Name of the contact | string |
Need assistance? Fill out our feedback form and we’ll get back to you.