Skip to main content

updateShortUrl

Requires permission marketing:link:write.

Changes a short link's title, description or active state. A link that is inactive or expired stops redirecting. Needs the marketing link write 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:

mutation UpdateShortUrl($id: String!) {
updateShortUrl(id: $id) {
id
shortCode
title
createdAt
clickCount
createdBy
}
}

Variables:

{
"id": "string"
}

Response:

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

Arguments​

updateShortUrl.description ● String scalar​

The new description. Omit it to leave the description unchanged.

updateShortUrl.id ● String! non-null scalar​

The ID of the short link.

updateShortUrl.isActive ● Boolean scalar​

False to stop the link redirecting, true to turn it back on. Omit it to leave it unchanged.

updateShortUrl.title ● String scalar​

The new title. Omit it to leave the title unchanged.

Type​

ShortUrlEntity object​

A short link.