> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Case

> This endpoint updates a cases

### Body

<ParamField body="id" type="string">
  This is the ID of the case to update.
</ParamField>

### Response

<ResponseField name="id" type="string">
  This is the id of the case
</ResponseField>

<ResponseField name="caseName" type="string">
  This is the name of the case
</ResponseField>

<ResponseField name="description" type="string">
  This is the description of the case
</ResponseField>

<ResponseField name="caseNumber" type="string">
  This is the number of the case
</ResponseField>

<ResponseField name="caseStatus" type="string">
  This is the status of the case
</ResponseField>

<ResponseField name="priority" type="string">
  This is the priority of the case
</ResponseField>

<ResponseField name="submitter" type="string">
  This is the submitter of the case
</ResponseField>

<ResponseField name="resolver" type="string">
  This is the resolver of the case
</ResponseField>

<ResponseField name="createdDate" type="string">
  This is the date the case was created
</ResponseField>

<ResponseField name="updatedDate" type="string">
  This is the date the case was updated
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --location --request PUT 'https://api.stateset.com/v1/case' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Token <token>' \
  --data-raw '{
      "id": ""
  }'
  ```

  ```graphQL GraphQL theme={null}

                 mutation (
                  $id: String
                  $casex: cases_set_input!
                ) {
                  update_cases (
                  where: { id : { _eq: $id }}
                  _set: $casex
                  ) {
                    returning {
                        id
                        caseName
                        caseNumber
                        caseStatus
                        description
                        priority
                        resolver
                        submitter
                    }
                  }
                }
  ```

  ```javascript Node.js theme={null}

  const created = await stateset.case.update({
    id: "",
  });

  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
      "data": {
          "update_cases": {
          "returning": [
              {
              "id": "0x0",
              "caseName": "Case Name",
              "caseNumber": "Case Number",
              "description": "Case Description",
              "caseStatus": "Case Status",
              "priority": "Case Priority",
              "submitter": "Submitter",
              "resolver": "Resolver"
              }
          ]
          }
      }

  }
  ```
</ResponseExample>
