Skip to main content

shortUrl

Requires at least one of the permissions marketing:link:read, marketing:link:write or settings:integration:read.

Returns one short link of your organization, by its ID or its code. Fails if it does not exist. Needs the marketing links read or write permission, or the integration settings read permission.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

query ShortUrl($idOrCode: String!) {
shortUrl(idOrCode: $idOrCode) {
id
shortCode
title
createdAt
clickCount
createdBy
}
}

Variables:

{
"idOrCode": "string"
}

Response:

{
"data": {
"shortUrl": {
"id": "string",
"shortCode": "string",
"title": "string",
"createdAt": "2025-01-15T00:00:00Z",
"clickCount": 0,
"createdBy": "string"
}
}
}
shortUrl(
idOrCode: String!
): ShortUrlEntity!

Arguments​

shortUrl.idOrCode ● String! non-null scalar​

The ID, the short code or the custom alias of the short link.

Type​

ShortUrlEntity object​

A short link.