> 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.

# Update Section

PATCH https://api.gorilladash.com/api/v1/website-content/websites/%7BWEBSITE_ID%7D/sections/%7BSECTION_ID%7D
Content-Type: application/json

Partly updates a section by id. Needs a key with **Website Content: Read and Write** (`website-content:write`).

Only the fields you send change, and every field is optional. `PUT` on the same URL behaves the same way.

Reference: https://docs.gorilladash.com/gorilla-dash-rest-ful-api/website-content/sections/update-section

## 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.

- `contents` (list of ApiV1WebsiteContentWebsites7BwebsiteId7DSections7BsectionId7DPatchRequestBodyContentApplicationJsonSchemaContentsItems, required)

## Response

### 201

Created

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

## Errors

### 404 Not Found Error

Not Found

- `message` (string, required)

## Types

### ApiV1WebsiteContentWebsites7BwebsiteId7DSections7BsectionId7DPatchRequestBodyContentApplicationJsonSchemaContentsItems

- `name` (string, required)
- `type` (string, required)
- `media_id` (integer, required)

### ApiV1WebsiteContentWebsites7BwebsiteId7DSections7BsectionId7DPatchResponsesContentApplicationJsonSchemaData

- `id` (integer, required)
- `website_id` (integer, required)
- `name` (string, required)
- `created_at` (datetime, required)
- `updated_at` (datetime, required)
- `contents` (list of ApiV1WebsiteContentWebsites7BwebsiteId7DSections7BsectionId7DPatchResponsesContentApplicationJsonSchemaDataContentsItems, required)

### ApiV1WebsiteContentWebsites7BwebsiteId7DSections7BsectionId7DPatchResponsesContentApplicationJsonSchemaDataContentsItems

- `id` (integer, required)
- `name` (string, required)
- `type` (string, required)
- `editor_type` (string, required)
- `media` (list of ApiV1WebsiteContentWebsites7BwebsiteId7DSections7BsectionId7DPatchResponsesContentApplicationJsonSchemaDataContentsItemsMediaItems, required)
- `value` (any, optional)

### ApiV1WebsiteContentWebsites7BwebsiteId7DSections7BsectionId7DPatchResponsesContentApplicationJsonSchemaDataContentsItemsMediaItems

- `id` (integer, required)
- `url` (string, required)

## Examples

**Request**

```json
{
  "contents": [
    {
      "name": "Partner",
      "type": "image",
      "media_id": 812
    },
    {
      "name": "Partner Link",
      "type": "text",
      "media_id": 1,
      "value": "/NAB"
    },
    {
      "name": "Partner",
      "type": "image",
      "media_id": 813
    },
    {
      "name": "Partner Link",
      "type": "text",
      "media_id": 1,
      "value": "/Westpac"
    }
  ]
}
```

**Response**

```json
{
  "success": true,
  "status": 201,
  "data": {
    "id": 77,
    "website_id": 206,
    "name": "Partners",
    "created_at": "2026-10-07T01:20:00+00:00",
    "updated_at": "2026-10-07T01:20:00+00:00",
    "contents": [
      {
        "id": 3101,
        "name": "Partner",
        "type": "image",
        "editor_type": "Single Image",
        "media": [
          {
            "id": 812,
            "url": "https://cdn.gorilladash.com/media/812/nab.png"
          }
        ]
      },
      {
        "id": 3102,
        "name": "Partner Link",
        "type": "text",
        "editor_type": "Short Text",
        "media": [],
        "value": null
      }
    ]
  }
}
```

**SDK Code**

```python Website Content_Sections_Update Section_example
import requests

url = "https://api.gorilladash.com/api/v1/website-content/websites/%7BWEBSITE_ID%7D/sections/%7BSECTION_ID%7D"

payload = { "contents": [
        {
            "name": "Partner",
            "type": "image",
            "media_id": 812
        },
        {
            "name": "Partner Link",
            "type": "text",
            "media_id": 1,
            "value": "/NAB"
        },
        {
            "name": "Partner",
            "type": "image",
            "media_id": 813
        },
        {
            "name": "Partner Link",
            "type": "text",
            "media_id": 1,
            "value": "/Westpac"
        }
    ] }
headers = {
    "GorillaDash-Api-Key": "{{API_KEY}}",
    "GorillaDash-Api-Secret": "{{GD_RESTFUL_SECRET}}",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Website Content_Sections_Update Section_example
const url = 'https://api.gorilladash.com/api/v1/website-content/websites/%7BWEBSITE_ID%7D/sections/%7BSECTION_ID%7D';
const options = {
  method: 'PATCH',
  headers: {
    'GorillaDash-Api-Key': '{{API_KEY}}',
    'GorillaDash-Api-Secret': '{{GD_RESTFUL_SECRET}}',
    'Content-Type': 'application/json'
  },
  body: '{"contents":[{"name":"Partner","type":"image","media_id":812},{"name":"Partner Link","type":"text","media_id":1,"value":"/NAB"},{"name":"Partner","type":"image","media_id":813},{"name":"Partner Link","type":"text","media_id":1,"value":"/Westpac"}]}'
};

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

```go Website Content_Sections_Update Section_example
package main

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

func main() {

	url := "https://api.gorilladash.com/api/v1/website-content/websites/%7BWEBSITE_ID%7D/sections/%7BSECTION_ID%7D"

	payload := strings.NewReader("{\n  \"contents\": [\n    {\n      \"name\": \"Partner\",\n      \"type\": \"image\",\n      \"media_id\": 812\n    },\n    {\n      \"name\": \"Partner Link\",\n      \"type\": \"text\",\n      \"media_id\": 1,\n      \"value\": \"/NAB\"\n    },\n    {\n      \"name\": \"Partner\",\n      \"type\": \"image\",\n      \"media_id\": 813\n    },\n    {\n      \"name\": \"Partner Link\",\n      \"type\": \"text\",\n      \"media_id\": 1,\n      \"value\": \"/Westpac\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("PATCH", 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_Sections_Update Section_example
require 'uri'
require 'net/http'

url = URI("https://api.gorilladash.com/api/v1/website-content/websites/%7BWEBSITE_ID%7D/sections/%7BSECTION_ID%7D")

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

request = Net::HTTP::Patch.new(url)
request["GorillaDash-Api-Key"] = '{{API_KEY}}'
request["GorillaDash-Api-Secret"] = '{{GD_RESTFUL_SECRET}}'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"contents\": [\n    {\n      \"name\": \"Partner\",\n      \"type\": \"image\",\n      \"media_id\": 812\n    },\n    {\n      \"name\": \"Partner Link\",\n      \"type\": \"text\",\n      \"media_id\": 1,\n      \"value\": \"/NAB\"\n    },\n    {\n      \"name\": \"Partner\",\n      \"type\": \"image\",\n      \"media_id\": 813\n    },\n    {\n      \"name\": \"Partner Link\",\n      \"type\": \"text\",\n      \"media_id\": 1,\n      \"value\": \"/Westpac\"\n    }\n  ]\n}"

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

```java Website Content_Sections_Update Section_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.gorilladash.com/api/v1/website-content/websites/%7BWEBSITE_ID%7D/sections/%7BSECTION_ID%7D")
  .header("GorillaDash-Api-Key", "{{API_KEY}}")
  .header("GorillaDash-Api-Secret", "{{GD_RESTFUL_SECRET}}")
  .header("Content-Type", "application/json")
  .body("{\n  \"contents\": [\n    {\n      \"name\": \"Partner\",\n      \"type\": \"image\",\n      \"media_id\": 812\n    },\n    {\n      \"name\": \"Partner Link\",\n      \"type\": \"text\",\n      \"media_id\": 1,\n      \"value\": \"/NAB\"\n    },\n    {\n      \"name\": \"Partner\",\n      \"type\": \"image\",\n      \"media_id\": 813\n    },\n    {\n      \"name\": \"Partner Link\",\n      \"type\": \"text\",\n      \"media_id\": 1,\n      \"value\": \"/Westpac\"\n    }\n  ]\n}")
  .asString();
```

```php Website Content_Sections_Update Section_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.gorilladash.com/api/v1/website-content/websites/%7BWEBSITE_ID%7D/sections/%7BSECTION_ID%7D', [
  'body' => '{
  "contents": [
    {
      "name": "Partner",
      "type": "image",
      "media_id": 812
    },
    {
      "name": "Partner Link",
      "type": "text",
      "media_id": 1,
      "value": "/NAB"
    },
    {
      "name": "Partner",
      "type": "image",
      "media_id": 813
    },
    {
      "name": "Partner Link",
      "type": "text",
      "media_id": 1,
      "value": "/Westpac"
    }
  ]
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'GorillaDash-Api-Key' => '{{API_KEY}}',
    'GorillaDash-Api-Secret' => '{{GD_RESTFUL_SECRET}}',
  ],
]);

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

```csharp Website Content_Sections_Update Section_example
using RestSharp;

var client = new RestClient("https://api.gorilladash.com/api/v1/website-content/websites/%7BWEBSITE_ID%7D/sections/%7BSECTION_ID%7D");
var request = new RestRequest(Method.PATCH);
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  \"contents\": [\n    {\n      \"name\": \"Partner\",\n      \"type\": \"image\",\n      \"media_id\": 812\n    },\n    {\n      \"name\": \"Partner Link\",\n      \"type\": \"text\",\n      \"media_id\": 1,\n      \"value\": \"/NAB\"\n    },\n    {\n      \"name\": \"Partner\",\n      \"type\": \"image\",\n      \"media_id\": 813\n    },\n    {\n      \"name\": \"Partner Link\",\n      \"type\": \"text\",\n      \"media_id\": 1,\n      \"value\": \"/Westpac\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Website Content_Sections_Update Section_example
import Foundation

let headers = [
  "GorillaDash-Api-Key": "{{API_KEY}}",
  "GorillaDash-Api-Secret": "{{GD_RESTFUL_SECRET}}",
  "Content-Type": "application/json"
]
let parameters = ["contents": [
    [
      "name": "Partner",
      "type": "image",
      "media_id": 812
    ],
    [
      "name": "Partner Link",
      "type": "text",
      "media_id": 1,
      "value": "/NAB"
    ],
    [
      "name": "Partner",
      "type": "image",
      "media_id": 813
    ],
    [
      "name": "Partner Link",
      "type": "text",
      "media_id": 1,
      "value": "/Westpac"
    ]
  ]] 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/%7BWEBSITE_ID%7D/sections/%7BSECTION_ID%7D")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
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()
```