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
Search query.
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
Estado. Los valores posibles son: 0 for Todos, 1 for Activo, 2 for Expirado, 3 for Deshabilitado. Valor predeterminado: 0.
space_id
opcional integer
Space ID.
domain_id
opcional integer
Domain ID.
pixel_id
opcional integer
Pixel ID.
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
Destination URL.
domain_id
requerido integer
Domain ID.
alias
opcional string
Alias.
space_id
opcional integer
Space ID.
pixel_ids[]
opcional array
Pixel IDs.
redirect_password
opcional string
Redirect password.
sensitive_content
opcional integer
Sensitive content. Los valores posibles son: 0 for No, 1 for . Valor predeterminado: 0.
privacy
opcional integer
Stats privacy. Los valores posibles son: 0 for Público, 1 for Privado, 2 for Contraseña. Valor predeterminado: 0.
password
opcional string
Stats password. Only works with privacy field set to 2.
active_period_start_at
opcional string
Active period starting date in Y-m-d H:i format.
active_period_end_at
opcional string
Active period ending date in Y-m-d H:i format.
clicks_limit
opcional integer
Clicks limit.
expiration_url
opcional string
Expiration URL.
targets_type
opcional string
Segmentación. Los valores posibles son: continents for Continents, countries for Countries, operating_systems for Operating systems, browsers for Browsers, languages for Languages, devices for Devices, rotations for Rotations.
targets[index][key]
opcional string
For targets_type=country, the value must be in ISO 3166-1 alpha-2 format.
For targets_type=operating_systems, the possible values are iOS, Android, Windows, OS X, Linux, Ubuntu, Chrome OS.
For targets_type=browsers, the possible values are: Chrome, Chromium, Firefox, Firefox Mobile, Edge, Internet Explorer, Mobile Internet Explorer, Vivaldi, Brave, Safari, Opera, Opera Mini, Opera Mobile, Opera Touch, Yandex Browser, UC Browser, Samsung Internet, QQ Browser, BlackBerry Browser, Maxtho.
For targets_type=devices, the possible values are: Desktop, Mobile, Tablet, Watch, Television.
For targets_type=languages, the value must be in ISO 639-1 alpha-2 format.
For targets_type=continents, the possible values are: AF for Africa, AN for Antarctica, AS for Asia, EU for Europe, NA for North America, OC for Oceania, SA for South America.
targets[index][value]
opcional string
Destination URL.
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
Destination URL.
alias
opcional string
Alias.
space_id
opcional integer
Space ID.
pixel_ids[]
opcional array
Pixel IDs.
redirect_password
opcional string
Redirect password.
sensitive_content
opcional integer
Sensitive content. Los valores posibles son: 0 for No, 1 for .
privacy
opcional integer
Stats privacy. Los valores posibles son: 0 for Público, 1 for Privado, 2 for Contraseña.
password
opcional string
Stats password. Only works with privacy field set to 2.
active_period_start_at
opcional string
Active period starting date in Y-m-d H:i format.
active_period_end_at
opcional string
Active period ending date in Y-m-d H:i format.
clicks_limit
opcional integer
Clicks limit.
expiration_url
opcional string
Expiration URL.
targets_type
opcional string
Segmentación. Los valores posibles son: continents for Continents, countries for Countries, operating_systems for Operating systems, browsers for Browsers, languages for Languages, devices for Devices, rotations for Rotations.
targets[index][key]
opcional string
For targets_type=country, the value must be in ISO 3166-1 alpha-2 format.
For targets_type=operating_systems, the possible values are iOS, Android, Windows, OS X, Linux, Ubuntu, Chrome OS.
For targets_type=browsers, the possible values are: Chrome, Chromium, Firefox, Firefox Mobile, Edge, Internet Explorer, Mobile Internet Explorer, Vivaldi, Brave, Safari, Opera, Opera Mini, Opera Mobile, Opera Touch, Yandex Browser, UC Browser, Samsung Internet, QQ Browser, BlackBerry Browser, Maxtho.
For targets_type=devices, the possible values are: Desktop, Mobile, Tablet, Watch, Television.
For targets_type=languages, the value must be in ISO 639-1 alpha-2 format.
For targets_type=continents, the possible values are: AF for Africa, AN for Antarctica, AS for Asia, EU for Europe, NA for North America, OC for Oceania, SA for South America.
targets[index][value]
opcional string
Destination URL.
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}'