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

# forkNewVersion

> Creates the next version of a destination as a copy of its latest version: same settings and endpoints, `version` one higher, state `NEW`. Returns the new version. Fails with `ConflictError` unless the latest version is `PUBLISHED`.



**mutation** `forkNewVersion(input: ForkNewVersionInput!): ForkNewVersionPayload!`

## Arguments

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

## Returns

`ForkNewVersionPayload!`

**`apiVersion`**: `ApiVersion`

---

**`errors`**: `[ForkNewVersionError!]`

## Examples

```graphql Mutation
mutation ForkNewVersion($input: ForkNewVersionInput!) {
  forkNewVersion(input: $input) {
    apiVersion {
      allowedOrigins
      applications {
        edges {
          __typename
        }
        nodes {
          __typename
        }
        pageInfo {
          __typename
        }
        totalCount
      }
      authentication
      cardDefinitions {
        edges {
          __typename
        }
        nodes {
          __typename
        }
        pageInfo {
          __typename
        }
        totalCount
      }
      clusters {
        edges {
          __typename
        }
        nodes {
          __typename
        }
        pageInfo {
          __typename
        }
      }
      createdAt
    }
    errors {
      __typename
      ... on GraphQlError {
        code
        details {
          __typename
        }
        message
      }
    }
  }
}
```

```json Variables
{
  "input": {
    "destinationId": "id"
  }
}
```

```json Response
{
  "data": {
    "forkNewVersion": {
      "apiVersion": {
        "allowedOrigins": [
          "value"
        ],
        "applications": {
          "edges": [
            {
              "__typename": "ApplicationsEdge"
            }
          ],
          "nodes": [
            {
              "__typename": "Application"
            }
          ],
          "pageInfo": {
            "__typename": "PageInfo"
          },
          "totalCount": 1
        },
        "authentication": "PROTECTED",
        "cardDefinitions": {
          "edges": [
            {
              "__typename": "CardDefinitionsEdge"
            }
          ],
          "nodes": [
            {
              "__typename": "CardDefinition"
            }
          ],
          "pageInfo": {
            "__typename": "PageInfo"
          },
          "totalCount": 1
        },
        "clusters": {
          "edges": [
            {
              "__typename": "ClustersEdge"
            }
          ],
          "nodes": [
            {
              "__typename": "Cluster"
            }
          ],
          "pageInfo": {
            "__typename": "PageInfo"
          }
        },
        "createdAt": "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.