# createTestCase Mutation

Create a new TestCase.

Access is permitted when any of the following condition(s) are met: 1. The signed-in User has any of the following permissions for the associated Organization: \[org\_manage\_integrations]. 2. The signed-in User has any of the following permissions for the access function context object 'integration\_Customer': \[customer\_admin\_integration\_permissions, customer\_manage\_integrations].

## Input fields ([CreateTestCaseInput!](https://prismatic.io/docs/api/schema/input_object/CreateTestCaseInput.md))[​](#input-fields-createtestcaseinput "Direct link to input-fields-createtestcaseinput")

| Argument           | Type                                                               | Description                                                 |
| ------------------ | ------------------------------------------------------------------ | ----------------------------------------------------------- |
| `integration`      | [`ID!`](https://prismatic.io/docs/api/schema/scalar/ID.md)         | The Integration this TestCase belongs to.                   |
| `name`             | [`String!`](https://prismatic.io/docs/api/schema/scalar/String.md) | The name of the TestCase.                                   |
| `contentType`      | [`String`](https://prismatic.io/docs/api/schema/scalar/String.md)  | Content type of the test payload.                           |
| `payload`          | [`String`](https://prismatic.io/docs/api/schema/scalar/String.md)  | Test step payload data.                                     |
| `headers`          | [`String`](https://prismatic.io/docs/api/schema/scalar/String.md)  | Test headers as key/value pairs.                            |
| `result`           | [`String`](https://prismatic.io/docs/api/schema/scalar/String.md)  | Test step result data.                                      |
| `clientMutationId` | [`String`](https://prismatic.io/docs/api/schema/scalar/String.md)  | A unique identifier for the client performing the mutation. |

## Return fields ([CreateTestCasePayload](https://prismatic.io/docs/api/schema/object/CreateTestCasePayload.md))[​](#return-fields-createtestcasepayload "Direct link to return-fields-createtestcasepayload")

###### **clientMutationId** ([String](https://prismatic.io/docs/api/schema/scalar/String.md))[​](#clientmutationid-string "Direct link to clientmutationid-string")

###### **errors** ([\[ErrorType!\]!](https://prismatic.io/docs/api/schema/object/ErrorType.md))[​](#errors-errortype "Direct link to errors-errortype")

###### **testCase** ([TestCase](https://prismatic.io/docs/api/schema/object/TestCase.md))[​](#testcase-testcase "Direct link to testcase-testcase")
