Skip to content

The nodes related to this one through a definition, keyset-paged.

GET
/v1/nodes/{id}/relations/{definitionId}
curl --request GET \
--url 'https://api.contentsurface.io/v1/nodes/nod_01j9n4wqr0e008000000000004/relations/rld_01j9n4wvr0e008000000000001?side=from&limit=20&cursor=eyJrIjpbIkZpbmFuY2UiXSwiaSI6IjAxOTI2YTRlIn0' \
--header 'Authorization: Bearer <token>'

The nodes related to this one through one relation definition, as the relations call counts them, trimmed to what the caller can read, keyset-paged. To search or filter within them, use filters.related in a search. Any user with the content scope.

id
required
string

The node (nod_…).

Example

nod_01j9n4wqr0e008000000000004
definitionId
required
string

The relation definition (rld_…), from the relations call.

Example

rld_01j9n4wvr0e008000000000001
side
string

The side this node is on: from (default) or to, from the relations call.

Example

from
limit
integer | string format: int32
/^-?(?:0|[1-9]\d*)$/

Page size, 1–100; default 50.

Example

20
cursor
string

The nextCursor of the previous page; omit for the first page.

Example

eyJrIjpbIkZpbmFuY2UiXSwiaSI6IjAxOTI2YTRlIn0

OK

Media typeapplication/json

A page of a keyset-paged list: the items and the cursor to continue from, null on the last page.

object
items
required

The items of this page, in the list’s order.

Array<object>

A node: a folder, document, record or message in the repository, as the caller may see it. It never carries a source’s address, link or identifier.

object
id
required

The node’s ID (nod_…); stable while the node exists.

string
name
required

The node’s name: a folder’s or file’s name, a record’s or message’s title.

string
path
required

The node’s place in the repository: the folder names from the root folder, joined by /. Each run of folders you cannot read shows as one … (/Projects/…/Contracts). Changes when a folder above is renamed or its access changes.

string
parentId
required

The parent folder’s ID (nod_…); null for the root folder.

null | string
kind
required

virtualFolder (a folder that exists only in ContentSurface), mountFolder (where a source is placed), groupFolder (a folder ContentSurface creates below a mount folder to group related records, such as an account’s Contacts) or item (anything from a source).

string
isFolder
required

True when the node can have children — whether or not it has any now. Browse it with a search whose includeDescendants is false.

boolean
childrenFrom
required

Where a folder’s children come from: hierarchy (folders as arranged in ContentSurface or the source) or relations (records arranged below a record by how they relate); null when the node cannot have children.

null | string
isContent
required

True when the node has content to retrieve with the content call. A node can be a folder and have content, such as an email with attachments.

boolean
type
required

The node’s document type, such as File, Email or Account; null for ContentSurface’s own folders.

null | string
createdAt
required

When the item was created in the source.

null | string format: date-time
createdBy
required

Who created the item, as the source names them.

null | string
modifiedAt
required

When the item was last changed in the source.

null | string format: date-time
modifiedBy
required

Who last changed the item, as the source names them.

null | string
size
required

The content’s size in bytes; null without content.

null | integer | string format: int64
/^-?(?:0|[1-9]\d*)$/
mimeType
required

The content’s MIME type, such as application/pdf.

null | string
indexedAt

When the content was last indexed. Repository admins only.

null | string format: date-time
indexState

Whether the content’s text is indexed: indexed, reused (taken over from an identical document), tooLarge, excludedType, encrypted or noText; null while not yet indexed. Repository admins only.

null | string
indexCoverage

Why the index is incomplete, by reason: characterCeiling (text beyond the extraction limit), extractionTimeout, embeddedDocuments (attachments left out), indexedTextCap (text beyond the plan’s indexed-text cap is searchable by keyword only) or ocrPages (pages not read by OCR); empty when complete. Repository admins only.

Array<string> | null
semanticCoverage

How much of the content is searchable by meaning, in percent. Repository admins only.

null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
attributes
required

The node’s attributes by key — source fields a repository admin mapped, such as author or department. Values are strings, numbers, booleans, dates or lists of them.

object
attributePreview
required

The attributes a repository admin chose to show with every result of this document type, in their order, as display text; empty, never null.

Array<object>

One entry of the attribute preview: an attribute’s label and its value as display text.

object
key
required

The attribute’s key, as in attributes.

string
label
required

The attribute’s name, for display.

string
value
required

The value as display text: dates formatted, lists joined, long text shortened.

string
contentPreview

A short fragment of the document’s text, for showing with a result; null when it has none.

null | string
score

The relevance score of a search with text; higher is better. Null otherwise. In semantic mode it is the similarity of the best match, while the order also favours a document that matches in several places, so a result can show a slightly higher score than the one before it.

null | number | string format: double
/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/
matchedDetails

Search only: the related records below this record that matched the search instead of the record itself, such as an order’s lines, at most three, best first. Such records are never results of their own: they are found through the record they belong to. Null when none matched.

Array<object> | null

A related record a search result was found by.

object
id
required

The matched record (nod_…).

string
name
required

The matched record’s name.

string
groupName
required

The name of the group folder it sits in below the result, such as Lines.

string
passages

Search with passages only: the hit’s best matching passages of text, best first. Empty for a hit found by its name or attributes alone; null for hits beyond the first 10, and without passages.

Array<object> | null

A matched passage of a document’s text, or — when its text is withheld — its page and why.

object
text
required

The passage verbatim; null when withheld.

null | string
charStart
required

Where the passage starts in the document’s extracted text, in characters.

null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
charLength
required

The passage’s length in characters.

null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
page
required

The page the passage starts on, where the document has pages.

null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
withheld
required

Why text is null: beyondIndexedTextCap (past the plan’s indexed-text cap) or notStoredYet (indexed before passages were kept; re-indexing adds it).

null | string
relations

Search with include.relations only: a summary of the hit’s relations, one entry per relation definition and side with at least one related node the caller can read. Null for hits beyond the first 10, and without include.relations.

Array<object> | null

A search hit’s relations through one relation definition, seen from one side: a capped count and the first related nodes.

object
definition
required

The relation definition’s key, as filters.related.definition takes it.

string
definitionId
required

The relation definition (rld_…): list every related node with GET /v1/nodes/{id}/relations/{definitionId}.

string
name
required

What the related nodes are, seen from the hit, such as Cases or Account.

string
side
required

The side the hit is on, from or to, as the related-nodes call takes it.

string
count
required

How many related nodes the caller can read, at most 100; the exact count is on GET /v1/nodes/{id}/relations.

integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
countCapped
required

True when there are more than 100, and count says 100.

boolean
sample
required

The first related nodes by ID, as many as include.relations.sample asked; empty when it was 0.

Array<object>

A related node named in a hit’s relation summary: enough to show and open it.

object
id
required

The related node (nod_…).

string
name
required

Its name.

string
type
required

Its document type, such as Case; null for ContentSurface’s own folders.

null | string
kind
required

virtualFolder, mountFolder, groupFolder or item, as on a node.

string
permalink
required

The node’s own address in the API (/v1/nodes/{id}): a stable name for it, not a credential — a reader still needs access.

string
nextCursor
required

Pass as cursor to read the next page; null on the last page.

null | string
hasMore

True when there is a next page (nextCursor is set).

boolean

Example

{
"items": [
{
"id": "nod_01j9n4wqr0e00800000000000g",
"name": "Ana Novak",
"path": "/Sales/Salesforce/Accounts/Contoso Ltd/Contacts/Ana Novak",
"parentId": "nod_01j9n4wqr0e008000000000009",
"kind": "item",
"isFolder": false,
"childrenFrom": null,
"isContent": false,
"type": "Contact",
"createdAt": "2026-09-14T08:30:00+00:00",
"createdBy": "Maria Novak",
"modifiedAt": "2026-11-03T15:12:00+00:00",
"modifiedBy": "Luka Horvat",
"size": null,
"mimeType": null,
"indexedAt": null,
"indexState": null,
"indexCoverage": null,
"semanticCoverage": null,
"attributes": {
"salesforce.title": "Head of Purchasing"
},
"attributePreview": [
{
"key": "salesforce.title",
"label": "Title",
"value": "Head of Purchasing"
}
],
"contentPreview": null,
"score": null,
"matchedDetails": null,
"passages": null,
"relations": null,
"permalink": "/v1/nodes/nod_01j9n4wqr0e00800000000000g"
}
],
"nextCursor": "eyJrIjpbIkZpbmFuY2UiXSwiaSI6IjAxOTI2YTRlIn0",
"hasMore": true
}

The request is not valid: a malformed ID, body, filter or parameter.

Media typeapplication/problem+json

RFC 9457 problem details. code is the stable reason; confirmation problems add impact and impactToken.

object
type

urn:contentsurface:problem:{code}.

string
title

A short summary for people; may change.

string
status

The HTTP status code.

integer
detail

What happened in this case, for people; may change.

string
code

The stable, machine-readable reason, such as version-mismatch; branch on this.

string
field

For validation-failed: the request field that is not valid.

string
impactToken

For confirmation-required: repeat the call with ?confirm={impactToken} to go ahead.

string
impact

For confirmation-required: what the change would affect, such as the users or folders losing access.

Example

{
"type": "urn:contentsurface:problem:validation-failed",
"title": "The request is not valid.",
"status": 400,
"detail": "'id' must be an ID of the form nod_… .",
"code": "validation-failed",
"field": "id"
}

No valid access token, or it no longer holds for the user (suspended, signed out, relation removed).

Media typeapplication/problem+json

RFC 9457 problem details. code is the stable reason; confirmation problems add impact and impactToken.

object
type

urn:contentsurface:problem:{code}.

string
title

A short summary for people; may change.

string
status

The HTTP status code.

integer
detail

What happened in this case, for people; may change.

string
code

The stable, machine-readable reason, such as version-mismatch; branch on this.

string
field

For validation-failed: the request field that is not valid.

string
impactToken

For confirmation-required: repeat the call with ?confirm={impactToken} to go ahead.

string
impact

For confirmation-required: what the change would affect, such as the users or folders losing access.

Example

{
"type": "urn:contentsurface:problem:unauthorized",
"title": "Not authenticated.",
"status": 401,
"detail": "A valid access token is required.",
"code": "unauthorized"
}

Authenticated but not allowed: a missing scope or role, an impersonated token on an admin endpoint, or an inactive tenant.

Media typeapplication/problem+json

RFC 9457 problem details. code is the stable reason; confirmation problems add impact and impactToken.

object
type

urn:contentsurface:problem:{code}.

string
title

A short summary for people; may change.

string
status

The HTTP status code.

integer
detail

What happened in this case, for people; may change.

string
code

The stable, machine-readable reason, such as version-mismatch; branch on this.

string
field

For validation-failed: the request field that is not valid.

string
impactToken

For confirmation-required: repeat the call with ?confirm={impactToken} to go ahead.

string
impact

For confirmation-required: what the change would affect, such as the users or folders losing access.

Example

{
"type": "urn:contentsurface:problem:scope-required",
"title": "Not allowed.",
"status": 403,
"detail": "This endpoint requires the cs.content scope.",
"code": "scope-required"
}

Absent: not existing, in another tenant, or not readable by the caller — never distinguished.

Media typeapplication/problem+json

RFC 9457 problem details. code is the stable reason; confirmation problems add impact and impactToken.

object
type

urn:contentsurface:problem:{code}.

string
title

A short summary for people; may change.

string
status

The HTTP status code.

integer
detail

What happened in this case, for people; may change.

string
code

The stable, machine-readable reason, such as version-mismatch; branch on this.

string
field

For validation-failed: the request field that is not valid.

string
impactToken

For confirmation-required: repeat the call with ?confirm={impactToken} to go ahead.

string
impact

For confirmation-required: what the change would affect, such as the users or folders losing access.

Example

{
"type": "urn:contentsurface:problem:not-found",
"title": "Not found.",
"status": 404,
"detail": "The relation definition does not exist.",
"code": "not-found"
}

Load protection: the tenant is making too many calls, or running too many searches or content streams, at once. Transient and never a quota; retry after Retry-After seconds.

Media typeapplication/problem+json

RFC 9457 problem details. code is the stable reason; confirmation problems add impact and impactToken.

object
type

urn:contentsurface:problem:{code}.

string
title

A short summary for people; may change.

string
status

The HTTP status code.

integer
detail

What happened in this case, for people; may change.

string
code

The stable, machine-readable reason, such as version-mismatch; branch on this.

string
field

For validation-failed: the request field that is not valid.

string
impactToken

For confirmation-required: repeat the call with ?confirm={impactToken} to go ahead.

string
impact

For confirmation-required: what the change would affect, such as the users or folders losing access.

Example

{
"type": "urn:contentsurface:problem:too-many-requests",
"title": "Too many requests.",
"status": 429,
"detail": "The tenant is making more API calls than one replica serves at once; retry shortly.",
"code": "too-many-requests",
"retryAfter": 1
}