Domains
GEThttps://www.viso.li/api/domain
Returns custom domains that are active and can be passed as domain when creating a link.
Domains that are still waiting on DNS, SSL, or a failed check are omitted. Adding and removing domains stays in the dashboard.
Send Authorization: Bearer sk_api_your_api_key on every request. See authentication.
Example request
1curl https://www.viso.li/api/domain \
2 -H "Authorization: Bearer sk_api_your_api_key"
Success response
Returns 200 OK. An account with no active domains returns an empty array.
response.json
1{
2 "domains": [
3 {
4 "name": "go.example.com"
5 }
6 ]
7}
Response fields
| Field | Type | Description |
|---|---|---|
domains | object[] | Required. Active custom domains on this account. |
domains[].name | string | Required. Hostname, such as go.example.com. |
Errors
| Status | Error | Description |
|---|---|---|
| 401 | Unauthorized | Missing, malformed, or invalid Bearer token. |
| 429 | Too Many Requests | More than 10 requests per minute and 50 requests per day. Some responses include a Retry-After header. |
| 500 | Internal Server Error | Unexpected server error. Retry the request. |