Skip to main content
POST
/
v1
/
datasets
/
attest
Attest Dataset
curl --request POST \
  --url https://api.truthlocks.com/v1/datasets/attest \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "name": "training-data-v3",
  "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
  "format": "parquet",
  "size_bytes": 1073741824,
  "agent_id": "550e8400-e29b-41d4-a716-446655440000"
}
'
{
  "dataset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "receipt_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "hash": "<string>",
  "format": "<string>",
  "size_bytes": 123,
  "agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "metadata": {},
  "created_at": "2023-11-07T05:31:56Z"
}
Creates a cryptographically anchored attestation for a dataset, recording its provenance, integrity hash, and schema version. The attestation is linked to the originating agent and anchored in the transparency log for full auditability. Dataset attestations enable downstream consumers to verify that training data, evaluation sets, or inference inputs have not been tampered with and can be traced back to a known source.

Authentication

X-API-Key
string
required
API key with datasets:write scope. Alternatively, pass a Bearer JWT token in the Authorization header.
X-Tenant-ID
string
required
Tenant identifier for multi-tenant isolation.

Request

agent_id
string
required
MAIP agent identifier that produced or owns this dataset (e.g. maip-agent:01HXYZ...).
name
string
required
Human-readable dataset name. Must be unique within the agent’s namespace.
version
string
Semantic version of the dataset (e.g. 1.0.0). Defaults to 1.0.0 if omitted.
hash
string
SHA-256 hex digest of the dataset contents. Used for integrity verification at consumption time.
record_count
integer
Total number of records in the dataset.
schema_version
string
Version identifier for the dataset’s internal schema (e.g. v2.1).
source_uri
string
URI pointing to the dataset’s storage location (e.g. s3://bucket/path/data.parquet).
metadata
object
Arbitrary key-value metadata attached to the attestation. Useful for tagging, categorization, or linking to external systems.

Response

id
string
Unique dataset attestation identifier in MAIP format (maip-ds:ULID).
agent_id
string
The agent that attested this dataset.
name
string
Dataset name as provided in the request.
version
string
Resolved version of the dataset.
hash
string
SHA-256 hex digest stored for integrity verification.
status
string
Attestation status. Always attested on creation.
receipt_id
string
Transparency-log receipt anchoring this attestation.
created_at
string
ISO 8601 timestamp of creation.

Authorizations

X-API-Key
string
header
required

API key for machine-to-machine authentication

Body

application/json
name
string
required

Dataset name

hash
string
required

SHA-256 hash of the dataset

format
string
required

Data format (e.g. parquet, csv, jsonl)

size_bytes
integer<int64>
required

Dataset size in bytes

agent_id
string<uuid>
required

Attesting agent

metadata
object

Additional dataset metadata

Response

Dataset attested

dataset_id
string<uuid>
receipt_id
string<uuid>
name
string
hash
string
format
string
size_bytes
integer<int64>
agent_id
string<uuid>
metadata
object
created_at
string<date-time>