Actualizar enlace en Dub, con una API

Cambia un enlace corto; solo cambian los campos enviados. Un nuevo domain o key cambia el propio enlace corto, y archived en true oculta el enlace de Listar enlaces.

Identificador
dub_update_link

La llamada

POST https://connect.reportei.com/api/tools/dub_update_link/execute
Authorization: Bearer <merchant token>
x-customer-token: <customer token>
Content-Type: application/json
Accept: application/json

{
  "customer_toolkit": "<connection UUID>",
  "arguments": {
    "linkId": "<linkId>"
  }
}

Tu sistema envía el id de la conexión de tu cliente y los argumentos de la tool. Los headers son los mismos de toda la API de Connect: el token de tu producto y el token de tu cliente.

Parámetros

Las descripciones de los parámetros siguen la documentación oficial de la app, en inglés.

ParámetroTipoObligatorioDescripción
linkIdstringSíId of the link, from List links, Get link or Create link.
urlstringNoNew destination URL.
domainstringNoDomain of the short link, without protocol, from List domains.
keystringNoSlug of the short link, the part after the domain.
archivedbooleanNotrue archives the link, false restores it.
tagIdsarrayNoIds of all the tags of the link, from List tags or Create tag.
folderIdstringNoId of the folder of the link, from List folders.
commentsstringNoInternal notes about the link.
utm_sourcestringNoUTM source added to the destination URL, replacing the one in it.
utm_mediumstringNoUTM medium added to the destination URL, replacing the one in it.
utm_campaignstringNoUTM campaign added to the destination URL, replacing the one in it.
utm_termstringNoUTM term added to the destination URL, replacing the one in it.
utm_contentstringNoUTM content added to the destination URL, replacing the one in it.
trackConversionbooleanNotrue tracks leads and sales of the link. The workspace needs conversion tracking set up.
expiresAtstringNoWhen the link expires.
expiredUrlstringNoWhere the link sends visitors after it expires.
proxybooleanNotrue shows the custom preview of title, description and image when the link is shared.
titlestringNoTitle of the custom preview. Used when proxy is true.
descriptionstringNoDescription of the custom preview. Used when proxy is true.
imagestringNoURL of the image of the custom preview. Used when proxy is true.

Conexiones posibles

Tu cliente conecta su cuenta de Dub una sola vez, con uno de los modos de abajo. La misma conexión sirve para todas las tools del toolkit.

OAuth con la app de tu producto

Registras la app OAuth de tu producto una sola vez, con POST /api/merchants/credentials/dub, y tu cliente autoriza la cuenta en una pantalla de consentimiento. Connect renueva el token cuando está por vencer.

La respuesta

Si la llamada tiene éxito, Connect conserva el status y el cuerpo de la respuesta de la app. Los errores HTTP devueltos por la app usan el objeto {error, api_error}; la autenticación o validación pueden fallar antes de la ejecución. El header X-Toolkit-Execution-Id identifica la ejecución registrada, disponible en GET /api/tools/executions/{uuid}.

Lista para agentes de IA

El input de esta tool es un JSON Schema, disponible en GET /api/tools/dub_update_link. Se convierte en la definición de tool de tu agente sin conversión.

Otras tools de Dub

Ver las 10 tools

Toolkits de la misma categoría

Ver los 100 toolkits

Mira Connect aplicado a tu producto.

Pruébalo durante 15 días sin tarjeta, o cuéntale tu caso a nuestro equipo.