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

# createCardDefinition

> Creates a card definition as a `DRAFT`, with its card properties as pending changes. Nothing is indexed yet: `updateCardDefinition` with `status: UPDATING` applies the changes, and the card definition turns `ACTIVE` when indexing finishes. An id that's taken, by an archived card definition too, fails with `ConflictError`.



**mutation** `createCardDefinition(input: CreateCardDefinitionInput!): CreateCardDefinitionPayload!`

## Arguments

**`input`**: `CreateCardDefinitionInput!` (required)

## Returns

`CreateCardDefinitionPayload!`

**`cardDefinition`**: `CardDefinition`

---

**`errors`**: `[CreateCardDefinitionError!]`

## Examples

```graphql Mutation
mutation CreateCardDefinition($input: CreateCardDefinitionInput!) {
  createCardDefinition(input: $input) {
    cardDefinition {
      activationStatus {
        status
        steps {
          __typename
        }
      }
      activePropertySet {
        key
        properties {
          __typename
        }
        propertyIds
      }
      allowsEnrichment
      cardsCount
      createdAt
      createdByUser
    }
    errors {
      __typename
      ... on GraphQlError {
        code
        details {
          __typename
        }
        message
      }
    }
  }
}
```

```json Variables
{
  "input": {
    "description": "string",
    "displayOptions": [
      {
        "key": "string"
      }
    ],
    "id": "string",
    "modifications": [
      {
        "action": "ADD",
        "id": "string"
      }
    ],
    "name": "string",
    "tags": [
      "string"
    ]
  }
}
```

```json Response
{
  "data": {
    "createCardDefinition": {
      "cardDefinition": {
        "activationStatus": {
          "status": "RUNNING",
          "steps": [
            {
              "__typename": "KeyValuePairOfStringAndWorkflowStep"
            }
          ]
        },
        "activePropertySet": {
          "key": "string",
          "properties": [
            {
              "__typename": "CardPropertyDefinition"
            }
          ],
          "propertyIds": [
            "string"
          ]
        },
        "allowsEnrichment": true,
        "cardsCount": "value",
        "createdAt": "value",
        "createdByUser": "value"
      },
      "errors": [
        {
          "__typename": "GraphQlError",
          "code": "string",
          "details": [
            {
              "__typename": "KeyValuePairOfStringAndString"
            }
          ],
          "message": "string"
        }
      ]
    }
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.