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

# Auto Build Deal Page

POST https://app.termina.ai/api/v1/group/{group_id}/deal/{deal_id}/page/auto-build
Content-Type: application/json

Build the deal page from the usual templates when it holds only the seeded description or an unedited
auto-build. A page an analyst has edited is left alone unless ``force`` is set.

Reference: https://docs.termina.ai/api-reference/deal-management/deal/auto-build-page

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Servers

- `https://app.termina.ai` (Production server, default)
- `https://app.termina.dev` (Development server)
- `http://localhost:8000` (Local development server)

## Request

### Path parameters

- `group_id` (integer, required)
- `deal_id` (integer, required)

### Query parameters

- `force` (boolean, optional, default: false)

### Body (application/json)

This endpoint expects an AutoBuildDealPageRequest.

- `trigger` (string, optional, default: manual)
- `settings` (DealPageSettings, optional, nullable) — Chart settings the scan deck resolved. Absent when the build was not triggered by a scan.

## Response

### 200

Successful Response

- `status` (enum, required)
  - Allowed values: `succeeded`, `skipped`, `failed`
- `room_id` (string, required)
- `templates` (list of string, required)
- `content_hash` (string, optional, nullable)
- `skip_reason` (enum, optional, nullable)
  - Allowed values: `manual_content`, `edited_since_build`, `edited_during_build`, `build_in_progress`
- `dropped_types` (list of string, optional, default: [])
- `skipped_key_findings` (boolean, optional, default: false)

## Errors

### 422 Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

## Types

### DealPageSettings

Chart settings the scan deck resolved. Absent when the build was not triggered by a scan.

- `user_type` (string, optional, nullable)
- `metric` (string, optional, nullable)
- `freq` (enum, optional)
  - Allowed values: `M`, `Q`, `SA`, `A`
- `category` (string, optional, nullable)
- `talent_freq` (enum, optional, nullable)
  - Allowed values: `M`, `Q`, `SA`, `A`
- `product_sections` (list of DealPageProductSection, optional)
- `unit_economics_user_types` (list of string, optional)
- `unit_economics_in_appendix` (boolean, optional, default: false)

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)
- `input` (any, optional)
- `ctx` (ValidationErrorCtx, optional)

### DealPageProductSection

One product section of the scan deck: a user type shown for one metric.

- `user_type` (string, required)
- `metric` (string, required)

### ValidationErrorLocItems

- string
- integer

### ValidationErrorCtx

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "status": "succeeded",
  "room_id": "string",
  "templates": [
    "string"
  ],
  "content_hash": "string",
  "skip_reason": "manual_content",
  "dropped_types": [
    "string"
  ],
  "skipped_key_findings": false
}
```

**SDK Code**

```python
import requests

url = "https://app.termina.ai/api/v1/group/1/deal/1/page/auto-build"

payload = {}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://app.termina.ai/api/v1/group/1/deal/1/page/auto-build';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{}'
};

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"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://app.termina.ai/api/v1/group/1/deal/1/page/auto-build"

	payload := strings.NewReader("{}")

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

	req.Header.Add("Authorization", "Bearer <token>")
	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
require 'uri'
require 'net/http'

url = URI("https://app.termina.ai/api/v1/group/1/deal/1/page/auto-build")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"

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.post("https://app.termina.ai/api/v1/group/1/deal/1/page/auto-build")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.termina.ai/api/v1/group/1/deal/1/page/auto-build', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://app.termina.ai/api/v1/group/1/deal/1/page/auto-build");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://app.termina.ai/api/v1/group/1/deal/1/page/auto-build")! 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()
```