API reference
createShortUrl
Required permission: LabelWrite
createShortUrl(
whiteLabelId: ID!
input: ShortUrlInput!
): ShortUrlArguments
| Name | Type | Description |
|---|---|---|
whiteLabelId |
ID! |
|
input |
ShortUrlInput! |
Returns
Example
mutation CreateShortUrl($whiteLabelId: ID!, $input: ShortUrlInput!) {
createShortUrl(whiteLabelId: $whiteLabelId, input: $input) {
smartLink
target
url
}
}curl https://api.thelocoapp.com/graphql \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $LOCO_API_KEY" \
-d '{"query": "mutation { createShortUrl(...) { __typename } }"}'