> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.gorilladash.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.gorilladash.com/_mcp/server.

# Create Website

POST https://api.gorilladash.com/api/v1/website-content/websites
Content-Type: application/json

Creates a website. Needs a key with **Website Content: Read and Write** (`website-content:write`).

| Field | Type | Rules |
| --- | --- | --- |
| `name` | string | Required, max 255. |
| `url` | string | Required, max 255, an `http` or `https` URL. |

A new website gets its GraphQL client automatically; its id comes back as `graphql_client_id`. The client **secret** is never returned through the API; copy it from the website's settings in Gorilla Dash.

If a website with the same **url** already exists, this returns **422**. Use **Upsert Website** when you do not know whether it exists.

Reference: https://docs.gorilladash.com/gorilla-dash-rest-ful-api/website-content/websites/create-website

## Request

### Headers

- `GorillaDash-Api-Key` (string, optional) — Gorilla Dash API Key
- `GorillaDash-Api-Secret` (string, optional) — Gorilla Dash API Secret

### Body (application/json)

This endpoint expects an object.

- `name` (string, required)
- `url` (string, required)

## Response

### 201

Created

- `success` (boolean, required)
- `status` (integer, required)
- `data` (ApiV1WebsiteContentWebsitesPostResponsesContentApplicationJsonSchemaData, required)

## Errors

### 403 Forbidden Error

Forbidden

- `message` (string, required)

### 422 Unprocessable Entity Error

Unprocessable Content

- `message` (string, required)
- `errors` (ApiV1WebsiteContentWebsitesPostResponsesContentApplicationJsonSchemaErrors, required)

## Types

### ApiV1WebsiteContentWebsitesPostResponsesContentApplicationJsonSchemaData

- `id` (integer, required)
- `name` (string, required)
- `url` (string, required)
- `default_website` (boolean, required)
- `graphql_client_id` (integer, required)
- `created_at` (datetime, required)
- `updated_at` (datetime, required)

### ApiV1WebsiteContentWebsitesPostResponsesContentApplicationJsonSchemaErrors

- `url` (list of string, required)

## Examples

**Request**

```json
{
  "name": "Franchise Council",
  "url": "https://franchise.example.org"
}
```

**Response**

```json
{
  "success": true,
  "status": 201,
  "data": {
    "id": 206,
    "name": "Franchise Council",
    "url": "https://franchise.example.org",
    "default_website": false,
    "graphql_client_id": 1187,
    "created_at": "2026-10-07T01:20:00+00:00",
    "updated_at": "2026-10-07T01:20:00+00:00"
  }
}
```

**SDK Code**

```python Website Content_Websites_Create Website_example
import requests

url = "https://api.gorilladash.com/api/v1/website-content/websites"

payload = {
    "name": "Franchise Council",
    "url": "https://franchise.example.org"
}
headers = {
    "GorillaDash-Api-Key": "{{API_KEY}}",
    "GorillaDash-Api-Secret": "{{GD_RESTFUL_SECRET}}",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Website Content_Websites_Create Website_example
const url = 'https://api.gorilladash.com/api/v1/website-content/websites';
const options = {
  method: 'POST',
  headers: {
    'GorillaDash-Api-Key': '{{API_KEY}}',
    'GorillaDash-Api-Secret': '{{GD_RESTFUL_SECRET}}',
    'Content-Type': 'application/json'
  },
  body: '{"name":"Franchise Council","url":"https://franchise.example.org"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Website Content_Websites_Create Website_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.gorilladash.com/api/v1/website-content/websites"

	payload := strings.NewReader("{\n  \"name\": \"Franchise Council\",\n  \"url\": \"https://franchise.example.org\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("GorillaDash-Api-Key", "{{API_KEY}}")
	req.Header.Add("GorillaDash-Api-Secret", "{{GD_RESTFUL_SECRET}}")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Website Content_Websites_Create Website_example
require 'uri'
require 'net/http'

url = URI("https://api.gorilladash.com/api/v1/website-content/websites")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["GorillaDash-Api-Key"] = '{{API_KEY}}'
request["GorillaDash-Api-Secret"] = '{{GD_RESTFUL_SECRET}}'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"Franchise Council\",\n  \"url\": \"https://franchise.example.org\"\n}"

response = http.request(request)
puts response.read_body
```

```java Website Content_Websites_Create Website_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.gorilladash.com/api/v1/website-content/websites")
  .header("GorillaDash-Api-Key", "{{API_KEY}}")
  .header("GorillaDash-Api-Secret", "{{GD_RESTFUL_SECRET}}")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"Franchise Council\",\n  \"url\": \"https://franchise.example.org\"\n}")
  .asString();
```

```php Website Content_Websites_Create Website_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.gorilladash.com/api/v1/website-content/websites', [
  'body' => '{
  "name": "Franchise Council",
  "url": "https://franchise.example.org"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'GorillaDash-Api-Key' => '{{API_KEY}}',
    'GorillaDash-Api-Secret' => '{{GD_RESTFUL_SECRET}}',
  ],
]);

echo $response->getBody();
```

```csharp Website Content_Websites_Create Website_example
using RestSharp;

var client = new RestClient("https://api.gorilladash.com/api/v1/website-content/websites");
var request = new RestRequest(Method.POST);
request.AddHeader("GorillaDash-Api-Key", "{{API_KEY}}");
request.AddHeader("GorillaDash-Api-Secret", "{{GD_RESTFUL_SECRET}}");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"Franchise Council\",\n  \"url\": \"https://franchise.example.org\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Website Content_Websites_Create Website_example
import Foundation

let headers = [
  "GorillaDash-Api-Key": "{{API_KEY}}",
  "GorillaDash-Api-Secret": "{{GD_RESTFUL_SECRET}}",
  "Content-Type": "application/json"
]
let parameters = [
  "name": "Franchise Council",
  "url": "https://franchise.example.org"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.gorilladash.com/api/v1/website-content/websites")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```