Skip to content

Check slug available

POST
/api/shortened-url/unique
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 null

Returns whether the proposed URL slug is free to use for the given entity before creation.

Wink-Version
string
default: 2.0.0
Allowed values: 2.0

URL slug and optional entity identifier to check for uniqueness

Media type application/json

Request to check whether a URL slug is available for use within the owner’s account

object
uniqueId
required

URL-friendly slug to check for availability within the owner’s account

string
"" >= 1 characters
Example
the-siam-residences-promo
entityId

If updating an existing shortened URL, pass its identifier to exclude it from the uniqueness check

string format: uuid
""
Example
3c6b1a5d-8e2f-4a0b-9c7d-6e4f0a8b2c51
Example
{
"uniqueId": "the-siam-residences-promo",
"entityId": "3c6b1a5d-8e2f-4a0b-9c7d-6e4f0a8b2c51"
}

Uniqueness check result for the proposed slug

Media type application/json

Result indicating whether a value is unique within the platform

object
unique
required

True if the checked value is unique; false if it already exists

boolean
key
additional properties
""
Example
{
"unique": true
}

Bad Request — missing or invalid request parameter or body

Media type application/problem+json
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties
key
additional properties
""
Example

Unauthorized — authentication is required or the session has expired

Media type application/problem+json
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties
key
additional properties
""
Example

Forbidden — authenticated but lacking the required permission or scope

Media type application/problem+json
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties
key
additional properties
""
Example

Not Found — the requested resource does not exist

Media type application/problem+json
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties
key
additional properties
""
Example

Method Not Allowed — the HTTP verb is not supported on this endpoint

Media type application/problem+json
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties
key
additional properties
""
Example

Unsupported Media Type — use application/json

Media type application/problem+json
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties
key
additional properties
""
Example

Internal Server Error — an unexpected failure occurred on the server

Media type application/problem+json
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties
key
additional properties
""
Example

Service Unavailable — a downstream dependency is unreachable

Media type application/problem+json
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties
key
additional properties
""
Example