API reference

shortUrl

The shortUrl query. Returns ShortUrl.

graphql
shortUrl(
  code: String!
): ShortUrl

Arguments

Name Type Description
code String!

Returns

ShortUrl

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 } }"}'