> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dashlink.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Platform subdomains

> A branded subdomain with no DNS work.

A platform subdomain gives you something like `yourbrand.dshl.ink` on a domain Dashlink already operates. No DNS records, no verification wait, no certificate to issue.

**1. See what parent domains are available**

```bash cURL theme={null}
curl -X GET "https://api.dashlink.ai/api/v1/domains/get_platform_domain_parents" \
  -H "X-API-Key: $DASHLINK_API_KEY"
```

```javascript Node.js theme={null}
const response = await fetch("https://api.dashlink.ai/api/v1/domains/get_platform_domain_parents", {
  headers: { "X-API-Key": process.env.DASHLINK_API_KEY },
});
const payload = await response.json();
```

```python Python theme={null}
import os
import requests

response = requests.get(
    'https://api.dashlink.ai/api/v1/domains/get_platform_domain_parents',
    headers={'X-API-Key': os.environ["DASHLINK_API_KEY"]},
)
payload = response.json()
```

```go Go theme={null}
package main

import (
	"fmt"
	"io"
	"net/http"
	"os"
)

func main() {
	endpoint0 := "https://api.dashlink.ai/api/v1/domains/get_platform_domain_parents"
	req0, err0 := http.NewRequest("GET", endpoint0, nil)
	if err0 != nil {
		panic(err0)
	}
	req0.Header.Set("X-API-Key", os.Getenv("DASHLINK_API_KEY"))
	resp0, err0b := http.DefaultClient.Do(req0)
	if err0b != nil {
		panic(err0b)
	}
	defer resp0.Body.Close()
	body0, _ := io.ReadAll(resp0.Body)
	fmt.Println(string(body0))
}

```

```ruby Ruby theme={null}
require "net/http"
require "json"
require "uri"

uri0 = URI("https://api.dashlink.ai/api/v1/domains/get_platform_domain_parents")
request0 = Net::HTTP::Get.new(uri0)
request0["X-API-Key"] = ENV.fetch("DASHLINK_API_KEY")
response0 = Net::HTTP.start(uri0.hostname, uri0.port, use_ssl: true) do |http|
  http.request(request0)
end
payload0 = JSON.parse(response0.body)
```

```php PHP theme={null}
<?php
$ch0 = curl_init('https://api.dashlink.ai/api/v1/domains/get_platform_domain_parents');
curl_setopt($ch0, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch0, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch0, CURLOPT_HTTPHEADER, [
    "X-API-Key: " . getenv("DASHLINK_API_KEY"),
]);
$payload0 = json_decode(curl_exec($ch0), true);
curl_close($ch0);
```

**2. Check the slug is free**

```bash cURL theme={null}
curl -X GET "https://api.dashlink.ai/api/v1/domains/check_platform_subdomain_availability?subdomain_slug=yourbrand&parent_domain=dshl.ink" \
  -H "X-API-Key: $DASHLINK_API_KEY"
```

```javascript Node.js theme={null}
const response = await fetch("https://api.dashlink.ai/api/v1/domains/check_platform_subdomain_availability?subdomain_slug=yourbrand&parent_domain=dshl.ink", {
  headers: { "X-API-Key": process.env.DASHLINK_API_KEY },
});
const payload = await response.json();
```

```python Python theme={null}
import os
import requests

response = requests.get(
    'https://api.dashlink.ai/api/v1/domains/check_platform_subdomain_availability?subdomain_slug=yourbrand&parent_domain=dshl.ink',
    headers={'X-API-Key': os.environ["DASHLINK_API_KEY"]},
)
payload = response.json()
```

```go Go theme={null}
package main

import (
	"fmt"
	"io"
	"net/http"
	"os"
)

func main() {
	endpoint0 := "https://api.dashlink.ai/api/v1/domains/check_platform_subdomain_availability?subdomain_slug=yourbrand&parent_domain=dshl.ink"
	req0, err0 := http.NewRequest("GET", endpoint0, nil)
	if err0 != nil {
		panic(err0)
	}
	req0.Header.Set("X-API-Key", os.Getenv("DASHLINK_API_KEY"))
	resp0, err0b := http.DefaultClient.Do(req0)
	if err0b != nil {
		panic(err0b)
	}
	defer resp0.Body.Close()
	body0, _ := io.ReadAll(resp0.Body)
	fmt.Println(string(body0))
}

```

```ruby Ruby theme={null}
require "net/http"
require "json"
require "uri"

uri0 = URI("https://api.dashlink.ai/api/v1/domains/check_platform_subdomain_availability?subdomain_slug=yourbrand&parent_domain=dshl.ink")
request0 = Net::HTTP::Get.new(uri0)
request0["X-API-Key"] = ENV.fetch("DASHLINK_API_KEY")
response0 = Net::HTTP.start(uri0.hostname, uri0.port, use_ssl: true) do |http|
  http.request(request0)
end
payload0 = JSON.parse(response0.body)
```

```php PHP theme={null}
<?php
$ch0 = curl_init('https://api.dashlink.ai/api/v1/domains/check_platform_subdomain_availability?subdomain_slug=yourbrand&parent_domain=dshl.ink');
curl_setopt($ch0, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch0, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch0, CURLOPT_HTTPHEADER, [
    "X-API-Key: " . getenv("DASHLINK_API_KEY"),
]);
$payload0 = json_decode(curl_exec($ch0), true);
curl_close($ch0);
```

**3. Claim it**

```bash cURL theme={null}
curl -X POST "https://api.dashlink.ai/api/v1/domains/create_platform_subdomain" \
  -H "X-API-Key: $DASHLINK_API_KEY" \
  -d "subdomain_slug=yourbrand" \
  -d "parent_domain=dshl.ink"
```

```javascript Node.js theme={null}
const body = new URLSearchParams();
body.append("subdomain_slug", "yourbrand");
body.append("parent_domain", "dshl.ink");

const response = await fetch("https://api.dashlink.ai/api/v1/domains/create_platform_subdomain", {
  method: "POST",
  headers: { "X-API-Key": process.env.DASHLINK_API_KEY },
  body,
});
const payload = await response.json();
```

```python Python theme={null}
import os
import requests

response = requests.post(
    'https://api.dashlink.ai/api/v1/domains/create_platform_subdomain',
    headers={'X-API-Key': os.environ["DASHLINK_API_KEY"]},
    data={
        'subdomain_slug': 'yourbrand',
        'parent_domain': 'dshl.ink',
    },
)
payload = response.json()
```

```go Go theme={null}
package main

import (
	"fmt"
	"io"
	"net/http"
	"os"
	"net/url"
	"strings"
)

func main() {
	endpoint0 := "https://api.dashlink.ai/api/v1/domains/create_platform_subdomain"
	form0 := url.Values{
		"subdomain_slug": {"yourbrand"},
		"parent_domain": {"dshl.ink"},
	}
	req0, err0 := http.NewRequest("POST", endpoint0, strings.NewReader(form0.Encode()))
	if err0 != nil {
		panic(err0)
	}
	req0.Header.Set("Content-Type", "application/x-www-form-urlencoded")
	req0.Header.Set("X-API-Key", os.Getenv("DASHLINK_API_KEY"))
	resp0, err0b := http.DefaultClient.Do(req0)
	if err0b != nil {
		panic(err0b)
	}
	defer resp0.Body.Close()
	body0, _ := io.ReadAll(resp0.Body)
	fmt.Println(string(body0))
}

```

```ruby Ruby theme={null}
require "net/http"
require "json"
require "uri"

uri0 = URI("https://api.dashlink.ai/api/v1/domains/create_platform_subdomain")
request0 = Net::HTTP::Post.new(uri0)
request0["X-API-Key"] = ENV.fetch("DASHLINK_API_KEY")
request0.set_form_data("subdomain_slug" => "yourbrand", "parent_domain" => "dshl.ink")
response0 = Net::HTTP.start(uri0.hostname, uri0.port, use_ssl: true) do |http|
  http.request(request0)
end
payload0 = JSON.parse(response0.body)
```

```php PHP theme={null}
<?php
$ch0 = curl_init('https://api.dashlink.ai/api/v1/domains/create_platform_subdomain');
curl_setopt($ch0, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch0, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch0, CURLOPT_HTTPHEADER, [
    "X-API-Key: " . getenv("DASHLINK_API_KEY"),
]);
curl_setopt($ch0, CURLOPT_POSTFIELDS, http_build_query(['subdomain_slug' => 'yourbrand', 'parent_domain' => 'dshl.ink']));
$payload0 = json_decode(curl_exec($ch0), true);
curl_close($ch0);
```

Usable immediately.

## Choosing a slug

* Your brand, spelled the way people expect to see it
* Short — it is in front of every link you create
* Letters, numbers and hyphens
* Some slugs are reserved for platform use and will be refused

Claiming is first-come. Check availability and claim in the same flow rather than picking a name, building around it, and finding it gone.

## Platform subdomain or custom domain

| | Platform subdomain | Custom domain |
| - | - | - |
| Setup | Immediate | DNS records plus verification |
| Needs DNS access | No | Yes |
| Domain shown | `yourbrand.dshl.ink` | `go.example.com` |
| Certificate | Already in place | Issued after verification |

A platform subdomain is a reasonable permanent choice for a small team, and a good way to start while a custom domain is being arranged.

## Moving to a custom domain later

Both can exist at once, so you migrate without an outage:

**1. Add and verify the custom domain**

See [Custom domains](https://docs.dashlink.ai/guides/branded-links/custom-domains.md).

**2. Make it the default**

```bash cURL theme={null}
curl -X POST "https://api.dashlink.ai/api/v1/domains/mark_default" \
  -H "X-API-Key: $DASHLINK_API_KEY" \
  -d "id=DOMAIN-0002"
```

```javascript Node.js theme={null}
const body = new URLSearchParams();
body.append("id", "DOMAIN-0002");

const response = await fetch("https://api.dashlink.ai/api/v1/domains/mark_default", {
  method: "POST",
  headers: { "X-API-Key": process.env.DASHLINK_API_KEY },
  body,
});
const payload = await response.json();
```

```python Python theme={null}
import os
import requests

response = requests.post(
    'https://api.dashlink.ai/api/v1/domains/mark_default',
    headers={'X-API-Key': os.environ["DASHLINK_API_KEY"]},
    data={
        'id': 'DOMAIN-0002',
    },
)
payload = response.json()
```

```go Go theme={null}
package main

import (
	"fmt"
	"io"
	"net/http"
	"os"
	"net/url"
	"strings"
)

func main() {
	endpoint0 := "https://api.dashlink.ai/api/v1/domains/mark_default"
	form0 := url.Values{
		"id": {"DOMAIN-0002"},
	}
	req0, err0 := http.NewRequest("POST", endpoint0, strings.NewReader(form0.Encode()))
	if err0 != nil {
		panic(err0)
	}
	req0.Header.Set("Content-Type", "application/x-www-form-urlencoded")
	req0.Header.Set("X-API-Key", os.Getenv("DASHLINK_API_KEY"))
	resp0, err0b := http.DefaultClient.Do(req0)
	if err0b != nil {
		panic(err0b)
	}
	defer resp0.Body.Close()
	body0, _ := io.ReadAll(resp0.Body)
	fmt.Println(string(body0))
}

```

```ruby Ruby theme={null}
require "net/http"
require "json"
require "uri"

uri0 = URI("https://api.dashlink.ai/api/v1/domains/mark_default")
request0 = Net::HTTP::Post.new(uri0)
request0["X-API-Key"] = ENV.fetch("DASHLINK_API_KEY")
request0.set_form_data("id" => "DOMAIN-0002")
response0 = Net::HTTP.start(uri0.hostname, uri0.port, use_ssl: true) do |http|
  http.request(request0)
end
payload0 = JSON.parse(response0.body)
```

```php PHP theme={null}
<?php
$ch0 = curl_init('https://api.dashlink.ai/api/v1/domains/mark_default');
curl_setopt($ch0, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch0, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch0, CURLOPT_HTTPHEADER, [
    "X-API-Key: " . getenv("DASHLINK_API_KEY"),
]);
curl_setopt($ch0, CURLOPT_POSTFIELDS, http_build_query(['id' => 'DOMAIN-0002']));
$payload0 = json_decode(curl_exec($ch0), true);
curl_close($ch0);
```

New links use it from now on.

**3. Leave the old links alone**

Links already on the platform subdomain keep working as long as you keep it. There is no rewrite, and no redirect if you remove it.

> [!WARNING]
>
> Releasing a platform subdomain breaks every link on it permanently, and the slug becomes available to someone else. Check `get_domain_usage` first, and keep it as long as links on it are still circulating.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.