---
updatedAt: 2026-05-13T09:06:05.000Z
---

# createCase

Create a new case with interactions

# Details

## Responses and Response Schema

<details><summary><em>201 (Success)</em></summary><br>

<details><summary><em>Top-level Object</em></summary><br>

[block:parameters]
{
  "data": {
    "h-0": "Field Name",
    "h-1": "Type",
    "h-2": "Description",
    "0-0": "id*",
    "1-0": "number*",
    "2-0": "customerId*",
    "3-0": "title*",
    "4-0": "description*",
    "5-0": "url*",
    "6-0": "lastUpdated*",
    "7-0": "created*",
    "8-0": "status*",
    "9-0": "interactions",
    "9-1": "array[object]",
    "0-1": "string",
    "1-1": "string",
    "2-1": "string",
    "3-1": "string",
    "4-1": "string",
    "5-1": "string",
    "6-1": "string",
    "7-1": "string",
    "8-1": "string",
    "1-2": "The case number to display to Khoros Marketing Agents",
    "2-2": "The ID of the customer associated with this new case.",
    "3-2": "The title of the case.",
    "4-2": "The longer form description of the case.",
    "5-2": "The URI the agent can click on to see the case.",
    "6-2": "ISO8601 DateTime of when the case was last updated.",
    "7-2": "ISO8601 DateTime of when the case was created.",
    "8-2": "**Allowed Values** `open`, `closed`",
    "10-0": "customCasePropertyOne",
    "10-1": "string",
    "10-2": "An example of a custom field on the Case object. These will only be present if specified via the **/meta/object/case endpoint**.",
    "11-0": "customCasePropertyTwo",
    "11-1": "string",
    "11-2": "An example of a custom field on the Case object. These will only be present if specified via the **/meta/object/case endpoint**."
  },
  "cols": 3,
  "rows": 12
}
[/block]

</details>

<details><summary><em>Interactions Object</em></summary><br>

[block:parameters]
{
  "data": {
    "h-0": "Field Name",
    "h-1": "Type",
    "h-2": "Description",
    "0-0": "created*",
    "0-1": "string",
    "0-2": "The creation date of the interaction on the origin service.",
    "1-0": "body*",
    "1-1": "string",
    "1-2": "The text of the interaction.",
    "2-0": "linkUrl*",
    "2-1": "string",
    "2-2": "The direct link to the context on the origin service when available.",
    "3-0": "serviceId*",
    "3-1": "string",
    "3-2": "The social service the interaction originated.",
    "4-0": "service*",
    "4-1": "string",
    "4-2": "The social service the interaction originated.",
    "5-0": "contentType*",
    "5-1": "string",
    "5-2": "The type of content the interaction is on the origin service. Examples include: `post`, `comment`, etc."
  },
  "cols": 3,
  "rows": 6
}
[/block]

</details>

<details><summary><em>Author Object</em></summary><br>

[block:parameters]
{
  "data": {
    "h-0": "Field Name",
    "h-1": "Type",
    "h-2": "Descritpion",
    "0-0": "service*",
    "0-1": "string",
    "0-2": "The social service of the author.",
    "1-0": "serviceId*",
    "1-1": "string",
    "2-0": "handle*",
    "2-1": "string",
    "2-2": "The handle of the author on the origin service.",
    "3-0": "name*",
    "3-1": "string",
    "4-0": "brandOwned*",
    "4-1": "boolean",
    "4-2": "A flag that signals if the author belongs to an account added to the platform.",
    "1-2": "The id of the author on the origin service.",
    "3-2": "The screen name of the author on the origin service."
  },
  "cols": 3,
  "rows": 5
}
[/block]

</details></details>

<details><summary><em>400 (Generic Error)</em></summary><br>

[block:parameters]
{
  "data": {
    "h-0": "Field Name",
    "h-1": "Type",
    "h-2": "Description",
    "0-0": "fields",
    "0-1": "array[object]",
    "0-2": "",
    "2-0": "message",
    "2-1": "string",
    "2-2": "Message passable to the user.",
    "1-0": "error",
    "1-1": "string",
    "1-2": "Name of the error code."
  },
  "cols": 3,
  "rows": 3
}
[/block]

<details><summary><em>fields object</em></summary><br>

[block:parameters]
{
  "data": {
    "h-0": "Field Name",
    "h-1": "Type",
    "h-2": "Description",
    "0-0": "name*",
    "0-1": "string",
    "1-0": "errorMessage*",
    "1-1": "string"
  },
  "cols": 2,
  "rows": 2
}
[/block]

</details></details>

<details><summary><em>401 (Authentication Failure)</em></summary><br>
API key is invalid or has become de-authenticated
</details>

<details><summary><em>422</em></summary><br>

[block:parameters]
{
  "data": {
    "h-0": "Field Name",
    "h-1": "Type",
    "h-2": "Description",
    "0-0": "error*",
    "0-1": "string",
    "0-2": "Name of the error or code.",
    "1-0": "message*",
    "1-1": "string",
    "1-2": "Message passable to the user."
  },
  "cols": 3,
  "rows": 2
}
[/block]

<details><summary><em>fields object</em></summary><br>

[block:parameters]
{
  "data": {
    "h-0": "Field Name",
    "h-1": "Type",
    "h-2": "Description",
    "0-0": "name*",
    "0-1": "string",
    "1-0": "errorMessage*",
    "1-1": "string"
  },
  "cols": 2,
  "rows": 2
}
[/block]

</details></details>

<details><summary><em>500 (Unexpected Error)</em></summary><br>
Unexpected Error

[block:parameters]
{
  "data": {
    "h-0": "Field Name",
    "h-1": "Type",
    "h-2": "Description",
    "0-0": "error",
    "0-1": "string",
    "0-2": "Name of the error or code.",
    "1-0": "message",
    "1-1": "string",
    "1-2": "Message passable to the user."
  },
  "cols": 3,
  "rows": 2
}
[/block]

</details></details>

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "api-specifications",
    "version": "1.1"
  },
  "servers": [
    {
      "url": "https://{your-domain}.com",
      "variables": {
        "your-domain": {
          "default": "your-domain"
        }
      }
    }
  ],
  "security": [
    {}
  ],
  "paths": {
    "/case": {
      "post": {
        "summary": "createCase",
        "description": "Create a new case with interactions",
        "operationId": "createcase",
        "parameters": [
          {
            "name": "x-sf-user-email",
            "in": "header",
            "description": "The email id of the Khoros Marketing agent performing the action.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-sf-initiative",
            "in": "header",
            "description": "The id of the active Khoros Marketing initiative the user is in when performing the action. **Format:** int64",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "x-sf-company-id",
            "in": "header",
            "description": "The Khoros Marketing id of the company the user is in when making the request. **Format:** int64",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "customId",
                  "title"
                ],
                "properties": {
                  "customId": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "interactions": {
                    "type": "array",
                    "items": {
                      "properties": {
                        "created": {
                          "type": "string",
                          "description": "The creation date of the interaction on the origin service. **Format:** date-time"
                        },
                        "body": {
                          "type": "string",
                          "description": "The text of the interaction."
                        },
                        "linkUrl": {
                          "type": "string",
                          "description": "The direct link to the content on the origin service when available."
                        },
                        "serviceId": {
                          "type": "string",
                          "description": "The id of the content on the origin service."
                        },
                        "service": {
                          "type": "string",
                          "description": "The social service the interaction originated.",
                          "default": "facebook"
                        },
                        "contentType": {
                          "type": "string",
                          "description": "The type of content the interaction is on the origin service. Examples include: `post`, `comment`, etc.",
                          "default": "post"
                        },
                        "author": {
                          "type": "object",
                          "required": [
                            "service",
                            "serviceId",
                            "handle",
                            "name",
                            "brandOwned"
                          ],
                          "properties": {
                            "service": {
                              "type": "string",
                              "description": "The social service of the author.",
                              "default": "facebook"
                            },
                            "serviceId": {
                              "type": "string",
                              "description": "The id of the author on the origin service."
                            },
                            "handle": {
                              "type": "string",
                              "description": "The handle of the author on the origin service."
                            },
                            "name": {
                              "type": "string",
                              "description": "The screen name of the author on the origin service."
                            },
                            "brandOwned": {
                              "type": "boolean",
                              "description": "A flag that signals if the author belongs to an account added to the platform."
                            }
                          }
                        }
                      },
                      "required": [
                        "created",
                        "body",
                        "linkUrl",
                        "serviceId",
                        "service",
                        "contentType"
                      ],
                      "type": "object"
                    }
                  },
                  "customCasePropertyOne": {
                    "type": "string",
                    "description": "An example of a custom field on the Case object."
                  },
                  "customCasePropertyTwo": {
                    "type": "string",
                    "description": "An example of a custom field on the Case object."
                  }
                }
              },
              "examples": {
                "Request Example": {
                  "value": {
                    "customerId": "string",
                    "title": "string",
                    "interactions": [
                      {
                        "created": "string (date-time)",
                        "body": "string",
                        "linkUrl": "string",
                        "serviceId": "string",
                        "service": "string",
                        "contentType": "string",
                        "author": {
                          "service": "string",
                          "serviceId": "string",
                          "handle": "string",
                          "name": "string",
                          "brandOwned": true
                        }
                      }
                    ],
                    "customCasePropertyOne": "string",
                    "customCasePropertyTwo": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "201",
            "content": {
              "text/plain": {
                "examples": {
                  "Result": {
                    "value": "See Details for Schema"
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "text/plain": {
                "examples": {
                  "Result": {
                    "value": "See Details for Schema"
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "text/plain": {
                "examples": {
                  "Result": {
                    "value": "See Details for Schema"
                  }
                }
              }
            }
          },
          "422": {
            "description": "422",
            "content": {
              "text/plain": {
                "examples": {
                  "Result": {
                    "value": "See Details for Schema"
                  }
                }
              }
            }
          },
          "500": {
            "description": "500",
            "content": {
              "text/plain": {
                "examples": {
                  "Result": {
                    "value": "See Details for Schema"
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "security": []
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": false,
    "proxy-enabled": false
  },
  "x-readme-fauxas": true
}
```