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://bitlink.in/api/v1/links

Request example:

curl --location --request GET 'https://bitlink.in/api/v1/links' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
Parameter
Tipo
Descrição
search
opcional string
A consulta de pesquisa.
by
opcional string
Pesquisar por Os valores possíveis são: title for Título, alias for Link personalizado, url for URL. Padrões para: title.
status
opcional integer
Filtrar por status. Os valores possíveis são: 0 for Todos, 1 for Ativo, 2 for Expirado, 3 for Disativado. Padrões para: 0.
space
opcional integer
Filtrar por ID de projeto.
domain
opcional integer
Filtrar por ID de domínio.
pixel
opcional integer
Filter by pixel ID.
sort
opcional string
Ordenar por. Os valores possíveis são: desc for Descendente, asc for Ascendente, max for Melhor desempenho, min for Pior desempenho. Padrões para: desc.
per_page
opcional int
Resultados por página. Os valores possíveis são: 10 to 100. Padrões para: 10.
Mostrar

API endpoint:

GET
https://bitlink.in/api/v1/links/{id}

Request example:

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

API endpoint:

POST
https://bitlink.in/api/v1/links

Request example:

curl --location --request POST 'https://bitlink.in/api/v1/links' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}' \
--data-urlencode 'url={url}'
Parameter
Tipo
Descrição
url
requerido string
The link to be shortened.
domain
requerido integer
The domain ID the link to be saved under.
alias
opcional string
The link alias.
password
opcional string
The link password.
space
opcional integer
The space ID the link to be saved under.
pixels
opcional array
The pixel IDs to be integrated in the link.
disabled
opcional integer
Whether the link is disabled or not. Os valores possíveis são: 0 for Ativo, 1 for Disativado. Padrões para: 0.
privacy
opcional integer
Whether the link stats are public or not. Os valores possíveis são: 0 for Publica, 1 for Privada, 2 for Senha. Padrões para: 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. Os valores possíveis são: 0 for Nenhum, 1 for Geográfico, 2 for Plataforma, 4 for Rotação.
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. Os valores possíveis são: 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.
Atualizar

API endpoint:

PUT PATCH
https://bitlink.in/api/v1/links/{id}

Request example:

curl --location --request PUT 'https://bitlink.in/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
The link to be shortened.
alias
opcional string
The link alias.
password
opcional string
The link password.
space
opcional integer
The space ID the link to be saved under.
pixels
opcional array
The pixel IDs to be integrated in the link.
disabled
opcional integer
Whether the link is disabled or not. Os valores possíveis são: 0 for Ativo, 1 for Disativado.
privacy
opcional integer
Whether the link stats are public or not. Os valores possíveis são: 0 for Publica, 1 for Privada, 2 for Senha.
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. Os valores possíveis são: 0 for Nenhum, 1 for Geográfico, 2 for Plataforma, 4 for Rotação.
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. Os valores possíveis são: 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.
Excluir

API endpoint:

DELETE
https://bitlink.in/links/{id}/destroy

Request example:

curl --location --request DELETE 'https://bitlink.in/links/{id}/destroy' \
--header 'Authorization: Bearer {api_key}'