Enlaces

Notes
Nivel experto
The API key should be sent as a Bearer token in the Authorization header of the request. Get your API key.
Lista

Punto final de API:

GET
https://corta.es/api/v1/links

Ejemplo de solicitud:

curl --location --request GET 'https://corta.es/api/v1/links' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
Parameter
Tipo
Descripción
search
opcional string
La consulta de búsqueda.
search_by
opcional string
Buscar por. Los valores posibles son: title for Título, alias for Alias, url for URL. Valor predeterminado: title.
status
opcional integer
Filtrar por estado. Los valores posibles son: 0 for Todos, 1 for Activo, 2 for Expirado, 3 for Deshabilitado. Valor predeterminado: 0.
space_id
opcional integer
Filtrar por ID de espacio.
domain_id
opcional integer
Filtrar por ID de dominio.
pixel_id
opcional integer
Filtrar por ID de píxel.
sort_by
opcional string
Ordenar por. Los valores posibles son: id for Fecha de creación, clicks for Clics, title for Título, alias for Alias, url for URL. Valor predeterminado: id.
sort
opcional string
Ordenar. Los valores posibles son: desc for Descendente, asc for Ascendente. Valor predeterminado: desc.
per_page
opcional integer
Resultados por página. Los valores posibles son: 10, 25, 50, 100. Valor predeterminado: 100.
Mostrar

Punto final de API:

GET
https://corta.es/api/v1/links/{id}

Ejemplo de solicitud:

curl --location --request GET 'https://corta.es/api/v1/links/{id}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
Almacenar

Punto final de API:

POST
https://corta.es/api/v1/links

Ejemplo de solicitud:

curl --location --request POST 'https://corta.es/api/v1/links' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}' \
--data-urlencode 'url={url}' \
--data-urlencode 'domain={id}'
Parameter
Tipo
Descripción
url
requerido string
El enlace a acortar.
domain_id
requerido integer
The domain ID the link to be saved under.
alias
opcional string
El alias del enlace.
password
opcional string
La contraseña del enlace.
space_id
opcional integer
The space ID the link to be saved under.
pixel_ids
opcional array
The pixel IDs to be integrated in the link.
disabled
opcional integer
Whether the link is disabled or not. Los valores posibles son: 0 for Activo, 1 for Deshabilitado. Valor predeterminado: 0.
privacy
opcional integer
Whether the link stats are public or not. Los valores posibles son: 0 for Público, 1 for Privado, 2 for Contraseña. Valor predeterminado: 0.
privacy_password
opcional string
The password for the statistics page. Only works with privacy set to 2.
expiration_url
opcional string
The link where the user will be redirected once the link has expired.
expiration_date
opcional string
The link expiration date in YYYY-MM-DD format.
expiration_time
opcional string
The link expiration time in HH:MM format.
expiration_clicks
opcional integer
The number of clicks after which the link should expire.
target_type
opcional integer
The type of targeting. Los valores posibles son: 0 for Ninguno, 1 for Geográfico, 2 for Plataforma, 4 for Rotación.
country[index][key]
opcional string
The code of the targeted country. The code must be in ISO 3166-1 alpha-2 standard.
country[index][value]
opcional string
The link where the user will be redirected to.
platform[index][key]
opcional string
The name of the targeted platform. Los valores posibles son: iOS, Android, Windows, OS X, Linux, Ubuntu, Chrome OS.
platform[index][value]
opcional string
The link where the user will be redirected to.
language[index][key]
opcional string
The code of the targeted language. The code must be in ISO 639-1 alpha-2 standard.
language[index][value]
opcional string
The link where the user will be redirected to.
rotation[index][value]
opcional string
The link where the user will be redirected to.
Actualizar

Punto final de API:

PUT PATCH
https://corta.es/api/v1/links/{id}

Ejemplo de solicitud:

curl --location --request PUT 'https://corta.es/api/v1/links/{id}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}' \
--data-urlencode 'url={url}'
Parameter
Tipo
Descripción
url
opcional string
El enlace a acortar.
alias
opcional string
El alias del enlace.
password
opcional string
La contraseña del enlace.
space_id
opcional integer
The space ID the link to be saved under.
pixel_ids
opcional array
The pixel IDs to be integrated in the link.
disabled
opcional integer
Whether the link is disabled or not. Los valores posibles son: 0 for Activo, 1 for Deshabilitado.
privacy
opcional integer
Whether the link stats are public or not. Los valores posibles son: 0 for Público, 1 for Privado, 2 for Contraseña.
privacy_password
opcional string
The password for the statistics page. Only works with privacy set to 2.
expiration_url
opcional string
The link where the user will be redirected once the link has expired.
expiration_date
opcional string
The link expiration date in YYYY-MM-DD format.
expiration_time
opcional string
The link expiration time in HH:MM format.
expiration_clicks
opcional integer
The number of clicks after which the link should expire.
target_type
opcional integer
The type of targeting. Los valores posibles son: 0 for Ninguno, 1 for Geográfico, 2 for Plataforma, 4 for Rotación.
country[index][key]
opcional string
The code of the targeted country. The code must be in ISO 3166-1 alpha-2 standard.
country[index][value]
opcional string
The link where the user will be redirected to.
platform[index][key]
opcional string
The name of the targeted platform. Los valores posibles son: iOS, Android, Windows, OS X, Linux, Ubuntu, Chrome OS.
platform[index][value]
opcional string
The link where the user will be redirected to.
language[index][key]
opcional string
The code of the targeted language. The code must be in ISO 639-1 alpha-2 standard.
language[index][value]
opcional string
The link where the user will be redirected to.
rotation[index][value]
opcional string
The link where the user will be redirected to.
Eliminar

Punto final de API:

DELETE
https://corta.es/api/v1/links/{id}

Ejemplo de solicitud:

curl --location --request DELETE 'https://corta.es/api/v1/links/{id}' \
--header 'Authorization: Bearer {api_key}'