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

# Replace research snippet

PUT https://api.aventure.vc/v1/entities/{entityId}/research/snippets/{snippetId}
Content-Type: application/json

Replaces a research snippet for an entity. Omitted optional body fields are cleared. The visible default (recognized types shown, unrecognized types hidden unless visible=true is sent), validation, and the NOT_VISIBLE warning (returned only when the saved row is hidden) all match create.

Reference: https://docs.aventure.vc/api-reference/a-venture-api/entity-research/replace-research-snippet

## Authentication

- `Authorization` header (bearer token, required) — User bearer token: Supabase or Clerk session JWT, Clerk OAuth access token, or Clerk personal API key
- `X-API-Key` header (required) — Admin API key for system-to-system write operations

## Request

### Path parameters

- `entityId` (string, required) — Canonical entity UUID.
- `snippetId` (integer, required) — Research snippet id.

### Query parameters

- `sourceType` (enum, required) — Write provenance source type.
  - Allowed values: `requestChangeForm`, `newsArticle`, `blogArticle`, `firstPartyWebsite`, `relatedPartyWebsite`, `thirdPartyWebsite`, `llm`, `aventureStaff`
- `sourceDetail` (string, required) — Source detail or reviewer reference for the write.
- `sourceProvider` (string, optional) — Provider name for provider-native IDs or slugs.
- `sourceProviderId` (string, optional) — Provider-native source ID.
- `sourceProviderSlug` (string, optional) — Provider-native source slug.
- `actorType` (enum, optional) — Actor type; inferred as agent when agentChassis and agentModel are supplied, or as employee from an authenticated user JWT session.
  - Allowed values: `agent`, `employee`
- `agentChassis` (string, optional) — Agent chassis token for agent-authored writes.
- `agentModel` (string, optional) — Agent model id for agent-authored writes.

### Body (application/json)

- `text` (string, required) — Snippet body text. Recognized types enforce the length and paragraph rules returned by the types endpoint. Write '$' literally in currency amounts — escaped forms such as '\$95 million' are rejected as shell artifacts; in a shell, pass the text via ANSI-C $'...' quoting or --from-file.
- `textType` (string, required) — Research snippet type token. Use one listed by GET /v1/entities/research/snippets/types for validation and default visibility; an unrecognized token is saved hidden (visible=false) unless visible=true is sent.
- `allowSuspectedShellStrip` (boolean, optional, nullable) — Override suspected shell-strip rejection for intentional prose that looks like a money phrase without a currency marker, or that intentionally contains an escape sequence before '$'. Prefer fixing shell quotes or using --from-file; set true only after confirming the value is intentional.
- `creator` (string, optional, nullable) — Creator identifier for the snippet write.
- `isCurrent` (boolean, optional, nullable) — Create defaults to true and appends a NEW current row, demoting the prior current row of this type to inactive history. Set false to write a non-current historical row.
- `isPrimary` (boolean, optional, nullable) — Primary row among current snippets of this type. Defaults to true when the row is current; promoting demotes the prior primary.
- `visible` (boolean, optional, nullable) — Whether the snippet appears in default reads. Omit to use the type default (recognized types visible, unrecognized types hidden); set explicitly to override.

## Response

### 200

OK

- `entityId` (string, required) — Canonical entity UUID
- `id` (integer, required)
- `isCurrent` (boolean, required) — Current row. The live snippet for its type; demoted historical rows read only with includePrivate.
- `isPrimary` (boolean, required) — Primary row among the current snippets of its type.
- `text` (string, required)
- `textType` (string, required)
- `visible` (boolean, required) — Whether the snippet appears in default reads. Admin/private reads (includePrivate) also return hidden rows.
- `compliance` (object, optional, nullable) — Derived character/word counts and governed-contract compliance for this snippet row; null when not evaluated.
  - `characterCount` (integer, required) — Character count of the row text (UTF-16 units).
  - `meetsRequirements` (boolean, required) — Whether the text satisfies every governed contract rule.
  - `violation` (list of string, required) — One human-readable reason per unmet rule; empty when compliant.
  - `wordCount` (integer, required) — Word count of the row text (whitespace-separated tokens).
- `createdAt` (datetime, optional, nullable)
- `updatedAt` (datetime, optional, nullable)

## Examples

**Request**

```json
{
  "text": "string",
  "textType": "string"
}
```

**Response**

```json
{
  "entityId": "string",
  "id": 1,
  "isCurrent": true,
  "isPrimary": true,
  "text": "string",
  "textType": "string",
  "visible": true,
  "compliance": {
    "characterCount": 1,
    "meetsRequirements": true,
    "violation": [
      "string"
    ],
    "wordCount": 1
  },
  "createdAt": "2024-01-15T09:30:00Z",
  "updatedAt": "2024-01-15T09:30:00Z"
}
```

**SDK Code**

```python
import requests

url = "https://api.aventure.vc/v1/entities/04e2bf9c-a100-72ad-83ff-ba69c647b30b/research/snippets/538"

querystring = {"actorType":"agent","agentChassis":"codex-cli","sourceDetail":"aventure.vc","sourceProvider":"TechCrunch","sourceProviderId":"tc-2026-05-20-example-round","sourceProviderSlug":"example-round","sourceType":"requestChangeForm"}

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

response = requests.put(url, json=payload, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://api.aventure.vc/v1/entities/04e2bf9c-a100-72ad-83ff-ba69c647b30b/research/snippets/538?actorType=agent&agentChassis=codex-cli&sourceDetail=aventure.vc&sourceProvider=TechCrunch&sourceProviderId=tc-2026-05-20-example-round&sourceProviderSlug=example-round&sourceType=requestChangeForm';
const options = {
  method: 'PUT',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"text":"string","textType":"string"}'
};

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://api.aventure.vc/v1/entities/04e2bf9c-a100-72ad-83ff-ba69c647b30b/research/snippets/538?actorType=agent&agentChassis=codex-cli&sourceDetail=aventure.vc&sourceProvider=TechCrunch&sourceProviderId=tc-2026-05-20-example-round&sourceProviderSlug=example-round&sourceType=requestChangeForm"

	payload := strings.NewReader("{\n  \"text\": \"string\",\n  \"textType\": \"string\"\n}")

	req, _ := http.NewRequest("PUT", 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://api.aventure.vc/v1/entities/04e2bf9c-a100-72ad-83ff-ba69c647b30b/research/snippets/538?actorType=agent&agentChassis=codex-cli&sourceDetail=aventure.vc&sourceProvider=TechCrunch&sourceProviderId=tc-2026-05-20-example-round&sourceProviderSlug=example-round&sourceType=requestChangeForm")

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

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"text\": \"string\",\n  \"textType\": \"string\"\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.put("https://api.aventure.vc/v1/entities/04e2bf9c-a100-72ad-83ff-ba69c647b30b/research/snippets/538?actorType=agent&agentChassis=codex-cli&sourceDetail=aventure.vc&sourceProvider=TechCrunch&sourceProviderId=tc-2026-05-20-example-round&sourceProviderSlug=example-round&sourceType=requestChangeForm")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"text\": \"string\",\n  \"textType\": \"string\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.aventure.vc/v1/entities/04e2bf9c-a100-72ad-83ff-ba69c647b30b/research/snippets/538?actorType=agent&agentChassis=codex-cli&sourceDetail=aventure.vc&sourceProvider=TechCrunch&sourceProviderId=tc-2026-05-20-example-round&sourceProviderSlug=example-round&sourceType=requestChangeForm', [
  'body' => '{
  "text": "string",
  "textType": "string"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.aventure.vc/v1/entities/04e2bf9c-a100-72ad-83ff-ba69c647b30b/research/snippets/538?actorType=agent&agentChassis=codex-cli&sourceDetail=aventure.vc&sourceProvider=TechCrunch&sourceProviderId=tc-2026-05-20-example-round&sourceProviderSlug=example-round&sourceType=requestChangeForm");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"text\": \"string\",\n  \"textType\": \"string\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

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

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.aventure.vc/v1/entities/04e2bf9c-a100-72ad-83ff-ba69c647b30b/research/snippets/538?actorType=agent&agentChassis=codex-cli&sourceDetail=aventure.vc&sourceProvider=TechCrunch&sourceProviderId=tc-2026-05-20-example-round&sourceProviderSlug=example-round&sourceType=requestChangeForm")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
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()
```