Skip to content

Domains API Reference

The /v1/domains endpoint provides programmatic access to the list of domains available for creating and managing short links within your organization.


1. List Available Domains

GET /v1/domains

Retrieves all domains authorized for short link generation. This includes:

  1. Platform Default Domains: The global platform domain (rby.one) with is_default: true. Short links on this domain generate random 8-character Base36 codes. Custom aliases are not allowed.
  2. Branded Custom Domains: Active, verified custom domains belonging to your organization with is_default: false. Short links on custom domains support user-defined custom aliases (e.g. go.yourbrand.com/promo).

Required Permissions

  • Authentication: Bearer Token or HMAC-SHA256 signature
  • Required Scope: links:read

Request Headers

GET /v1/domains HTTP/1.1
Host: api.rby.one
Authorization: Bearer ak_01J8K92M4:as_9f8a7b6c5d4e3f2a1b0c
GET /v1/domains HTTP/1.1
Host: api.rby.one
X-Rby-Key-Id: ak_01J8K92M4
X-Rby-Timestamp: 1731024000
X-Rby-Signature: 7c4b1d9e2f8a...

Response 200 OK

{
  "domains": [
    {
      "domain": "rby.one",
      "is_default": true
    },
    {
      "domain": "go.yourbrand.com",
      "is_default": false
    }
  ]
}

Response Attributes

Field Type Description
domains array List of domain objects available for short link creation.
domains[].domain string The domain hostname (e.g. rby.one, go.yourbrand.com).
domains[].is_default boolean true if the domain is a platform default domain; false for organization custom domains.

Code Examples

curl -X GET "https://api.rby.one/v1/domains" \
  -H "Authorization: Bearer ak_01J8K92M4:as_9f8a7b6c5d4e3f2a1b0c"
import requests

headers = {
    "Authorization": "Bearer ak_01J8K92M4:as_9f8a7b6c5d4e3f2a1b0c"
}

response = requests.get("https://api.rby.one/v1/domains", headers=headers)
print(response.status_code, response.json())
const response = await fetch("https://api.rby.one/v1/domains", {
  headers: {
    "Authorization": "Bearer ak_01J8K92M4:as_9f8a7b6c5d4e3f2a1b0c"
  }
});

const data = await response.json();
console.log(data);