Entities
Entity CRUD operations for all types (files, folders, etc.)
Create a new entity
Supabase JWT token. Use Authorization: Bearer <jwt>. Only for JWT tokens from Supabase auth - do NOT use Bearer with API keys.
In: header
Query Parameters
Validate that relationship targets exist. Defaults to true for single entity operations, false for batch. When true, requests with >500 unique relationship targets are rejected.
"true" | "false"Request Body
application/json
Optional note describing this change
Custom entity ID (generated if not provided)
^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$Entity type identifier
1 <= length <= 100Entity properties (type-specific). Text properties may contain inline entity references using the arke: URI scheme (e.g., Label) for domain-agnostic linking.
Entity relationships
Parent collection ID (creates collection relationship)
^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$Wait for collection index update before returning. Use when checking for duplicates immediately after creation. Adds ~1-5ms latency per collection.
falseResponse Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api.arke.institute/entities" \ -H "Content-Type: application/json" \ -d '{ "type": "document" }'{
"id": "01KDETYWYWM0MJVKM8DK3AEXPY",
"cid": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
"type": "collection",
"properties": {
"label": "The Pequod's Archive",
"description": "A collection of whaling documents"
},
"relationships": [
{
"predicate": "crew",
"peer": "01KDETYWYWM0MJVKM8DK3AEXPY",
"peer_type": "collection"
}
],
"ver": 1,
"created_at": "2025-12-26T12:00:00.000Z",
"ts": 1735214400000,
"edited_by": {
"user_id": "01JCAPTAINAHAB000000000000",
"user_label": "Captain Ahab",
"method": "manual"
},
"prev_cid": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy"
}{
"error": "Validation failed",
"details": {
"issues": [
{
"path": [
"properties",
"label"
],
"message": "Required"
}
]
}
}{
"error": "Unauthorized: Missing or invalid authentication token"
}{
"error": "Forbidden: You do not have permission to perform this action"
}{
"error": "Conflict: entity was modified",
"details": {
"expected": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
"actual": "bafyreinewabc123456789defghijklmnopqrstuvwxyz"
}
}Batch create entities
Supabase JWT token. Use Authorization: Bearer <jwt>. Only for JWT tokens from Supabase auth - do NOT use Bearer with API keys.
In: header
Query Parameters
Validate that relationship targets exist. Defaults to true for single entity operations, false for batch. When true, requests with >500 unique relationship targets are rejected.
"true" | "false"Request Body
application/json
Array of entities to create (1-100)
1 <= items <= 100Default collection for entities that do not specify one
^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api.arke.institute/entities/batch" \ -H "Content-Type: application/json" \ -d '{ "entities": [ { "type": "string" } ] }'{
"results": [
{
"success": true,
"index": 0,
"id": "01KDETYWYWM0MJVKM8DK3AEXPY",
"cid": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
"type": "string",
"ver": 1
}
],
"summary": {
"total": 0,
"succeeded": 0,
"failed": 0
}
}{
"results": [
{
"success": true,
"index": 0,
"id": "01KDETYWYWM0MJVKM8DK3AEXPY",
"cid": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
"type": "string",
"ver": 1
}
],
"summary": {
"total": 0,
"succeeded": 0,
"failed": 0
}
}{
"error": "Validation failed",
"details": {
"issues": [
{
"path": [
"properties",
"label"
],
"message": "Required"
}
]
}
}{
"error": "Unauthorized: Missing or invalid authentication token"
}{
"error": "Forbidden: You do not have permission to perform this action"
}Batch get entities by ID
Request Body
application/json
Entity IDs to fetch (max 100)
1 <= items <= 100Response Body
application/json
application/json
curl -X POST "https://api.arke.institute/entities/batch-get" \ -H "Content-Type: application/json" \ -d '{ "ids": [ "01JENTITY123456789012345", "01JENTITY234567890123456" ] }'{
"entities": [
{
"id": "01KDETYWYWM0MJVKM8DK3AEXPY",
"cid": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
"type": "collection",
"properties": {
"label": "The Pequod's Archive",
"description": "A collection of whaling documents"
},
"relationships": [
{
"predicate": "crew",
"peer": "01KDETYWYWM0MJVKM8DK3AEXPY",
"peer_type": "collection"
}
],
"ver": 1,
"created_at": "2025-12-26T12:00:00.000Z",
"ts": 1735214400000,
"edited_by": {
"user_id": "01JCAPTAINAHAB000000000000",
"user_label": "Captain Ahab",
"method": "manual"
},
"prev_cid": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy"
}
],
"not_found": [
"01KDETYWYWM0MJVKM8DK3AEXPY"
]
}{
"error": "Validation failed",
"details": {
"issues": [
{
"path": [
"properties",
"label"
],
"message": "Required"
}
]
}
}Get entity by ID
Path Parameters
Entity ID (ULID)
^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$Query Parameters
Comma-separated list of fields to expand. Supports: relationships[:preview|full]
Maximum number of relationships to expand (1-500, default 100). When exceeded, relationships beyond the limit are returned without peer data.
1 <= value <= 500Response Body
application/json
application/json
application/json
curl -X GET "https://api.arke.institute/entities/01KDETYWYWM0MJVKM8DK3AEXPY"{
"id": "01KDETYWYWM0MJVKM8DK3AEXPY",
"cid": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
"type": "collection",
"properties": {
"label": "The Pequod's Archive",
"description": "A collection of whaling documents"
},
"relationships": [
{
"predicate": "crew",
"peer": "01KDETYWYWM0MJVKM8DK3AEXPY",
"peer_type": "collection"
}
],
"ver": 1,
"created_at": "2025-12-26T12:00:00.000Z",
"ts": 1735214400000,
"edited_by": {
"user_id": "01JCAPTAINAHAB000000000000",
"user_label": "Captain Ahab",
"method": "manual"
},
"prev_cid": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy"
}{
"error": "Forbidden: You do not have permission to perform this action"
}{
"error": "Entity not found"
}Delete entity
Supabase JWT token. Use Authorization: Bearer <jwt>. Only for JWT tokens from Supabase auth - do NOT use Bearer with API keys.
In: header
Path Parameters
Entity ID (ULID)
^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$Request Body
application/json
Current tip CID for CAS validation. Request fails with 409 if this does not match.
1 <= lengthOptional note describing this change
Reason for deleting the entity
length <= 500Wait for collection index removal before returning. Use when checking index immediately after deletion.
falseResponse Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X DELETE "https://api.arke.institute/entities/01KDETYWYWM0MJVKM8DK3AEXPY" \ -H "Content-Type: application/json" \ -d '{ "expect_tip": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy" }'{
"id": "01KDETYWYWM0MJVKM8DK3AEXPY",
"cid": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
"deleted_at": "2019-08-24T14:15:22Z",
"ver": 1,
"prev_cid": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy"
}{
"error": "Validation failed",
"details": {
"issues": [
{
"path": [
"properties",
"label"
],
"message": "Required"
}
]
}
}{
"error": "Unauthorized: Missing or invalid authentication token"
}{
"error": "Forbidden: You do not have permission to perform this action"
}{
"error": "Entity not found"
}{
"error": "Conflict: entity was modified",
"details": {
"expected": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
"actual": "bafyreinewabc123456789defghijklmnopqrstuvwxyz"
}
}Update entity
Supabase JWT token. Use Authorization: Bearer <jwt>. Only for JWT tokens from Supabase auth - do NOT use Bearer with API keys.
In: header
Path Parameters
Entity ID (ULID)
^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$Query Parameters
Validate that relationship targets exist. Defaults to true for single entity operations, false for batch. When true, requests with >500 unique relationship targets are rejected.
"true" | "false"Request Body
application/json
Current tip CID for CAS validation. Request fails with 409 if this does not match.
1 <= lengthOptional note describing this change
Properties to add or update (deep merged)
Properties to remove. Use string[] for top-level keys (e.g., ["old_field"]), or nested objects for deep removal (e.g., { config: { options: ["debug"] } }). Dot notation like "config.options.debug" is NOT supported.
Relationships to add or update (upsert semantics)
Relationships to remove
Wait for collection index update before returning. Use when checking index immediately after update.
falseResponse Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://api.arke.institute/entities/01KDETYWYWM0MJVKM8DK3AEXPY" \ -H "Content-Type: application/json" \ -d '{ "expect_tip": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy" }'{
"id": "01KDETYWYWM0MJVKM8DK3AEXPY",
"cid": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
"type": "collection",
"properties": {
"label": "The Pequod's Archive",
"description": "A collection of whaling documents"
},
"relationships": [
{
"predicate": "crew",
"peer": "01KDETYWYWM0MJVKM8DK3AEXPY",
"peer_type": "collection"
}
],
"ver": 1,
"created_at": "2025-12-26T12:00:00.000Z",
"ts": 1735214400000,
"edited_by": {
"user_id": "01JCAPTAINAHAB000000000000",
"user_label": "Captain Ahab",
"method": "manual"
},
"prev_cid": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy"
}{
"error": "Validation failed",
"details": {
"issues": [
{
"path": [
"properties",
"label"
],
"message": "Required"
}
]
}
}{
"error": "Unauthorized: Missing or invalid authentication token"
}{
"error": "Forbidden: You do not have permission to perform this action"
}{
"error": "Entity not found"
}{
"error": "Conflict: entity was modified",
"details": {
"expected": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
"actual": "bafyreinewabc123456789defghijklmnopqrstuvwxyz"
}
}Get entity preview
Path Parameters
Entity ID (ULID)
^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$Response Body
application/json
application/json
application/json
curl -X GET "https://api.arke.institute/entities/01KDETYWYWM0MJVKM8DK3AEXPY/preview"{
"id": "01KDETYWYWM0MJVKM8DK3AEXPY",
"type": "file",
"label": "Research Paper.pdf",
"collection_id": "01JCOLLECTION123456789AB",
"description_preview": "A comprehensive study on distributed systems architecture...",
"created_at": "2026-01-12T00:00:00.000Z",
"updated_at": "2026-01-12T10:30:00.000Z"
}{
"error": "Forbidden: You do not have permission to perform this action"
}{
"error": "Entity not found"
}Get entity tip CID
Path Parameters
Entity ID (ULID)
^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$Response Body
application/json
application/json
curl -X GET "https://api.arke.institute/entities/01KDETYWYWM0MJVKM8DK3AEXPY/tip"{
"id": "01KDETYWYWM0MJVKM8DK3AEXPY",
"cid": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy"
}{
"error": "Entity not found"
}Cascade delete entity and related entities
Supabase JWT token. Use Authorization: Bearer <jwt>. Only for JWT tokens from Supabase auth - do NOT use Bearer with API keys.
In: header
Path Parameters
Entity ID (ULID)
^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$Request Body
application/json
Current tip CID for CAS validation. Request fails with 409 if this does not match.
1 <= lengthOptional note describing this change
Collection to scope the cascade delete. Only entities in this collection will be deleted. Permission check is performed on this collection.
^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$Predicate patterns to follow during cascade traversal. Supports wildcards:
"child"- exact match only"has_*"- matches has_document, has_image, etc."*_copy"- matches file_copy, document_copy, etc."*"- matches ALL predicates
Important: The collection predicate NEVER cascades, even if "*" is specified. This protects the collection structure from accidental deletion.
1 <= itemsOnly delete entities where edited_by.user_id matches this PI. Useful for cleaning up entities created by a specific agent.
^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$Maximum relationship depth to traverse (default: 10, max: 20)
101 <= value <= 20Reason for deleting the entities (applied to all deleted entities)
length <= 500Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X DELETE "https://api.arke.institute/entities/01KDETYWYWM0MJVKM8DK3AEXPY/cascade" \ -H "Content-Type: application/json" \ -d '{ "expect_tip": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy", "collection_id": "01KDETYWYWM0MJVKM8DK3AEXPY", "cascade_predicates": [ "child", "has_*" ] }'{
"root": {
"id": "01KDETYWYWM0MJVKM8DK3AEXPY",
"cid": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
"deleted_at": "2019-08-24T14:15:22Z",
"ver": 1,
"prev_cid": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy"
},
"deleted": [
{
"id": "01KDETYWYWM0MJVKM8DK3AEXPY",
"cid": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
"type": "file",
"depth": 1
}
],
"skipped": [
{
"id": "01KDETYWYWM0MJVKM8DK3AEXPY",
"type": "file",
"reason": "not_in_collection"
}
],
"summary": {
"total_traversed": 0,
"total_deleted": 0,
"total_skipped": 0,
"max_depth_reached": 0
}
}{
"error": "Validation failed",
"details": {
"issues": [
{
"path": [
"properties",
"label"
],
"message": "Required"
}
]
}
}{
"error": "Unauthorized: Missing or invalid authentication token"
}{
"error": "Forbidden: You do not have permission to perform this action"
}{
"error": "Entity not found"
}{
"error": "Conflict: entity was modified",
"details": {
"expected": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
"actual": "bafyreinewabc123456789defghijklmnopqrstuvwxyz"
}
}Restore deleted entity
Supabase JWT token. Use Authorization: Bearer <jwt>. Only for JWT tokens from Supabase auth - do NOT use Bearer with API keys.
In: header
Path Parameters
Entity ID (ULID)
^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$Request Body
application/json
Current tip CID for CAS validation. Request fails with 409 if this does not match.
1 <= lengthOptional note describing this change
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api.arke.institute/entities/01KDETYWYWM0MJVKM8DK3AEXPY/restore" \ -H "Content-Type: application/json" \ -d '{ "expect_tip": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy" }'{
"id": "01KDETYWYWM0MJVKM8DK3AEXPY",
"cid": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
"type": "collection",
"properties": {
"label": "The Pequod's Archive",
"description": "A collection of whaling documents"
},
"relationships": [
{
"predicate": "crew",
"peer": "01KDETYWYWM0MJVKM8DK3AEXPY",
"peer_type": "collection"
}
],
"ver": 1,
"created_at": "2025-12-26T12:00:00.000Z",
"ts": 1735214400000,
"edited_by": {
"user_id": "01JCAPTAINAHAB000000000000",
"user_label": "Captain Ahab",
"method": "manual"
},
"prev_cid": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
"restored_from_ver": 1
}{
"error": "Validation failed",
"details": {
"issues": [
{
"path": [
"properties",
"label"
],
"message": "Required"
}
]
}
}{
"error": "Unauthorized: Missing or invalid authentication token"
}{
"error": "Forbidden: You do not have permission to perform this action"
}{
"error": "Entity not found"
}{
"error": "Conflict: entity was modified",
"details": {
"expected": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
"actual": "bafyreinewabc123456789defghijklmnopqrstuvwxyz"
}
}Get entity collection
Path Parameters
Entity ID (ULID)
^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$Response Body
application/json
application/json
application/json
curl -X GET "https://api.arke.institute/entities/01KDETYWYWM0MJVKM8DK3AEXPY/collection"{
"collection_id": "01KDETYWYWM0MJVKM8DK3AEXPY"
}{
"error": "Forbidden: You do not have permission to perform this action"
}{
"error": "Entity not found"
}Get entity tree
Path Parameters
Entity ID (ULID)
^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$Query Parameters
Maximum tree depth (1-4)
21 <= value <= 4Constrain results to entities in this collection
^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$Comma-separated predicates to follow (e.g., "contains,references")
Maximum number of nodes to return
1001 <= value <= 1000Response Body
application/json
application/json
application/json
curl -X GET "https://api.arke.institute/entities/01KDETYWYWM0MJVKM8DK3AEXPY/tree"{
"root": {
"id": "01KDETYWYWM0MJVKM8DK3AEXPY",
"label": "string",
"type": "string",
"depth": 0,
"children": [
{
"id": "01KDETYWYWM0MJVKM8DK3AEXPY",
"label": "string",
"type": "string",
"depth": 0,
"children": []
}
]
},
"total_nodes": 0,
"truncated": true
}{
"error": "Forbidden: You do not have permission to perform this action"
}{
"error": "Entity not found"
}Get diff between entity versions
Path Parameters
Entity ID (ULID)
^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$Query Parameters
CID of the "from" version. Defaults to prev of "to" version.
1 <= lengthCID of the "to" version. Defaults to current tip.
1 <= lengthOutput format: "semantic" (default) or "patch" (RFC 6902)
"semantic""semantic" | "patch"Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://api.arke.institute/entities/01KDETYWYWM0MJVKM8DK3AEXPY/diff"{
"entity_id": "01KDETYWYWM0MJVKM8DK3AEXPY",
"from": {
"cid": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
"ver": 1,
"ts": "2025-12-26T12:00:00.000Z"
},
"to": {
"cid": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
"ver": 1,
"ts": "2025-12-26T12:00:00.000Z"
},
"format": "semantic",
"changes": {
"properties": {
"added": {
"email": "new@example.com"
},
"removed": {
"deprecated_field": "old value"
},
"changed": {
"name": {
"from": "Old Name",
"to": "New Name"
}
}
},
"relationships": {
"added": [
{
"predicate": "crew",
"peer": "01KDETYWYWM0MJVKM8DK3AEXPY",
"peer_type": "collection"
}
],
"removed": [
{
"predicate": "crew",
"peer": "01KDETYWYWM0MJVKM8DK3AEXPY",
"peer_type": "collection"
}
],
"changed": [
{
"predicate": "string",
"peer": "string",
"peer_type": "string",
"peer_label": "string",
"properties": {
"from": null,
"to": null
}
}
]
}
}
}{
"error": "Validation failed",
"details": {
"issues": [
{
"path": [
"properties",
"label"
],
"message": "Required"
}
]
}
}{
"error": "Forbidden: You do not have permission to perform this action"
}{
"error": "Entity not found"
}Get your permissions for an entity
Supabase JWT token. Use Authorization: Bearer <jwt>. Only for JWT tokens from Supabase auth - do NOT use Bearer with API keys.
In: header
Path Parameters
Entity ID (ULID)
^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://api.arke.institute/entities/01KDETYWYWM0MJVKM8DK3AEXPY/permissions"{
"entity_id": "01KDETYWYWM0MJVKM8DK3AEXPY",
"entity_type": "file",
"allowed_actions": [
"entity:view",
"entity:update"
],
"resolution": {
"method": "collection",
"collection_id": "01KDETYWYWM0MJVKM8DK3AEXPY",
"role": "editor"
}
}{
"error": "Unauthorized: Missing or invalid authentication token"
}{
"error": "Forbidden: You do not have permission to perform this action"
}{
"error": "Entity not found"
}Download content for any entity
Path Parameters
Entity ID (ULID)
^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$Query Parameters
Content key to download (resolved to CID from entity metadata)
Direct CID to download (alternative to key)
Response Body
application/octet-stream
application/json
application/json
curl -X GET "https://api.arke.institute/entities/01KDETYWYWM0MJVKM8DK3AEXPY/content""string"{
"error": "Forbidden: You do not have permission to perform this action"
}{
"error": "Entity not found"
}Upload content for any entity
Supabase JWT token. Use Authorization: Bearer <jwt>. Only for JWT tokens from Supabase auth - do NOT use Bearer with API keys.
In: header
Path Parameters
Entity ID (ULID)
^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$Query Parameters
Version key for this content (e.g., "v1", "original", "thumbnail")
1 <= length <= 255Filename for Content-Disposition header on download
length <= 255Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api.arke.institute/entities/01KDETYWYWM0MJVKM8DK3AEXPY/content?key=v1"{
"id": "01KABC123...",
"cid": "bafyrei...",
"content": {
"key": "v1",
"cid": "bafyreih5iy6dqwbcslkqpx6bxwj7qy3z5x...",
"size": 12345,
"content_type": "application/pdf",
"filename": "document.pdf",
"uploaded_at": "2025-01-15T10:00:00Z"
},
"prev_cid": "bafyrei..."
}{
"error": "Validation failed",
"details": {
"issues": [
{
"path": [
"properties",
"label"
],
"message": "Required"
}
]
}
}{
"error": "Unauthorized: Missing or invalid authentication token"
}{
"error": "Forbidden: You do not have permission to perform this action"
}{
"error": "Entity not found"
}{
"error": "Conflict: entity was modified",
"details": {
"expected": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
"actual": "bafyreinewabc123456789defghijklmnopqrstuvwxyz"
}
}{
"error": "Validation failed",
"details": {
"issues": [
{
"path": [
"string"
],
"message": "string"
}
]
}
}Rename content key
Supabase JWT token. Use Authorization: Bearer <jwt>. Only for JWT tokens from Supabase auth - do NOT use Bearer with API keys.
In: header
Path Parameters
Entity ID (ULID)
^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$Request Body
application/json
Current content key to rename
1 <= length <= 255New key name
1 <= length <= 255Expected current tip CID for CAS protection
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://api.arke.institute/entities/01KDETYWYWM0MJVKM8DK3AEXPY/content" \ -H "Content-Type: application/json" \ -d '{ "old_key": "thumbnail", "new_key": "thumbnail_v1", "expect_tip": "bafyrei..." }'{
"id": "01KABC123...",
"cid": "bafyrei...",
"old_key": "thumbnail",
"new_key": "thumbnail_v1",
"content_cid": "bafyreih5iy6dqwbcslkqpx6bxwj7qy3z5x...",
"prev_cid": "bafyrei..."
}{
"error": "Validation failed",
"details": {
"issues": [
{
"path": [
"properties",
"label"
],
"message": "Required"
}
]
}
}{
"error": "Unauthorized: Missing or invalid authentication token"
}{
"error": "Forbidden: You do not have permission to perform this action"
}{
"error": "Entity not found"
}{
"error": "Conflict: entity was modified",
"details": {
"expected": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
"actual": "bafyreinewabc123456789defghijklmnopqrstuvwxyz"
}
}Remove content by key or CID
Supabase JWT token. Use Authorization: Bearer <jwt>. Only for JWT tokens from Supabase auth - do NOT use Bearer with API keys.
In: header
Path Parameters
Entity ID (ULID)
^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$Query Parameters
Content key to remove
1 <= length <= 255Content CID to remove (alternative to key)
Expected current tip CID for CAS protection
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X DELETE "https://api.arke.institute/entities/01KDETYWYWM0MJVKM8DK3AEXPY/content?expect_tip=bafyrei..."{
"id": "01KABC123...",
"cid": "bafyrei...",
"removed_key": "thumbnail",
"prev_cid": "bafyrei..."
}{
"error": "Validation failed",
"details": {
"issues": [
{
"path": [
"properties",
"label"
],
"message": "Required"
}
]
}
}{
"error": "Unauthorized: Missing or invalid authentication token"
}{
"error": "Forbidden: You do not have permission to perform this action"
}{
"error": "Entity not found"
}{
"error": "Conflict: entity was modified",
"details": {
"expected": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
"actual": "bafyreinewabc123456789defghijklmnopqrstuvwxyz"
}
}Get presigned URL for direct upload
Supabase JWT token. Use Authorization: Bearer <jwt>. Only for JWT tokens from Supabase auth - do NOT use Bearer with API keys.
In: header
Path Parameters
Entity ID (ULID)
^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$Request Body
application/json
Content-addressed identifier (computed by client before upload)
1 <= lengthMIME type of the content to upload
1 <= lengthExpected file size in bytes (max 500 MB)
0 <= value <= 524288000Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api.arke.institute/entities/01KDETYWYWM0MJVKM8DK3AEXPY/content/upload-url" \ -H "Content-Type: application/json" \ -d '{ "cid": "bafyreih5iy6dqwbcslkqpx6bxwj7qy3z5x...", "content_type": "application/pdf", "size": 10485760 }'{
"upload_url": "https://xxx.r2.cloudflarestorage.com/...",
"r2_key": "01KABC123.../v1",
"expires_at": "2025-01-15T10:15:00Z"
}{
"error": "Validation failed",
"details": {
"issues": [
{
"path": [
"properties",
"label"
],
"message": "Required"
}
]
}
}{
"error": "Unauthorized: Missing or invalid authentication token"
}{
"error": "Forbidden: You do not have permission to perform this action"
}{
"error": "Entity not found"
}Complete presigned URL upload
Supabase JWT token. Use Authorization: Bearer <jwt>. Only for JWT tokens from Supabase auth - do NOT use Bearer with API keys.
In: header
Path Parameters
Entity ID (ULID)
^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$Request Body
application/json
Version key used in upload-url request
1 <= length <= 255Content-addressed identifier computed by client
Actual file size in bytes
0 <= valueMIME type of the uploaded content
Original filename for Content-Disposition
length <= 255Expected current tip CID for CAS protection
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api.arke.institute/entities/01KDETYWYWM0MJVKM8DK3AEXPY/content/complete" \ -H "Content-Type: application/json" \ -d '{ "key": "v1", "cid": "bafyreih5iy6dqwbcslkqpx6bxwj7qy3z5x...", "size": 10485760, "content_type": "application/pdf", "expect_tip": "bafyrei..." }'{
"id": "01KABC123...",
"cid": "bafyrei...",
"content": {
"key": "v1",
"cid": "bafyreih5iy6dqwbcslkqpx6bxwj7qy3z5x...",
"size": 12345,
"content_type": "application/pdf",
"filename": "document.pdf",
"uploaded_at": "2025-01-15T10:00:00Z"
},
"prev_cid": "bafyrei..."
}{
"error": "Validation failed",
"details": {
"issues": [
{
"path": [
"properties",
"label"
],
"message": "Required"
}
]
}
}{
"error": "Unauthorized: Missing or invalid authentication token"
}{
"error": "Forbidden: You do not have permission to perform this action"
}{
"error": "Entity not found"
}{
"error": "Conflict: entity was modified",
"details": {
"expected": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
"actual": "bafyreinewabc123456789defghijklmnopqrstuvwxyz"
}
}Queue additive updates (fire-and-forget)
Supabase JWT token. Use Authorization: Bearer <jwt>. Only for JWT tokens from Supabase auth - do NOT use Bearer with API keys.
In: header
Request Body
application/json
Updates to queue (1-1000 items). Updates to the same entity from the same actor are merged.
1 <= items <= 1000Response Body
application/json
application/json
application/json
curl -X POST "https://api.arke.institute/updates/additive" \ -H "Content-Type: application/json" \ -d '{ "updates": [ { "entity_id": "01KDETYWYWM0MJVKM8DK3AEXPY" } ] }'{
"queued": [
{
"entity_id": "01KDETYWYWM0MJVKM8DK3AEXPY",
"queue_id": 1
}
],
"failed": [
{
"entity_id": "01KDETYWYWM0MJVKM8DK3AEXPY",
"error": "Entity not found"
}
],
"summary": {
"total": 10,
"queued": 9,
"failed": 1
}
}{
"error": "Validation failed",
"details": {
"issues": [
{
"path": [
"properties",
"label"
],
"message": "Required"
}
]
}
}{
"error": "Unauthorized: Missing or invalid authentication token"
}