Skip to content

The node's content, streamed from the source; with representation=text, its stored text. The single retrieval endpoint.

GET
/v1/nodes/{id}/content
curl --request GET \
--url 'https://api.contentsurface.io/v1/nodes/nod_01j9n4wqr0e008000000000004/content?representation=text&download=true' \
--header 'Authorization: Bearer <token>' \
--header 'If-Range: "q8Zt1mY4kR2vN6pX0bWc3A"' \
--header 'Range: bytes=0-1048575'

Streams the node’s content — the document, file or message — from its source at the moment of the request; nothing is stored on the way. This is the only way content leaves ContentSurface, and it is authorized like every read: a node the caller cannot read answers 404. A single byte range (Range) is read at the source and answered with 206; ETag and If-Range keep a resumed download on one version.

With representation=text, it returns the node’s indexed text instead, as plain text read from ContentSurface rather than the source; 409 text-unavailable when the node has none.

Retrieval counts against the plan’s bandwidth: over the daily or monthly allowance, streams are slowed; past the last step of the month, new ones are refused with 429 retrieval-allowance-exhausted until resetsAt. 503 or 502 source-unavailable when the source cannot be reached or refuses. Any user with the content scope.

id
required
string

The node (nod_…); it must have content (isContent).

Example

nod_01j9n4wqr0e008000000000004
Range
string

One byte range: bytes=start-end, bytes=start- or bytes=-suffix.

Example

bytes=0-1048575
If-Range
string

The ETag of an earlier response: the range is served only if the content is still that version, otherwise the whole content with 200. A date never matches.

Example

"q8Zt1mY4kR2vN6pX0bWc3A"
representation
string
Allowed values: text

text: the node’s stored text as text/plain; charset=utf-8, the chunks within the indexed-text cap joined without overlap, read from CS, not the source; CS-Text-Truncated names why it is incomplete. Metered and paced like the content; no ranges. Omitted: the content itself.

Example

text
download
boolean

true: sent as an attachment under the node’s name (with .txt for the text representation).

Example

true

OK

One byte range of the content, read at the source; Content-Range tells which. Only a single bytes range is served; several get the whole content.

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 node does not exist.",
"code": "not-found"
}

text-unavailable with reason (notIndexed, noText, notStoredYet): the node has no stored text for representation=text.

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:text-unavailable",
"title": "The node has no stored text.",
"status": 409,
"detail": "The content has not been indexed yet.",
"code": "text-unavailable",
"reason": "notIndexed"
}

The range starts at or past the end of the content; Content-Range: bytes */{length} tells its length.

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:range-not-satisfiable",
"title": "The range is not satisfiable.",
"status": 416,
"detail": "The requested range starts at or past the end of the content.",
"code": "range-not-satisfiable",
"contentLength": 482113
}

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. Or retrieval-allowance-exhausted: the month’s retrieval is past the plan’s allowance, its bandwidth packs and the slowed-down steps after them; new streams are refused until resetsAt, the start of the next UTC month — do not retry before then.

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:retrieval-allowance-exhausted",
"title": "The month's retrieval allowance is used up.",
"status": 429,
"detail": "Content retrieval stops until the month ends. The tenant owner can buy bandwidth packs or upgrade the plan on the billing page; search and browse are unaffected.",
"code": "retrieval-allowance-exhausted",
"retryAfter": 2364480,
"resetsAt": "2026-12-01T00:00:00+00:00"
}

The source refused the content (source-unavailable, a permanent failure).

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:source-unavailable",
"title": "The source could not deliver the content.",
"status": 502,
"detail": "The connector reported item.access_denied.",
"code": "source-unavailable"
}

The source is not reachable now (source-unavailable).

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:source-unavailable",
"title": "The source could not deliver the content.",
"status": 503,
"detail": "The connector reported source.unreachable.",
"code": "source-unavailable",
"retryAfter": 30
}