> 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.

# Submit a colour Assessment

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

Measures the colour of up to four regions in each of up to eight evidence
images. A region is `[left, top, right, bottom]` in pixels, at least 16 on each
side and inside its image. Every limit is checked before anything is written, so
a refusal is `400 INVALID_REQUEST` naming the image or region and records
nothing. The answer is `202` with the assessment `queued` and its recorded
`request`, which binds each evidence id to the digest of the bytes it will
measure. Poll `GET /v1/digitisation/assessments/{assessment_id}` for the result.
Send an `Idempotency-Key`: it is required, and a retry with the same key and
the same request answers the first response, byte for byte, with
`Idempotency-Replayed: true`.
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/assessments-create

## Authentication

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

## Request

### Headers

- `Idempotency-Key` (string, optional, nullable)

### Body (application/json)

This endpoint expects an object.

- `images` (list of V1DigitisationAssessmentsPostRequestBodyContentApplicationJsonSchemaImagesItems, required)
- `subject` (V1DigitisationAssessmentsPostRequestBodyContentApplicationJsonSchemaSubject, optional, nullable) — The product the images show, as the caller names it. Every field is optional and descriptive: it is what a reviewer reads, never what is measured. A stage of a candidate defaults its ``external_ref`` and ``shade_name`` from it.

## Response

### 202

The assessment, queued; a replay under the same Idempotency-Key answers it again with Idempotency-Replayed: true

- `attempts` (integer, required)
- `colour_contract_version` (integer, required)
- `created_at` (datetime, required)
- `failure_code` (enum, required, nullable)
  - Allowed values: `evidence_erased`, `evidence_integrity`, `colour_contract_changed`, `attempts_exhausted`, `detection_unavailable`
- `finished_at` (datetime, required, nullable)
- `id` (string, required)
- `output` (AssessmentResultDocument, required, nullable) — The canonical result; ``result_sha256`` is its digest.
- `output_sha256` (string, required, nullable)
- `request` (AssessmentRequestDocument, required) — The canonical request; ``request_sha256`` is its digest.
- `request_sha256` (string, required)
- `started_at` (datetime, required, nullable)
- `status` (enum, required)
  - Allowed values: `queued`, `running`, `succeeded`, `failed`, `cancelled`

## Errors

### 400 Bad Request Error

Invalid assessment or Idempotency-Key

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

### 409 Conflict Error

Idempotency conflict

- `error` (ErrorDetail, required)

### 503 Service Unavailable Error

Digitisation unavailable

- `error` (ErrorDetail, required)

## Types

### V1DigitisationAssessmentsPostRequestBodyContentApplicationJsonSchemaImagesItems

One evidence image of an assessment, and the regions to measure on it: ``"auto"`` to have one found, where the deployment enables it.

- `evidence_id` (string, required)
- `regions` (V1DigitisationAssessmentsPostRequestBodyContentApplicationJsonSchemaImagesItemsRegions, required)

### V1DigitisationAssessmentsPostRequestBodyContentApplicationJsonSchemaSubject

The product the images show, as the caller names it. Every field is optional and descriptive: it is what a reviewer reads, never what is measured. A stage of a candidate defaults its ``external_ref`` and ``shade_name`` from it.

- `brand` (string, optional, nullable)
- `external_ref` (string, optional, nullable)
- `gtin` (string, optional, nullable)
- `product_name` (string, optional, nullable)
- `shade_name` (string, optional, nullable)

### AssessmentResultDocument

The canonical result; ``result_sha256`` is its digest.

- `colour_contract_version` (integer, required)
- `images` (list of AssessmentImageResult, required)
- `kind` ("digitisation.assessment_result", required)
- `request_sha256` (string, required)

### AssessmentRequestDocument

The canonical request; ``request_sha256`` is its digest.

- `colour_contract_version` (integer, required)
- `images` (list of AssessmentRequestImage, required)
- `kind` ("digitisation.assessment_request", required)
- `subject` (SubjectDocument, optional) — A subject as recorded: only the fields that were sent.

### ErrorDetail

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

### V1DigitisationAssessmentsPostRequestBodyContentApplicationJsonSchemaImagesItemsRegions

- list of list of integer
- "auto"

### AssessmentImageResult

- `analyzed_bytes_sha256` (string, required)
- `evidence_id` (string, required)
- `regions` (list of map from string to any, required)
- `detection` (RegionDetection, optional) — How an ``"auto"`` image's region was found. ``detected`` is the model's box and ``region`` the even window measured inside it, both in stored-image pixels; null when nothing measurable was found, and ``reasons`` says why. The model never names a colour: the region's report is the colour contract's. ``model``, ``photo_type`` and ``confidence`` are null only when no model was asked (``reasons`` then holds the colour contract's code for an image it refuses).

### AssessmentRequestImage

An image as the request recorded it: its id bound to the measured bytes.

- `analyzed_bytes_sha256` (string, required)
- `evidence_id` (string, required)
- `regions` (AssessmentRequestImageRegions, required)

### SubjectDocument

A subject as recorded: only the fields that were sent.

- `brand` (string, optional)
- `external_ref` (string, optional)
- `gtin` (string, optional)
- `product_name` (string, optional)
- `shade_name` (string, optional)

### ErrorDetailDetails

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

### RegionDetection

How an ``"auto"`` image's region was found. ``detected`` is the model's box and ``region`` the even window measured inside it, both in stored-image pixels; null when nothing measurable was found, and ``reasons`` says why. The model never names a colour: the region's report is the colour contract's. ``model``, ``photo_type`` and ``confidence`` are null only when no model was asked (``reasons`` then holds the colour contract's code for an image it refuses).

- `confidence` (double, required, nullable)
- `detected` (list of integer, required, nullable)
- `model` (string, required, nullable)
- `photo_type` (enum, required, nullable)
  - Allowed values: `swatch`, `packshot`, `model`, `box_art`, `other`
- `reasons` (list of string, required)
- `region` (list of integer, required, nullable)

### AssessmentRequestImageRegions

- list of list of integer
- "auto"

## Examples

**Request**

```json
{
  "images": [
    {
      "evidence_id": "string",
      "regions": [
        [
          1
        ]
      ]
    }
  ]
}
```

**Response**

```json
{
  "attempts": 0,
  "colour_contract_version": 1,
  "created_at": "2026-10-22T03:19:40.254296Z",
  "failure_code": null,
  "finished_at": null,
  "id": "assessment_3t38gf4mbt0y96z8pzmp4w5mpq",
  "output": null,
  "output_sha256": null,
  "request": {
    "colour_contract_version": 1,
    "images": [
      {
        "analyzed_bytes_sha256": "9229dacfcfb7a93b54efccf2119c2e417546d10ed3fce2a18a067294b646c5a2",
        "evidence_id": "evidence_6952rp5rnjq4bpn9sk93vbq6pv",
        "regions": [
          [
            0,
            0,
            32,
            32
          ],
          [
            16,
            16,
            64,
            64
          ]
        ]
      },
      {
        "analyzed_bytes_sha256": "802a63709b9b3660da4dd729a944279d93b7589b3e441ed02e76f8bef05f7038",
        "evidence_id": "evidence_4jvaws4n7vkx8t6tz6awjwdsv8",
        "regions": [
          [
            0,
            0,
            32,
            32
          ]
        ]
      }
    ],
    "kind": "digitisation.assessment_request"
  },
  "request_sha256": "f69b572a86480a0d96286c0440e63567fdfdc276aa7f39b58357e565c170ce97",
  "started_at": null,
  "status": "queued"
}
```

**SDK Code**

```python Digitisation_assessmentsCreate_example
import requests

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

payload = { "images": [
        {
            "evidence_id": "string",
            "regions": [[1]]
        }
    ] }
headers = {
    "X-API-Key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Digitisation_assessmentsCreate_example
const url = 'https://api.morphiaone.ai/v1/digitisation/assessments';
const options = {
  method: 'POST',
  headers: {'X-API-Key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"images":[{"evidence_id":"string","regions":[[1]]}]}'
};

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

```go Digitisation_assessmentsCreate_example
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"images\": [\n    {\n      \"evidence_id\": \"string\",\n      \"regions\": [\n        [\n          1\n        ]\n      ]\n    }\n  ]\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_assessmentsCreate_example
require 'uri'
require 'net/http'

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

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  \"images\": [\n    {\n      \"evidence_id\": \"string\",\n      \"regions\": [\n        [\n          1\n        ]\n      ]\n    }\n  ]\n}"

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

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

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

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

$client = new \GuzzleHttp\Client();

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

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

```csharp Digitisation_assessmentsCreate_example
using RestSharp;

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

```swift Digitisation_assessmentsCreate_example
import Foundation

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

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

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