Collections
Collection and permission management
Create a new collection
Authorization
bearerAuth Supabase JWT token
In: header
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})$Collection display name
1 <= length <= 200Collection description
length <= 2000URL for collection display image
uriCustom role definitions (defaults to owner/editor/viewer/public)
Additional properties to store
Initial relationships
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://arke-v1.arke.institute/collections" \ -H "Content-Type: application/json" \ -d '{ "label": "The Pequod\'s Archive" }'{
"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"
}Get collection 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})$Response Body
application/json
application/json
application/json
curl -X GET "https://arke-v1.arke.institute/collections/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"
}Update collection properties
Authorization
bearerAuth Supabase JWT token
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
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
Updated collection display name
1 <= length <= 200Updated collection description
length <= 2000Updated display image URL
uriResponse Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://arke-v1.arke.institute/collections/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"
}
}Add a new role
Authorization
bearerAuth Supabase JWT token
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
Name of the new role
1 <= length <= 50Actions this role can perform
1 <= itemsResponse Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://arke-v1.arke.institute/collections/01KDETYWYWM0MJVKM8DK3AEXPY/roles" \ -H "Content-Type: application/json" \ -d '{ "role": "harpooner", "actions": [ "entity:view", "entity:create", "entity:update" ] }'{
"id": "01KDETYWYWM0MJVKM8DK3AEXPY",
"cid": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
"prev_cid": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
"ver": 1,
"roles": {
"captain": [
"*:view",
"*:update",
"*:create",
"collection:manage"
],
"harpooner": [
"*:view",
"*:update",
"*:create"
],
"crew": [
"*:view",
"entity:create"
],
"public": [
"entity:view",
"collection:view"
]
}
}{
"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"
}Delete a role
Authorization
bearerAuth Supabase JWT token
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})$Role name
1 <= length <= 50Response Body
application/json
application/json
application/json
application/json
curl -X DELETE "https://arke-v1.arke.institute/collections/01KDETYWYWM0MJVKM8DK3AEXPY/roles/harpooner"{
"id": "01KDETYWYWM0MJVKM8DK3AEXPY",
"cid": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
"prev_cid": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
"ver": 1,
"roles": {
"captain": [
"*:view",
"*:update",
"*:create",
"collection:manage"
],
"harpooner": [
"*:view",
"*:update",
"*:create"
],
"crew": [
"*:view",
"entity:create"
],
"public": [
"entity:view",
"collection:view"
]
}
}{
"error": "Unauthorized: Missing or invalid authentication token"
}{
"error": "Forbidden: You do not have permission to perform this action"
}{
"error": "Entity not found"
}Update role actions
Authorization
bearerAuth Supabase JWT token
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})$Role name
1 <= length <= 50Request Body
application/json
Updated actions for this role
1 <= itemsResponse Body
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://arke-v1.arke.institute/collections/01KDETYWYWM0MJVKM8DK3AEXPY/roles/harpooner" \ -H "Content-Type: application/json" \ -d '{ "actions": [ "entity:view", "entity:create", "entity:update", "entity:delete" ] }'{
"id": "01KDETYWYWM0MJVKM8DK3AEXPY",
"cid": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
"prev_cid": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
"ver": 1,
"roles": {
"captain": [
"*:view",
"*:update",
"*:create",
"collection:manage"
],
"harpooner": [
"*:view",
"*:update",
"*:create"
],
"crew": [
"*:view",
"entity:create"
],
"public": [
"entity:view",
"collection:view"
]
}
}{
"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"
}List collection members
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
Include expired memberships in response
"false""true" | "false"Response Body
application/json
application/json
application/json
curl -X GET "https://arke-v1.arke.institute/collections/01KDETYWYWM0MJVKM8DK3AEXPY/members"{
"collection_id": "string",
"members": [
{
"userId": "string",
"role": "string",
"userLabel": "string",
"expires_at": "2019-08-24T14:15:22Z",
"granted_at": "2019-08-24T14:15:22Z",
"granted_by": "string",
"is_expired": true
}
],
"groups": [
{
"groupId": "string",
"role": "string",
"groupLabel": "string"
}
],
"wildcards": [
{
"role": "string"
}
]
}{
"error": "Forbidden: You do not have permission to perform this action"
}{
"error": "Entity not found"
}Assign user to role
Authorization
bearerAuth Supabase JWT token
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
User entity ID to assign the role to
^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$Role name to assign
1 <= length <= 50Seconds until this role assignment expires (omit for permanent access)
0 <= valueResponse Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://arke-v1.arke.institute/collections/01KDETYWYWM0MJVKM8DK3AEXPY/members" \ -H "Content-Type: application/json" \ -d '{ "user_id": "01JQ3EQ3EG000000000000000", "role": "harpooner" }'{
"id": "01KDETYWYWM0MJVKM8DK3AEXPY",
"cid": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
"prev_cid": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
"ver": 1,
"member_added": {
"user_id": "string",
"role": "string",
"expires_at": "2025-01-15T00:00:00.000Z",
"granted_at": "2025-01-01T12:00:00.000Z",
"granted_by": "string"
}
}{
"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"
}Remove user from role
Authorization
bearerAuth Supabase JWT token
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})$User 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
Role to remove user from
1 <= lengthResponse Body
application/json
application/json
application/json
application/json
application/json
curl -X DELETE "https://arke-v1.arke.institute/collections/01KDETYWYWM0MJVKM8DK3AEXPY/members/01JQ3EQ3EG000000000000000?role=crew"{
"id": "01KDETYWYWM0MJVKM8DK3AEXPY",
"cid": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
"prev_cid": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
"ver": 1,
"member_removed": {
"user_id": "string",
"role": "string"
}
}{
"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"
}Set root entity
Authorization
bearerAuth Supabase JWT token
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 <= lengthEntity ID to set as the root of this collection. Entity must already have a collection relationship pointing to this collection.
^(?: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
application/json
curl -X PUT "https://arke-v1.arke.institute/collections/01KDETYWYWM0MJVKM8DK3AEXPY/root" \ -H "Content-Type: application/json" \ -d '{ "expect_tip": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy", "entity_id": "01JQ3EQ3EG000000000000000" }'{
"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",
"root_entity_id": "string"
}{
"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"
}
}List entities in a 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})$Query Parameters
Filter entities by type
Maximum number of entities to return
10001 <= value <= 10000Number of entities to skip
00 <= valueExpand entity data. "preview" adds lightweight previews, "full" adds complete manifests. Maximum 100 entities when using expand.
"preview" | "full"Response Body
application/json
application/json
application/json
curl -X GET "https://arke-v1.arke.institute/collections/01KDETYWYWM0MJVKM8DK3AEXPY/entities"{
"collection_id": "string",
"entities": [
{
"pi": "string",
"type": "document",
"label": "My Document",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"preview": {
"id": "01KDETYWYWM0MJVKM8DK3AEXPY",
"type": "file",
"label": "Research Paper.pdf",
"collection_pi": "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"
},
"entity": {
"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"
}
}
],
"pagination": {
"offset": 0,
"limit": 0,
"count": 0,
"has_more": true
}
}{
"error": "Forbidden: You do not have permission to perform this action"
}{
"error": "Entity not found"
}