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

# Generate an embedded URL

POST https://anthropod.in/api/v2/embedded_urls/generate/
Content-Type: application/json

Create a URL for an existing Conversation or Customer dashboard view. The selected dashboard user must already have access. The URL expires after 60 minutes; treat it as opaque. This returns a dashboard URL, not analytics JSON. [Embedding guide](/embedded-urls).

Reference: https://docs.anthropod.in/api-reference/embedded-urls/generate-embedded-url

## Authentication

- `Authorization` header (bearer token, required) — Existing private account API key from Developer Hub. Keep it on your backend.

## Request

### Body (application/json)

This endpoint expects an object.

- `service_id` (string, required) — Authorized project/service name.
- `request_id` (string, required) — Existing conversation ID or customer ID, matching request_type.
- `request_type` (enum, required) — Dashboard view to embed.
  - Allowed values: `conversations`, `customers`
- `email` (string, required) — Dashboard user who already has access to the project.

## Response

### 200

Request acknowledgement or initiation result; see the response fields.

- `embedded_url` (string, required) — Opaque URL for the requested dashboard view. Expires 60 minutes after creation. Use it unchanged and do not publicly share it.

## Errors

### 400 Bad Request Error

Missing/invalid fields, unsupported view, or record not found.

- `error` (string, required) — Descriptive failure reason. Do not depend on exact message wording.
- `error_type` (string, optional) — Optional error category; not returned by every handler.

### 401 Unauthorized Error

Invalid key/service or dashboard user without access.

- `error` (string, required) — Descriptive failure reason. Do not depend on exact message wording.
- `error_type` (string, optional) — Optional error category; not returned by every handler.

### 500 Internal Server Error

URL generation failed.

- `error` (string, required) — Descriptive failure reason. Do not depend on exact message wording.
- `error_type` (string, optional) — Optional error category; not returned by every handler.

## Examples

**Request**

```json
{
  "service_id": "SALES",
  "request_id": "conversation_demo_001",
  "request_type": "conversations",
  "email": "reviewer@example.com"
}
```

**Response**

```json
{
  "embedded_url": "https://dashboard.anthropod.in/embedded/CLIENT/SALES/conversations/conversation_demo_001/?token=REDACTED&email=reviewer%40example.com"
}
```

**SDK Code**

```python
import requests

url = "https://anthropod.in/api/v2/embedded_urls/generate/"

payload = {
    "service_id": "SALES",
    "request_id": "conversation_demo_001",
    "request_type": "conversations",
    "email": "reviewer@example.com"
}
headers = {
    "Authorization": "Bearer <accountApiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://anthropod.in/api/v2/embedded_urls/generate/';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <accountApiKey>', 'Content-Type': 'application/json'},
  body: '{"service_id":"SALES","request_id":"conversation_demo_001","request_type":"conversations","email":"reviewer@example.com"}'
};

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://anthropod.in/api/v2/embedded_urls/generate/"

	payload := strings.NewReader("{\n  \"service_id\": \"SALES\",\n  \"request_id\": \"conversation_demo_001\",\n  \"request_type\": \"conversations\",\n  \"email\": \"reviewer@example.com\"\n}")

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

	req.Header.Add("Authorization", "Bearer <accountApiKey>")
	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://anthropod.in/api/v2/embedded_urls/generate/")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <accountApiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"service_id\": \"SALES\",\n  \"request_id\": \"conversation_demo_001\",\n  \"request_type\": \"conversations\",\n  \"email\": \"reviewer@example.com\"\n}"

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://anthropod.in/api/v2/embedded_urls/generate/")
  .header("Authorization", "Bearer <accountApiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"service_id\": \"SALES\",\n  \"request_id\": \"conversation_demo_001\",\n  \"request_type\": \"conversations\",\n  \"email\": \"reviewer@example.com\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://anthropod.in/api/v2/embedded_urls/generate/', [
  'body' => '{
  "service_id": "SALES",
  "request_id": "conversation_demo_001",
  "request_type": "conversations",
  "email": "reviewer@example.com"
}',
  'headers' => [
    'Authorization' => 'Bearer <accountApiKey>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://anthropod.in/api/v2/embedded_urls/generate/");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <accountApiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"service_id\": \"SALES\",\n  \"request_id\": \"conversation_demo_001\",\n  \"request_type\": \"conversations\",\n  \"email\": \"reviewer@example.com\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <accountApiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "service_id": "SALES",
  "request_id": "conversation_demo_001",
  "request_type": "conversations",
  "email": "reviewer@example.com"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://anthropod.in/api/v2/embedded_urls/generate/")! 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()
```