Check slug available
const url = 'https://api.wink.travel/api/shortened-url/unique';const options = { method: 'POST', headers: { 'Wink-Version': '2.0', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: 'null'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.wink.travel/api/shortened-url/unique \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'Wink-Version: 2.0' \ --data nullReturns whether the proposed URL slug is free to use for the given entity before creation.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”URL slug and optional entity identifier to check for uniqueness
Request to check whether a URL slug is available for use within the owner’s account
object
URL-friendly slug to check for availability within the owner’s account
Example
the-siam-residences-promoIf updating an existing shortened URL, pass its identifier to exclude it from the uniqueness check
Example
3c6b1a5d-8e2f-4a0b-9c7d-6e4f0a8b2c51Example
{ "uniqueId": "the-siam-residences-promo", "entityId": "3c6b1a5d-8e2f-4a0b-9c7d-6e4f0a8b2c51"}Responses
Section titled “Responses”Uniqueness check result for the proposed slug
Result indicating whether a value is unique within the platform
object
True if the checked value is unique; false if it already exists
Example
{ "unique": true}Bad Request — missing or invalid request parameter or body
object
object
Example
Unauthorized — authentication is required or the session has expired
object
object
Example
Forbidden — authenticated but lacking the required permission or scope
object
object
Example
Not Found — the requested resource does not exist
object
object
Example
Method Not Allowed — the HTTP verb is not supported on this endpoint
object
object
Example
Unsupported Media Type — use application/json
object
object
Example
Internal Server Error — an unexpected failure occurred on the server
object
object
Example
Service Unavailable — a downstream dependency is unreachable
