Links

Observação
Nível Expert
A chave API deve ser enviada como um token do portador no cabeçalho de autorização da solicitação. Obtenha sua chave de API.
Lista

API endpoint:

GET
https://app.encurtarlink.net/api/v1/links

Request example:

curl --location --request GET 'https://app.encurtarlink.net/api/v1/links' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
Parameter
Tipo
Descrição
search
opcional string
Search query.
search_by
opcional string
Pesquisar por. Os valores possíveis são: title for Título, alias for Personalizar alias, url for URL. Padrões para: title.
status
opcional integer
Status. Os valores possíveis são: 0 for Todos, 1 for Ativo, 2 for Expirado, 3 for Disativado. Padrões para: 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. Os valores possíveis são: id for Data criada, clicks for Cliques, title for Título, alias for Personalizar alias, url for URL. Padrões para: id.
sort
opcional string
Ordenar por. Os valores possíveis são: desc for Descendente, asc for Ascendente. Padrões para: desc.
per_page
opcional integer
Resultados por página. Os valores possíveis são: 10, 25, 50, 100. Padrões para: 10.
Mostrar

API endpoint:

GET
https://app.encurtarlink.net/api/v1/links/{id}

Request example:

curl --location --request GET 'https://app.encurtarlink.net/api/v1/links/{id}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
Store

API endpoint:

POST
https://app.encurtarlink.net/api/v1/links

Request example:

curl --location --request POST 'https://app.encurtarlink.net/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
Descrição
url
requerido string
Destination URL.
domain_id
requerido integer
Domain ID.
alias
opcional string
Personalizar alias.
space_id
opcional integer
Space ID.
pixel_ids[]
opcional array
Pixel IDs.
redirect_password
opcional string
Colocar senha.
sensitive_content
opcional integer
Conteúdo sensível. Os valores possíveis são: 0 for Não, 1 for Sim. Padrões para: 0.
privacy
opcional integer
Privacidade de estatísticas. Os valores possíveis são: 0 for Publica, 1 for Privada, 2 for Senha. Padrões para: 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
Limitar por cliques.
expiration_url
opcional string
URL de redirecionamento.
targets_type
opcional string
Redirecionamento. Os valores possíveis são: 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.
Atualizar

API endpoint:

PUT PATCH
https://app.encurtarlink.net/api/v1/links/{id}

Request example:

curl --location --request PUT 'https://app.encurtarlink.net/api/v1/links/{id}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}' \
--data-urlencode 'url={url}'
Parameter
Tipo
Descrição
url
opcional string
Destination URL.
alias
opcional string
Personalizar alias.
space_id
opcional integer
Space ID.
pixel_ids[]
opcional array
Pixel IDs.
redirect_password
opcional string
Colocar senha.
sensitive_content
opcional integer
Conteúdo sensível. Os valores possíveis são: 0 for Não, 1 for Sim.
privacy
opcional integer
Privacidade de estatísticas. Os valores possíveis são: 0 for Publica, 1 for Privada, 2 for Senha.
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
Limitar por cliques.
expiration_url
opcional string
URL de redirecionamento.
targets_type
opcional string
Redirecionamento. Os valores possíveis são: 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.
Excluir

API endpoint:

DELETE
https://app.encurtarlink.net/api/v1/links/{id}

Request example:

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