Skip to main content
POST
/
v2
/
workspace
/
domains
/
get
Get Domains
curl --request POST \
  --url https://api.velt.dev/v2/workspace/domains/get \
  --header 'x-velt-api-key: <x-velt-api-key>' \
  --header 'x-velt-auth-token: <x-velt-auth-token>'
{
  "result": {
    "status": "success",
    "message": "Allowed domains retrieved successfully.",
    "data": {
      "allowedDomains": [
        "localhost",
        "127.0.0.1",
        "example.com"
      ]
    }
  }
}
Use this API to retrieve the list of allowed domains for a workspace.
This endpoint uses API-key-level auth: pass x-velt-api-key and x-velt-auth-token as headers. You can obtain these from the Get Auth Tokens endpoint.

Endpoint

POST https://api.velt.dev/v2/workspace/domains/get

Headers

x-velt-api-key
string
required
Your API key.
x-velt-auth-token
string
required

Body

This endpoint does not require a request body.
The returned allowedDomains array contains bare domains (e.g., "example.com", "localhost"). Protocols and www prefixes are stripped during storage.

Example Request

{
  "data": {}
}

Example Response

Success Response

{
  "result": {
    "status": "success",
    "message": "Allowed domains retrieved successfully.",
    "data": {
      "allowedDomains": [
        "localhost",
        "127.0.0.1",
        "example.com"
      ]
    }
  }
}

Failure Response

{
  "error": {
    "status": "PERMISSION_DENIED",
    "message": "Invalid API key."
  }
}
{
  "result": {
    "status": "success",
    "message": "Allowed domains retrieved successfully.",
    "data": {
      "allowedDomains": [
        "localhost",
        "127.0.0.1",
        "example.com"
      ]
    }
  }
}