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

# createDestination

> Creates a destination with no versions; add the first one with `createApiVersion`. If an archived destination has the same `safeName`, it's restored with these settings instead. Fails with `ConflictError` when an active destination has that `safeName`, and with `ValidationError` on invalid input.



**mutation** `createDestination(input: CreateDestinationInput!): CreateDestinationPayload!`

## Arguments

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

## Returns

`CreateDestinationPayload!`

**`destination`**: `Destination`

---

**`errors`**: `[CreateDestinationError!]`

## Examples

```graphql Mutation
mutation CreateDestination($input: CreateDestinationInput!) {
  createDestination(input: $input) {
    destination {
      compatibilityMode
      createdAt
      createdBy
      defaultLanguage
      description
      displayName
    }
    errors {
      __typename
      ... on GraphQlError {
        code
        details {
          __typename
        }
        message
      }
    }
  }
}
```

```json Variables
{
  "input": {
    "description": "string",
    "displayName": "string",
    "safeName": "string",
    "tags": [
      "string"
    ]
  }
}
```

```json Response
{
  "data": {
    "createDestination": {
      "destination": {
        "compatibilityMode": "V1",
        "createdAt": "value",
        "createdBy": "value",
        "defaultLanguage": "string",
        "description": "string",
        "displayName": "string"
      },
      "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.