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

# Add Domains

Use this API to add new organizations and its metadata.

# Endpoint

`POST https://api.velt.dev/v1/workspace/domains/add`

# Headers

<ParamField header="x-velt-api-key" type="string" required>
  Your API key.
</ParamField>

<ParamField header="x-velt-auth-token" type="string" required>
  Your [Auth Token](/security/auth-tokens).
</ParamField>

# Body

#### Params

<ParamField body="data" type="object" required>
  <Expandable title="properties">
    <ParamField body="domains" type="string[]" required>
      Array of domains
    </ParamField>
  </Expandable>
</ParamField>

# Example Request

```JSON theme={null}
{
  "data": {
     "domains" : [
        "https://www.google.com",
        "https://*.firebase.com"
     ]
  }
}
```

# Example Response

#### Success Response

```JSON theme={null}
{
    "result": {
        "status": "success",
        "message": "Domain(s) added successfully to allowed domains.",
        "data": {
            "domainsAdded": [
                "google.com",
                "*.firebase.com"
            ]
        }
    }
}

```

#### Failure Response

##### If some domains are already in the allowed domains

```JSON theme={null}
{
    "error": {
        "details": {
            "domainsAdded": [
                "velt.dev"
            ],
            "skippedDomains": [
                "google.com"
            ]
        },
        "message": "Domain(s) added successfully to allowed domains. Skipped existing domains.",
        "status": "INTERNAL"
    }
}

```

<ResponseExample>
  ```js theme={null}
  {
      "result": {
          "status": "success",
          "message": "Domain(s) added successfully to allowed domains.",
          "data": {
              "domainsAdded": [
                  "google.com",
                  "*.firebase.com"
              ]
          }
      }
  }
  ```
</ResponseExample>
