GenuineAIGenuineAI
For usersFor developers
  • Overview
  • Guides
  • How-to
  • API reference
Documentation
  • Quickstart
  • Authentication
  • Errors
  • Rate limits
  • API reference
Platform
  • Platform overview
  • Solutions
  • Pricing
  • Sign in
Company
  • Status
  • Trust Center
  • Contact
  • Terms of Service
  • Privacy Policy

© 2026 GenuineAI Ventures LLC

support@genuinehq.com
Overview
Core
Media library
AI
Documents
    List documentsgetDeprecate a documentpostRestore a documentpostTag documentspostList formatsget
    Document folders
    Document relations
      List relationship typesgetAdd a relationship typepostReplace a relation typeputDelete a relation typedeleteList related documentsgetLink a documentpostUnlink a documentdelete
Knowledge
Creative
Website & content
Automation
Customer channels
Administration
Schemas
GenuineAI API
GenuineAI API

Document relations

Typed links between documents — a translation and its source, a revision and the one it replaces — and the relationship types a workspace defines for them.


List relationship types

GET
https://api.genuineai.app/api/v1
/document-relation-types

The relationship types documents in this workspace can be linked with, as the administrator defined them. Each carries the label read from the document the link starts at (rt_name, "Translation of"), the label read from the other end (rt_inverse_name, "Translated as") and whether it reads the same from both ends (rt_symmetric).

Requires the module-documents license feature. Without it the request is refused with 403 license_required — see plans and modules.

List relationship types › query Parameters

cursor
​string · maxLength: 512 · pattern: ^[A-Za-z0-9_-]+$
limit
​integer
offset
​integer · min: 0
rt_name
​string
sort
​string · minLength: 1 · maxLength: 64 · pattern: ^-?[a-z0-9_]+$

List relationship types › Headers

X-Tenant-Id
​string · uuid · required

The workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.

List relationship types › Responses

Success

​RelationType[] · required
has_more
​boolean · required

Whether more rows exist past this page.

next_cursor
​string | null · required

Pass back as cursor for the next page. Null on the last page.

GET/document-relation-types
curl https://api.genuineai.app/api/v1/document-relation-types \ --header 'X-Tenant-Id: <string>' \ --header 'X-Api-Key: <api-key>'
Example Responses
{ "data": [ { "rt_id": "00000000-0000-0000-0000-000000000000", "rt_active": true, "rt_created": "2024-08-25T15:00:00Z", "rt_updated": "2024-08-25T15:00:00Z", "rt_name": "rt_name", "rt_inverse_name": "rt_inverse_name", "rt_symmetric": true, "rt_description": "rt_description" } ], "has_more": true, "next_cursor": "next_cursor" }
json
application/json

Add a relationship type

POST
https://api.genuineai.app/api/v1
/document-relation-types

Defines a relationship type for documents: rt_name as the link reads from the document it is made on and rt_inverse_name as it reads from the other end. A symmetric type reads the same both ways and carries no inverse name; a directional type without one reuses rt_name from both ends. Names are unique within the workspace.

Requires the module-documents license feature. Without it the request is refused with 403 license_required — see plans and modules.

Add a relationship type › Headers

X-Tenant-Id
​string · uuid · required

The workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.

Add a relationship type › Request Body

rt_name
​string · minLength: 1 · maxLength: 80 · required
rt_inverse_name
​string · maxLength: 80
rt_symmetric
​boolean
rt_description
​string · maxLength: 300

Add a relationship type › Responses

Created

A relationship type items of a library can be linked with: how it reads from each end and whether it has a direction.
RelationType
rt_id
​string · uuid
rt_active
​boolean
rt_created
​string · date-time
rt_updated
​string · date-time
rt_name
​string
rt_inverse_name
​string
rt_symmetric
​boolean
rt_description
​string
POST/document-relation-types
curl https://api.genuineai.app/api/v1/document-relation-types \ --request POST \ --header 'Content-Type: application/json' \ --header 'X-Tenant-Id: <string>' \ --header 'X-Api-Key: <api-key>' \ --data '{ "rt_name": "rt_name", "rt_inverse_name": "rt_inverse_name", "rt_symmetric": true, "rt_description": "rt_description" }'
Example Request Body
{ "rt_name": "rt_name", "rt_inverse_name": "rt_inverse_name", "rt_symmetric": true, "rt_description": "rt_description" }
json
Example Responses
{ "rt_id": "00000000-0000-0000-0000-000000000000", "rt_active": true, "rt_created": "2024-08-25T15:00:00Z", "rt_updated": "2024-08-25T15:00:00Z", "rt_name": "rt_name", "rt_inverse_name": "rt_inverse_name", "rt_symmetric": true, "rt_description": "rt_description" }
json
application/json

Replace a relation type

PUT
https://api.genuineai.app/api/v1
/document-relation-types/{id}

Replaces the type's definition. Links already made with it keep pointing at it, so renaming a type relabels every link at once.

Requires the module-documents license feature. Without it the request is refused with 403 license_required — see plans and modules.

Replace a relation type › path Parameters

id
​string · uuid · required

Replace a relation type › Headers

X-Tenant-Id
​string · uuid · required

The workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.

Replace a relation type › Request Body

rt_name
​string · minLength: 1 · maxLength: 80 · required
rt_inverse_name
​string · maxLength: 80
rt_symmetric
​boolean
rt_description
​string · maxLength: 300

Replace a relation type › Responses

Success

A relationship type items of a library can be linked with: how it reads from each end and whether it has a direction.
RelationType
rt_id
​string · uuid
rt_active
​boolean
rt_created
​string · date-time
rt_updated
​string · date-time
rt_name
​string
rt_inverse_name
​string
rt_symmetric
​boolean
rt_description
​string
PUT/document-relation-types/{id}
curl https://api.genuineai.app/api/v1/document-relation-types/:id \ --request PUT \ --header 'Content-Type: application/json' \ --header 'X-Tenant-Id: <string>' \ --header 'X-Api-Key: <api-key>' \ --data '{ "rt_name": "rt_name", "rt_inverse_name": "rt_inverse_name", "rt_symmetric": true, "rt_description": "rt_description" }'
Example Request Body
{ "rt_name": "rt_name", "rt_inverse_name": "rt_inverse_name", "rt_symmetric": true, "rt_description": "rt_description" }
json
Example Responses
{ "rt_id": "00000000-0000-0000-0000-000000000000", "rt_active": true, "rt_created": "2024-08-25T15:00:00Z", "rt_updated": "2024-08-25T15:00:00Z", "rt_name": "rt_name", "rt_inverse_name": "rt_inverse_name", "rt_symmetric": true, "rt_description": "rt_description" }
json
application/json

Delete a relation type

DELETE
https://api.genuineai.app/api/v1
/document-relation-types/{id}

Removes the type and every link made with it. The documents themselves are untouched.

Requires the module-documents license feature. Without it the request is refused with 403 license_required — see plans and modules.

Delete a relation type › path Parameters

id
​string · uuid · required

Delete a relation type › Headers

X-Tenant-Id
​string · uuid · required

The workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.

Delete a relation type › Responses

Success. No content.

No data returned
DELETE/document-relation-types/{id}
curl https://api.genuineai.app/api/v1/document-relation-types/:id \ --request DELETE \ --header 'X-Tenant-Id: <string>' \ --header 'X-Api-Key: <api-key>'
Example Responses
No example specified for this content type

List related documents

GET
https://api.genuineai.app/api/v1
/documents/{id}/relations

Every link this document takes part in, in both directions, each resolved to the document on the other end. label is the relationship type as it reads from here: a link written as "A is a translation of B" lists under B as "Translated as". A link to a document the caller may not read is left out.

Requires the module-documents license feature. Without it the request is refused with 403 license_required — see plans and modules.

List related documents › path Parameters

id
​string · uuid · required

List related documents › query Parameters

cursor
​string · maxLength: 512 · pattern: ^[A-Za-z0-9_-]+$
limit
​integer
offset
​integer · min: 0
sort
​string · minLength: 1 · maxLength: 64 · pattern: ^-?[a-z0-9_]+$

List related documents › Headers

X-Tenant-Id
​string · uuid · required

The workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.

List related documents › Responses

Success

​DocumentRelation[] · required
has_more
​boolean · required

Whether more rows exist past this page.

next_cursor
​string | null · required

Pass back as cursor for the next page. Null on the last page.

GET/documents/{id}/relations
curl https://api.genuineai.app/api/v1/documents/:id/relations \ --header 'X-Tenant-Id: <string>' \ --header 'X-Api-Key: <api-key>'
Example Responses
{ "data": [ { "rel_id": "00000000-0000-0000-0000-000000000000", "rel_type": "rel_type", "rel_created": "2024-08-25T15:00:00Z", "rel_created_by": "rel_created_by", "rel_metadata": {}, "direction": "from", "label": "label", "relation_type": {}, "document": {} } ], "has_more": true, "next_cursor": "next_cursor" }
json
application/json

Link a document

POST
https://api.genuineai.app/api/v1
/documents/{id}/relations

Links this document to another one with a relationship type. direction is read from this document's side and defaults to from: this document is the one the type's label describes ("this is a translation of document_id"); to turns it around ("document_id is a translation of this"). The caller needs edit on both documents. Linking a pair that is already linked with the same type answers with the existing link; for a symmetric type that holds whichever way round it was written.

Requires the module-documents license feature. Without it the request is refused with 403 license_required — see plans and modules.

Link a document › path Parameters

id
​string · uuid · required

Link a document › Headers

X-Tenant-Id
​string · uuid · required

The workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.

Link a document › Request Body

rel_type
​string · uuid · required
document_id
​string · uuid · required
direction
​string · enum
Enum values:
from
to
rel_metadata
​object

Link a document › Responses

Created

A typed link between two documents, read from one document's side: the type, which way it runs, and the document on the other end.
DocumentRelation
rel_id
​string · uuid
rel_type
​string
rel_created
​string · date-time
rel_created_by
​string
rel_metadata
​object
direction
​string · enum

from when this document is the one the type's label describes, to when it is the one pointed at.

Enum values:
from
to
label
​string

The type's label as it reads from this document.

relation_type
​object

The relationship type: rt_id, rt_name, rt_inverse_name, rt_symmetric.

document
​object

The document on the other end: file_id, file_name, file_type, file_size, file_updated, file_deprecated.

POST/documents/{id}/relations
curl https://api.genuineai.app/api/v1/documents/:id/relations \ --request POST \ --header 'Content-Type: application/json' \ --header 'X-Tenant-Id: <string>' \ --header 'X-Api-Key: <api-key>' \ --data '{ "rel_type": "00000000-0000-0000-0000-000000000000", "document_id": "00000000-0000-0000-0000-000000000000", "direction": "from", "rel_metadata": {} }'
Example Request Body
{ "rel_type": "00000000-0000-0000-0000-000000000000", "document_id": "00000000-0000-0000-0000-000000000000", "direction": "from", "rel_metadata": {} }
json
Example Responses
{ "rel_id": "00000000-0000-0000-0000-000000000000", "rel_type": "rel_type", "rel_created": "2024-08-25T15:00:00Z", "rel_created_by": "rel_created_by", "rel_metadata": {}, "direction": "from", "label": "label", "relation_type": {}, "document": {} }
json
application/json

Unlink a document

DELETE
https://api.genuineai.app/api/v1
/documents/{id}/relations/{relation_id}

Removes one link. Both documents stay exactly as they were.

Requires the module-documents license feature. Without it the request is refused with 403 license_required — see plans and modules.

Unlink a document › path Parameters

id
​string · uuid · required
relation_id
​string · uuid · required

Unlink a document › Headers

X-Tenant-Id
​string · uuid · required

The workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.

Unlink a document › Responses

Success. No content.

No data returned
DELETE/documents/{id}/relations/{relation_id}
curl https://api.genuineai.app/api/v1/documents/:id/relations/:relation_id \ --request DELETE \ --header 'X-Tenant-Id: <string>' \ --header 'X-Api-Key: <api-key>'
Example Responses
No example specified for this content type

Document foldersKnowledge bases