# createShortUrl

> Required permission: LabelWrite

Source: https://docs.gastrogate.io/docs/api/mutations/createShortUrl

```graphql
createShortUrl(
  whiteLabelId: ID!
  input: ShortUrlInput!
): ShortUrl
```

## Arguments

| Name | Type | Description |
| --- | --- | --- |
| `whiteLabelId` | [`ID`](https://docs.gastrogate.io/docs/api/types/ID.md)! |  |
| `input` | [`ShortUrlInput`](https://docs.gastrogate.io/docs/api/types/ShortUrlInput.md)! |  |

## Returns

[`ShortUrl`](https://docs.gastrogate.io/docs/api/types/ShortUrl.md)

## Example

```graphql
mutation CreateShortUrl($whiteLabelId: ID!, $input: ShortUrlInput!) {
  createShortUrl(whiteLabelId: $whiteLabelId, input: $input) {
    smartLink
    target
    url
  }
}
```

```bash
curl https://api.thelocoapp.com/graphql \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $LOCO_API_KEY" \
  -d '{"query": "mutation { createShortUrl(...) { __typename } }"}'
```
