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

# Delete Section

DELETE https://apps.ediphai.com/v1/records/{record_type}/{record_id}/sections/{section}

Delete one section of a record. It is hidden from every view once the next build runs, in every revision of the record, later ones included; the record and its other sections stay. Needs the records:delete scope.

Reference: https://docs.ediphai.com/api/v1/reference/delete-section

## Authentication

- `Authorization` header (bearer token, required) — ediphai_test_... or ediphai_live_...

## Request

### Path parameters

- `record_type` (string, required)
- `record_id` (string, required)
- `section` (string, required)

## Response

### 200

Deleted, or already deleted

- `record_type` (string, required)
- `record_id` (string, required)
- `section` (string, required) — The section's key in the record's definition
- `state` ("deleted", required) — The section is deleted in every revision of the record, later ones included

## Errors

### 400 Client Request Error

Refused: read rule, pointer, fix and retryable

- `type` (string, required)
- `title` (string, required)
- `status` (integer, required)
- `pointer` (string, required) — JSON Pointer into the request; '' when the whole request is at fault
- `rule` (string, required) — A rule from the catalogue in the docs; new rules may be added
- `fix` (string, required)
- `retryable` (boolean, required) — true: send the same request again later. false: change the request first
- `detail` (string, optional)
- `retry_after_ms` (integer, optional)
- `errors` (list of ProblemErrorsItems, optional)

### 500 Server Error

Refused: read rule, pointer, fix and retryable

- `type` (string, required)
- `title` (string, required)
- `status` (integer, required)
- `pointer` (string, required) — JSON Pointer into the request; '' when the whole request is at fault
- `rule` (string, required) — A rule from the catalogue in the docs; new rules may be added
- `fix` (string, required)
- `retryable` (boolean, required) — true: send the same request again later. false: change the request first
- `detail` (string, optional)
- `retry_after_ms` (integer, optional)
- `errors` (list of ProblemErrorsItems, optional)

## Types

### ProblemErrorsItems

- `pointer` (string, required)
- `rule` (string, required)
- `fix` (string, required)

## Examples

**Response**

```json
{
  "record_type": "string",
  "record_id": "string",
  "section": "string",
  "state": "string"
}
```

**SDK Code**

```python
import requests

url = "https://apps.ediphai.com/v1/records/record_type/record_id/sections/section"

headers = {"Authorization": "Bearer <token>"}

response = requests.delete(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://apps.ediphai.com/v1/records/record_type/record_id/sections/section';
const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};

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

```go
package main

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

func main() {

	url := "https://apps.ediphai.com/v1/records/record_type/record_id/sections/section"

	req, _ := http.NewRequest("DELETE", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

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

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

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

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://apps.ediphai.com/v1/records/record_type/record_id/sections/section")

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

request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'

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

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.delete("https://apps.ediphai.com/v1/records/record_type/record_id/sections/section")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('DELETE', 'https://apps.ediphai.com/v1/records/record_type/record_id/sections/section', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://apps.ediphai.com/v1/records/record_type/record_id/sections/section");
var request = new RestRequest(Method.DELETE);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://apps.ediphai.com/v1/records/record_type/record_id/sections/section")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers

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()
```