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

# Create a run

> Create a run from a procedure using the ION GraphQL API.

## Create a run

The following mutation creates a run from a procedure:

```graphql theme={null}
mutation CreateRun($input: CreateRunInput!) {
    createRun(input: $input) {
        run {
            id title procedureId createdById
            dueDate assignedToId description
            partInventory {
                serialNumber
            }
        }
    }
}
```

Use these query variables:

```json theme={null}
{
    "input": {
        "title": "run title",
        "procedureId": 1,
        "dueDate": "2021-09-28T16:57:37",
        "partInventoryId": 2
    }
}
```

## Let ION generate the title

Instead of sending a `title`, you can have ION build one from the organization's run title template. Set `autogenerateTitle` to `true` and omit `title`. Sending both is rejected.

```json theme={null}
{
    "input": {
        "autogenerateTitle": true,
        "procedureId": 1,
        "dueDate": "2021-09-28T16:57:37",
        "partInventoryId": 2
    }
}
```

<Note>
  When your organization has **Enforce run title template** turned on in **Settings > Production > Runs**, ION always generates the title and rejects a request that sends `title`. Omit `title` from both the mutation and the query variables, or set `bypassEnforceRunTitle` to `true` to send your own title anyway. For the template itself, see [Configure run enforcement](/administration/production-settings/configure-run-enforcement).
</Note>
