# shortUrl

> The `shortUrl` query. Returns `ShortUrl`.

Source: https://docs.gastrogate.io/docs/api/queries/shortUrl

```graphql
shortUrl(
  code: String!
): ShortUrl
```

## Arguments

| Name | Type | Description |
| --- | --- | --- |
| `code` | [`String`](https://docs.gastrogate.io/docs/api/types/String.md)! |  |

## Returns

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

## Example

```graphql
query ShortUrl($code: String!) {
  shortUrl(code: $code) {
    smartLink
    target
    url
  }
}
```

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