POST
/
link
curl --request POST \
  --url https://api.cme.sh/link \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "workspaceId": "<string>",
  "keywordType": "<string>",
  "longUrl": "<string>",
  "customDomain": "amazon.com",
  "keyword": "myYoutubeChannel"
}'
{
  "status": true,
  "data": {
    "linkId": "<string>",
    "keyWordExist": true,
    "shortUrl": "<string>",
    "recommendedUrls": [
      "<any>"
    ],
    "failToGenerateHash": true
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
Create a new link for the authenticated workspace.
workspaceId
string
required

Id of the Workspace

keywordType
string
required

The type slug we use for shortening the url. It can be either HASH or CUSTOM

longUrl
string
required

The long url for shortening

customDomain
string

The custom domain value if have any custom domain setupped in the workspace to create short url. It can be null if not configured

Example:

"amazon.com"

keyword
string

Custom keyword/slug for shortening url if keywordType selected as CUSTOM

Example:

"myYoutubeChannel"

Response

200
application/json
Successful response
status
boolean
data
object