Skip to main content
POST
/
links
Create a new dynamic link
curl --request POST \
  --url https://directt.to/api/v1/links \
  --header 'Content-Type: application/json' \
  --data '{
  "link": "<string>",
  "projectDomain": "<string>",
  "metaData": {
    "title": "<string>",
    "description": "<string>",
    "image": "<string>"
  },
  "androidReferrer": "<string>"
}'
{
  "linkId": "<string>",
  "url": "<string>"
}

Body

application/json

The long URL that will be returned when you retrieve the link

projectDomain
string
required

The project domain for the link. Either the subdomain or your custom domain without the protocol.

metaData
object

Metadata for the link

androidReferrer
string

Android referrer for the link (optional)

Response

Link successfully created

ID of the created link

url
string<uri>

Shortened url for the link. Either composed of your custom domain and an alias or the subdomain and an alias.