Hosted Sessions
Create Hosted Session
Create a new hosted session for the organization associated with the API key.
POST
/
api
/
v1
/
hosted
/
sessions
Create Hosted Session
curl --request POST \
--url https://api.dotlet.net/api/v1/hosted/sessions \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"allowed_actions": [],
"external_user_id": "<string>",
"external_account_id": "<string>",
"theme_config": {
"primary_color": "<string>",
"logo_url": "<string>",
"brand_name": "<string>"
},
"metadata": {},
"expires_in_minutes": 60
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
allowed_actions: [],
external_user_id: '<string>',
external_account_id: '<string>',
theme_config: {primary_color: '<string>', logo_url: '<string>', brand_name: '<string>'},
metadata: {},
expires_in_minutes: 60
})
};
fetch('https://api.dotlet.net/api/v1/hosted/sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dotlet.net/api/v1/hosted/sessions"
payload = {
"allowed_actions": [],
"external_user_id": "<string>",
"external_account_id": "<string>",
"theme_config": {
"primary_color": "<string>",
"logo_url": "<string>",
"brand_name": "<string>"
},
"metadata": {},
"expires_in_minutes": 60
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.dotlet.net/api/v1/hosted/sessions"
payload := strings.NewReader("{\n \"allowed_actions\": [],\n \"external_user_id\": \"<string>\",\n \"external_account_id\": \"<string>\",\n \"theme_config\": {\n \"primary_color\": \"<string>\",\n \"logo_url\": \"<string>\",\n \"brand_name\": \"<string>\"\n },\n \"metadata\": {},\n \"expires_in_minutes\": 60\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"hosted_url": "<string>",
"embed_url": "<string>",
"client_token": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
APIKeyHeaderHTTPBearer
Body
application/json
Minimum array length:
1Available options:
domain_search, domain_purchase, dns_manage, renew Show child attributes
Show child attributes
Required range:
5 <= x <= 1440⌘I
Create Hosted Session
curl --request POST \
--url https://api.dotlet.net/api/v1/hosted/sessions \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"allowed_actions": [],
"external_user_id": "<string>",
"external_account_id": "<string>",
"theme_config": {
"primary_color": "<string>",
"logo_url": "<string>",
"brand_name": "<string>"
},
"metadata": {},
"expires_in_minutes": 60
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
allowed_actions: [],
external_user_id: '<string>',
external_account_id: '<string>',
theme_config: {primary_color: '<string>', logo_url: '<string>', brand_name: '<string>'},
metadata: {},
expires_in_minutes: 60
})
};
fetch('https://api.dotlet.net/api/v1/hosted/sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dotlet.net/api/v1/hosted/sessions"
payload = {
"allowed_actions": [],
"external_user_id": "<string>",
"external_account_id": "<string>",
"theme_config": {
"primary_color": "<string>",
"logo_url": "<string>",
"brand_name": "<string>"
},
"metadata": {},
"expires_in_minutes": 60
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.dotlet.net/api/v1/hosted/sessions"
payload := strings.NewReader("{\n \"allowed_actions\": [],\n \"external_user_id\": \"<string>\",\n \"external_account_id\": \"<string>\",\n \"theme_config\": {\n \"primary_color\": \"<string>\",\n \"logo_url\": \"<string>\",\n \"brand_name\": \"<string>\"\n },\n \"metadata\": {},\n \"expires_in_minutes\": 60\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"hosted_url": "<string>",
"embed_url": "<string>",
"client_token": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}