> ## 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.

# updateConversionPreset

> Replaces a conversion preset's display name and parameters and returns the preset. New parameters raise `version` by one and move the sources that carry the preset's conversion property to it; a display name change alone keeps the version. Expected failures come back in the payload's `errors` list, not as top-level GraphQL errors, each with a `code` naming the failure: `NotFoundError` for an unknown or deleted preset, and `ValidationError` for an invalid display name or parameters. A malformed `aspectRatio` or `background` fails the whole request instead (see `ConversionParametersInput`). When the sources can't be moved, the preset stays unchanged.



**mutation** `updateConversionPreset(input: UpdateConversionPresetInput!): UpdateConversionPresetPayload!`

## Arguments

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

## Returns

`UpdateConversionPresetPayload!`

**`conversionPreset`**: `ConversionPreset`

---

**`errors`**: `[UpdateConversionPresetError!]`

## Examples

```graphql Mutation
mutation UpdateConversionPreset($input: UpdateConversionPresetInput!) {
  updateConversionPreset(input: $input) {
    conversionPreset {
      createdAt
      displayName
      id
      parameters {
        aspectRatio
        background
        mode
        outputFormat
        paddingPercent
        quality
      }
      presetId
      updatedAt
    }
    errors {
      __typename
      ... on GraphQlError {
        code
        details {
          __typename
        }
        message
      }
    }
  }
}
```

```json Variables
{
  "input": {
    "displayName": "string",
    "id": "id",
    "parameters": {
      "aspectRatio": "string",
      "mode": "FIT",
      "outputFormat": "JPG",
      "quality": 1,
      "targetSize": 1
    }
  }
}
```

```json Response
{
  "data": {
    "updateConversionPreset": {
      "conversionPreset": {
        "createdAt": "value",
        "displayName": "string",
        "id": "id",
        "parameters": {
          "aspectRatio": "string",
          "background": "string",
          "mode": "FIT",
          "outputFormat": "JPG",
          "paddingPercent": 1,
          "quality": 1
        },
        "presetId": "string",
        "updatedAt": "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.