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

# Retain an Asset as digitisation Evidence

POST https://api.morphiaone.ai/v1/digitisation/evidence
Content-Type: application/json

Copies the bytes of one of your uploaded Assets into evidence you own: it
outlives the Asset's expiry and is erased only with your account's data. The
evidence records the upload's digest, the digest of the bytes it measures, its
dimensions and the colour contract version it was retained under. Retention is
content-addressed, so the same image again answers the same evidence: `201` the
first time, `200` after, and a retry needs no `Idempotency-Key`. Another
account's Asset, and an expired or unknown one, answer `404 ASSET_NOT_FOUND`; an
Asset that is not an intact upload of yours, such as a job result, answers
`409 EVIDENCE_SOURCE_UNUSABLE`.
Requires the `digitisation.write` scope, which your account operator provisions;
served only where digitisation is enabled for your environment.

Reference: https://docs.morphiaone.ai/api-reference/endpoints/digitisation/evidence-retain

## Authentication

- `X-API-Key` header (required) — API key for one environment of your account. Keep server-side; never expose in browser clients.

## Request

### Body (application/json)

This endpoint expects a Digitisation_evidenceRetain_Request.

- `Digitisation_evidenceRetain_Request`
  - any
  - any

## Response

### 200

The evidence this image already is

- `analyzed_bytes_sha256` (string, required)
- `colour_contract_version` (integer, required)
- `created_at` (datetime, required)
- `erased_at` (datetime, required, nullable)
- `height` (integer, required)
- `id` (string, required)
- `media_type` (enum, required)
  - Allowed values: `image/jpeg`, `image/png`, `image/webp`
- `original_upload_sha256` (string, required)
- `sanitizer_revision` (integer, required)
- `size_bytes` (integer, required)
- `source_asset_id` (string, required)
- `status` (enum, required)
  - Allowed values: `pending`, `stored`, `erased`
- `stored_at` (datetime, required, nullable)
- `width` (integer, required)

### 201

The evidence, retained now

- `analyzed_bytes_sha256` (string, required)
- `colour_contract_version` (integer, required)
- `created_at` (datetime, required)
- `erased_at` (datetime, required, nullable)
- `height` (integer, required)
- `id` (string, required)
- `media_type` (enum, required)
  - Allowed values: `image/jpeg`, `image/png`, `image/webp`
- `original_upload_sha256` (string, required)
- `sanitizer_revision` (integer, required)
- `size_bytes` (integer, required)
- `source_asset_id` (string, required)
- `status` (enum, required)
  - Allowed values: `pending`, `stored`, `erased`
- `stored_at` (datetime, required, nullable)
- `width` (integer, required)

## Errors

### 400 Bad Request Error

Invalid request

- `error` (ErrorDetail, required)

### 401 Unauthorized Error

Missing or invalid API key

- `error` (ErrorDetail, required)

### 403 Forbidden Error

API key lacks the digitisation.write scope

- `error` (ErrorDetail, required)

### 404 Not Found Error

No such asset

- `error` (ErrorDetail, required)

### 409 Conflict Error

The asset is not an intact uploaded input

- `error` (ErrorDetail, required)

### 429 Too Many Requests Error

Upload rate exceeded

- `error` (ErrorDetail, required)

### 503 Service Unavailable Error

Digitisation unavailable

- `error` (ErrorDetail, required)

## Types

### ErrorDetail

- `code` (string, required)
- `message` (string, required)
- `request_id` (string, required)
- `details` (ErrorDetailDetails, optional)
- `doc_url` (string, optional, nullable)
- `retryable` (boolean, optional, nullable)

### ErrorDetailDetails

- map from string to any
- list of map from string to any

## Examples

### Digitisation_evidenceRetain_example

**Request**

```json
{
  "asset_id": "string"
}
```

**Response**

```json
{
  "analyzed_bytes_sha256": "802a63709b9b3660da4dd729a944279d93b7589b3e441ed02e76f8bef05f7038",
  "colour_contract_version": 1,
  "created_at": "2026-10-22T03:19:40.230066Z",
  "erased_at": null,
  "height": 64,
  "id": "evidence_4jvaws4n7vkx8t6tz6awjwdsv8",
  "media_type": "image/png",
  "original_upload_sha256": "802a63709b9b3660da4dd729a944279d93b7589b3e441ed02e76f8bef05f7038",
  "sanitizer_revision": 1,
  "size_bytes": 185,
  "source_asset_id": "asset_1rjwfg9g5jts7r99dpe1mdbzkj",
  "status": "stored",
  "stored_at": "2026-10-22T03:19:40.230066Z",
  "width": 64
}
```

**SDK Code**

```python Digitisation_evidenceRetain_example
import requests

url = "https://api.morphiaone.ai/v1/digitisation/evidence"

payload = { "asset_id": "string" }
headers = {
    "X-API-Key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Digitisation_evidenceRetain_example
const url = 'https://api.morphiaone.ai/v1/digitisation/evidence';
const options = {
  method: 'POST',
  headers: {'X-API-Key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"asset_id":"string"}'
};

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

```go Digitisation_evidenceRetain_example
package main

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

func main() {

	url := "https://api.morphiaone.ai/v1/digitisation/evidence"

	payload := strings.NewReader("{\n  \"asset_id\": \"string\"\n}")

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

	req.Header.Add("X-API-Key", "<apiKey>")
	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 Digitisation_evidenceRetain_example
require 'uri'
require 'net/http'

url = URI("https://api.morphiaone.ai/v1/digitisation/evidence")

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

request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"asset_id\": \"string\"\n}"

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

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

HttpResponse<String> response = Unirest.post("https://api.morphiaone.ai/v1/digitisation/evidence")
  .header("X-API-Key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"asset_id\": \"string\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.morphiaone.ai/v1/digitisation/evidence', [
  'body' => '{
  "asset_id": "string"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-API-Key' => '<apiKey>',
  ],
]);

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

```csharp Digitisation_evidenceRetain_example
using RestSharp;

var client = new RestClient("https://api.morphiaone.ai/v1/digitisation/evidence");
var request = new RestRequest(Method.POST);
request.AddHeader("X-API-Key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"asset_id\": \"string\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Digitisation_evidenceRetain_example
import Foundation

let headers = [
  "X-API-Key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["asset_id": "string"] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.morphiaone.ai/v1/digitisation/evidence")! 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()
```

### Digitisation_evidenceRetain_example

**Request**

```json
{
  "asset_id": "string"
}
```

**Response**

```json
{
  "analyzed_bytes_sha256": "802a63709b9b3660da4dd729a944279d93b7589b3e441ed02e76f8bef05f7038",
  "colour_contract_version": 1,
  "created_at": "2026-10-22T03:19:40.230066Z",
  "erased_at": null,
  "height": 64,
  "id": "evidence_4jvaws4n7vkx8t6tz6awjwdsv8",
  "media_type": "image/png",
  "original_upload_sha256": "802a63709b9b3660da4dd729a944279d93b7589b3e441ed02e76f8bef05f7038",
  "sanitizer_revision": 1,
  "size_bytes": 185,
  "source_asset_id": "asset_1rjwfg9g5jts7r99dpe1mdbzkj",
  "status": "stored",
  "stored_at": "2026-10-22T03:19:40.230066Z",
  "width": 64
}
```

**SDK Code**

```python Digitisation_evidenceRetain_example
import requests

url = "https://api.morphiaone.ai/v1/digitisation/evidence"

payload = { "asset_id": "string" }
headers = {
    "X-API-Key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Digitisation_evidenceRetain_example
const url = 'https://api.morphiaone.ai/v1/digitisation/evidence';
const options = {
  method: 'POST',
  headers: {'X-API-Key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"asset_id":"string"}'
};

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

```go Digitisation_evidenceRetain_example
package main

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

func main() {

	url := "https://api.morphiaone.ai/v1/digitisation/evidence"

	payload := strings.NewReader("{\n  \"asset_id\": \"string\"\n}")

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

	req.Header.Add("X-API-Key", "<apiKey>")
	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 Digitisation_evidenceRetain_example
require 'uri'
require 'net/http'

url = URI("https://api.morphiaone.ai/v1/digitisation/evidence")

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

request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"asset_id\": \"string\"\n}"

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

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

HttpResponse<String> response = Unirest.post("https://api.morphiaone.ai/v1/digitisation/evidence")
  .header("X-API-Key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"asset_id\": \"string\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.morphiaone.ai/v1/digitisation/evidence', [
  'body' => '{
  "asset_id": "string"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-API-Key' => '<apiKey>',
  ],
]);

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

```csharp Digitisation_evidenceRetain_example
using RestSharp;

var client = new RestClient("https://api.morphiaone.ai/v1/digitisation/evidence");
var request = new RestRequest(Method.POST);
request.AddHeader("X-API-Key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"asset_id\": \"string\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Digitisation_evidenceRetain_example
import Foundation

let headers = [
  "X-API-Key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["asset_id": "string"] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.morphiaone.ai/v1/digitisation/evidence")! 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()
```