Saltar al contenido principal
DocumentaciónBrain · api.latam.ccsio.ai

Brain spaces

The spaces of an organization's Brain: the unit of access.

Menú de la documentación

Las descripciones de las operaciones y los campos son las del contrato, en inglés.

GET/brain/v1/spaces

List the spaces

Credencial
API key
Permiso
brain.read

Lists the spaces the caller's audience reaches: the organization's spaces and the spaces of the teams the caller belongs to, oldest first. The organization is the caller's own, from the verified principal.

curl
curl "https://api.latam.ccsio.ai/brain/v1/spaces" \
  -H "Authorization: Bearer $CCSIO_API_KEY"

Parámetros

NombreEnDescripción
X-Request-ID
opcional
headerstring

Optional request ULID. A valid ULID (upper or lowercase) is honored; when the header is absent or invalid, the runtime mints the id. The response X-Request-ID header carries the canonical uppercase form.

cursor
opcional
querystring

The `next_cursor` of the previous page; absent starts at the first item. A cursor that this plane did not write is refused with 400 invalid-request.

limit
opcional
queryinteger

The largest page, 1 to 100. Default 50.

Respuestas

  • 200

    One page of spaces.

    Esquema
    BrainSpaceList
    • spacesarray of BrainSpaceobligatorio

      The spaces the caller's audience reaches, oldest first.

      • idstringobligatorio

        An id generated by core: URL-safe, matching the C6 identifier pattern, and opaque to clients.

        pattern ^[a-z][a-z0-9._-]{0,127}$

      • namestringobligatorio

        1 to 120 characters

      • kindstringobligatorio

        Who the space is for. `organization`: every member. `team`: that team's members. More kinds may be added later (a space of named members is planned): a client must tolerate a value it does not know and treat it as a space it can read but not describe.

      • teamstring or nullobligatorio

        The team id for kind team; null for every other kind.

        pattern ^[a-z][a-z0-9._-]{0,127}$

      • created_atstring (date-time)obligatorio
    • next_cursorstring or nullobligatorio

      The cursor of the next page; null on the last one.

  • 400

    A limit outside 1 to 100, a cursor this plane did not write, an unknown query parameter. Codes: invalid-request

  • 401

    The request carries no credential, more than one, or one the platform does not accept, and is refused before the operation runs; `error.code` says why. Supply exactly one credential. Codes: invalid-request (no credential, or both Authorization:

    Leer más

    Bearer and x-api-key), api-key-invalid (a value that is not a platform API key, or a key of a kind the platform does not accept), api-key-unknown, api-key-revoked, api-key-expired, bootstrap-disabled (the one-shot installation credential, once a key exists), token-malformed (a bearer token that is not a JWT), token-algorithm-unsupported, token-signature-invalid, token-claim-invalid, token-issuer-mismatch, token-audience-mismatch, token-expired, token-not-yet-valid, issuer-untrusted, issuer-residency-mismatch (the issuer belongs to another plane), issuer-resolution-unknown, jwks-unavailable, jwks-key-not-found, staff-token-inactive (a platform operator's token), staff-not-operator, staff-directory-unavailable, identity-not-provisioned (a verified identity with no account on this plane), organization-not-found (a verified identity or key whose organization this plane does not know), internal-error (a fault while the credential is checked is refused too, fail closed), context-cancelled

  • 402

    The organization has to pay first: its standing is payment_required.

    Leer más

    The request boundary applies this payment gate to every route except an organization's billing routes, the caller's own context, organization list, onboarding, session report and personal keys, the public routes, and the routes of platform operators, who administer an organization that has to pay. The operations the gate covers declare this response. On /v1 the refusal is rendered in the OpenAI error format. Code: payment-required

  • 403

    No role of the caller holds `brain.read` in the organization. Codes: policy-denied, brain-disabled (the organization has no Brain capacity)

  • 404

    The plane has no Brain database configured (BRAIN_DATABASE_URL), so every Brain route is off. Codes: brain-not-enabled

  • 405

    The path is claimed but the request method is not allowed. Go ServeMux returns its standard plain-text response and lists permitted methods in Allow.

  • 500

    Platform failure. Codes: internal-error

POST/brain/v1/spaces

Create a space

Credencial
API key
Permiso
brain.manage
Cuerpo de la solicitud
Cuerpo de hasta 1 MiB

Creates a space and answers 201 with it. An organization space needs `brain.manage` in the organization; a team space is also open to an admin of that team. The body is capped at 1048576 bytes.

curl
curl -X POST "https://api.latam.ccsio.ai/brain/v1/spaces" \
  -H "Authorization: Bearer $CCSIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "string",
  "kind": "organization"
}'
Construido con los campos obligatorios del esquema: reemplaza los valores.

Parámetros

NombreEnDescripción
X-Request-ID
opcional
headerstring

Optional request ULID. A valid ULID (upper or lowercase) is honored; when the header is absent or invalid, the runtime mints the id. The response X-Request-ID header carries the canonical uppercase form.

Cuerpo de la solicitud application/json

BrainSpaceCreateRequest
  • namestringobligatorio

    1 to 120 characters

  • kindstringobligatorio

    Valores permitidos: "organization""team"

  • teamstringopcional

    Required for kind team and refused for kind organization.

Respuestas

  • 201

    The space.

    Esquema
    BrainSpace
    • idstringobligatorio

      An id generated by core: URL-safe, matching the C6 identifier pattern, and opaque to clients.

      pattern ^[a-z][a-z0-9._-]{0,127}$

    • namestringobligatorio

      1 to 120 characters

    • kindstringobligatorio

      Who the space is for. `organization`: every member. `team`: that team's members. More kinds may be added later (a space of named members is planned): a client must tolerate a value it does not know and treat it as a space it can read but not describe.

    • teamstring or nullobligatorio

      The team id for kind team; null for every other kind.

      pattern ^[a-z][a-z0-9._-]{0,127}$

    • created_atstring (date-time)obligatorio
  • 400

    A body that is not strict JSON, a name that is empty or over 120 characters, a team missing for kind team or sent with kind organization. Codes: invalid-request

  • 401

    The request carries no credential, more than one, or one the platform does not accept, and is refused before the operation runs; `error.code` says why. Supply exactly one credential. Codes: invalid-request (no credential, or both Authorization:

    Leer más

    Bearer and x-api-key), api-key-invalid (a value that is not a platform API key, or a key of a kind the platform does not accept), api-key-unknown, api-key-revoked, api-key-expired, bootstrap-disabled (the one-shot installation credential, once a key exists), token-malformed (a bearer token that is not a JWT), token-algorithm-unsupported, token-signature-invalid, token-claim-invalid, token-issuer-mismatch, token-audience-mismatch, token-expired, token-not-yet-valid, issuer-untrusted, issuer-residency-mismatch (the issuer belongs to another plane), issuer-resolution-unknown, jwks-unavailable, jwks-key-not-found, staff-token-inactive (a platform operator's token), staff-not-operator, staff-directory-unavailable, identity-not-provisioned (a verified identity with no account on this plane), organization-not-found (a verified identity or key whose organization this plane does not know), internal-error (a fault while the credential is checked is refused too, fail closed), context-cancelled

  • 402

    The organization has to pay first: its standing is payment_required.

    Leer más

    The request boundary applies this payment gate to every route except an organization's billing routes, the caller's own context, organization list, onboarding, session report and personal keys, the public routes, and the routes of platform operators, who administer an organization that has to pay. The operations the gate covers declare this response. On /v1 the refusal is rendered in the OpenAI error format. Code: payment-required

  • 403

    No role of the caller holds `brain.manage` in the organization, or in the team of the space. Codes: policy-denied, brain-disabled (the organization has no Brain capacity)

  • 404

    The plane has no Brain database configured (BRAIN_DATABASE_URL), so every Brain route is off. Codes: brain-not-enabled

  • 405

    The path is claimed but the request method is not allowed. Go ServeMux returns its standard plain-text response and lists permitted methods in Allow.

  • 500

    Platform failure. Codes: internal-error

GET/brain/v1/spaces/{space}

Read a space

Credencial
API key
Permiso
brain.read

Answers one space.

curl
curl "https://api.latam.ccsio.ai/brain/v1/spaces/{space}" \
  -H "Authorization: Bearer $CCSIO_API_KEY"

Parámetros

NombreEnDescripción
X-Request-ID
opcional
headerstring

Optional request ULID. A valid ULID (upper or lowercase) is honored; when the header is absent or invalid, the runtime mints the id. The response X-Request-ID header carries the canonical uppercase form.

space
obligatorio
pathstring

The space's id. A space the caller's audience does not reach is answered as one that does not exist.

Respuestas

  • 200

    The space.

    Esquema
    BrainSpace
    • idstringobligatorio

      An id generated by core: URL-safe, matching the C6 identifier pattern, and opaque to clients.

      pattern ^[a-z][a-z0-9._-]{0,127}$

    • namestringobligatorio

      1 to 120 characters

    • kindstringobligatorio

      Who the space is for. `organization`: every member. `team`: that team's members. More kinds may be added later (a space of named members is planned): a client must tolerate a value it does not know and treat it as a space it can read but not describe.

    • teamstring or nullobligatorio

      The team id for kind team; null for every other kind.

      pattern ^[a-z][a-z0-9._-]{0,127}$

    • created_atstring (date-time)obligatorio
  • 401

    The request carries no credential, more than one, or one the platform does not accept, and is refused before the operation runs; `error.code` says why. Supply exactly one credential. Codes: invalid-request (no credential, or both Authorization:

    Leer más

    Bearer and x-api-key), api-key-invalid (a value that is not a platform API key, or a key of a kind the platform does not accept), api-key-unknown, api-key-revoked, api-key-expired, bootstrap-disabled (the one-shot installation credential, once a key exists), token-malformed (a bearer token that is not a JWT), token-algorithm-unsupported, token-signature-invalid, token-claim-invalid, token-issuer-mismatch, token-audience-mismatch, token-expired, token-not-yet-valid, issuer-untrusted, issuer-residency-mismatch (the issuer belongs to another plane), issuer-resolution-unknown, jwks-unavailable, jwks-key-not-found, staff-token-inactive (a platform operator's token), staff-not-operator, staff-directory-unavailable, identity-not-provisioned (a verified identity with no account on this plane), organization-not-found (a verified identity or key whose organization this plane does not know), internal-error (a fault while the credential is checked is refused too, fail closed), context-cancelled

  • 402

    The organization has to pay first: its standing is payment_required.

    Leer más

    The request boundary applies this payment gate to every route except an organization's billing routes, the caller's own context, organization list, onboarding, session report and personal keys, the public routes, and the routes of platform operators, who administer an organization that has to pay. The operations the gate covers declare this response. On /v1 the refusal is rendered in the OpenAI error format. Code: payment-required

  • 403

    No role of the caller holds `brain.read` in the organization. Codes: policy-denied, brain-disabled (the organization has no Brain capacity)

  • 404

    The space does not exist or is not one the caller's audience reaches; or the plane has no Brain database configured (BRAIN_DATABASE_URL), so every Brain route is off. Codes: space-not-found, brain-not-enabled

  • 405

    The path is claimed but the request method is not allowed. Go ServeMux returns its standard plain-text response and lists permitted methods in Allow.

  • 500

    Platform failure. Codes: internal-error

PATCH/brain/v1/spaces/{space}

Rename a space

Credencial
API key
Permiso
brain.manage
Cuerpo de la solicitud
Cuerpo de hasta 1 MiB

Renames a space and answers it. The kind and the team of a space never change. The body is capped at 1048576 bytes.

curl
curl -X PATCH "https://api.latam.ccsio.ai/brain/v1/spaces/{space}" \
  -H "Authorization: Bearer $CCSIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "string"
}'
Construido con los campos obligatorios del esquema: reemplaza los valores.

Parámetros

NombreEnDescripción
X-Request-ID
opcional
headerstring

Optional request ULID. A valid ULID (upper or lowercase) is honored; when the header is absent or invalid, the runtime mints the id. The response X-Request-ID header carries the canonical uppercase form.

space
obligatorio
pathstring

The space's id. A space the caller's audience does not reach is answered as one that does not exist.

Cuerpo de la solicitud application/json

BrainSpaceUpdateRequest
  • namestringobligatorio

    1 to 120 characters

Respuestas

  • 200

    The space.

    Esquema
    BrainSpace
    • idstringobligatorio

      An id generated by core: URL-safe, matching the C6 identifier pattern, and opaque to clients.

      pattern ^[a-z][a-z0-9._-]{0,127}$

    • namestringobligatorio

      1 to 120 characters

    • kindstringobligatorio

      Who the space is for. `organization`: every member. `team`: that team's members. More kinds may be added later (a space of named members is planned): a client must tolerate a value it does not know and treat it as a space it can read but not describe.

    • teamstring or nullobligatorio

      The team id for kind team; null for every other kind.

      pattern ^[a-z][a-z0-9._-]{0,127}$

    • created_atstring (date-time)obligatorio
  • 400

    A body that is not strict JSON or a name that is empty or over 120 characters. Codes: invalid-request

  • 401

    The request carries no credential, more than one, or one the platform does not accept, and is refused before the operation runs; `error.code` says why. Supply exactly one credential. Codes: invalid-request (no credential, or both Authorization:

    Leer más

    Bearer and x-api-key), api-key-invalid (a value that is not a platform API key, or a key of a kind the platform does not accept), api-key-unknown, api-key-revoked, api-key-expired, bootstrap-disabled (the one-shot installation credential, once a key exists), token-malformed (a bearer token that is not a JWT), token-algorithm-unsupported, token-signature-invalid, token-claim-invalid, token-issuer-mismatch, token-audience-mismatch, token-expired, token-not-yet-valid, issuer-untrusted, issuer-residency-mismatch (the issuer belongs to another plane), issuer-resolution-unknown, jwks-unavailable, jwks-key-not-found, staff-token-inactive (a platform operator's token), staff-not-operator, staff-directory-unavailable, identity-not-provisioned (a verified identity with no account on this plane), organization-not-found (a verified identity or key whose organization this plane does not know), internal-error (a fault while the credential is checked is refused too, fail closed), context-cancelled

  • 402

    The organization has to pay first: its standing is payment_required.

    Leer más

    The request boundary applies this payment gate to every route except an organization's billing routes, the caller's own context, organization list, onboarding, session report and personal keys, the public routes, and the routes of platform operators, who administer an organization that has to pay. The operations the gate covers declare this response. On /v1 the refusal is rendered in the OpenAI error format. Code: payment-required

  • 403

    No role of the caller holds `brain.manage` in the organization, or in the team of the space. Codes: policy-denied, brain-disabled (the organization has no Brain capacity)

  • 404

    The space does not exist or is not one the caller's audience reaches; or the plane has no Brain database configured (BRAIN_DATABASE_URL), so every Brain route is off. Codes: space-not-found, brain-not-enabled

  • 405

    The path is claimed but the request method is not allowed. Go ServeMux returns its standard plain-text response and lists permitted methods in Allow.

  • 500

    Platform failure. Codes: internal-error

DELETE/brain/v1/spaces/{space}

Delete a space

Credencial
API key
Permiso
brain.manage

Deletes a space and everything in it: its sources, documents and pages, their chunks and search data in the same transaction, and the stored originals. Nothing can be recovered; backups keep the data for their retention. Answers 204. Deleting frees the capacity at once.

curl
curl -X DELETE "https://api.latam.ccsio.ai/brain/v1/spaces/{space}" \
  -H "Authorization: Bearer $CCSIO_API_KEY"

Parámetros

NombreEnDescripción
X-Request-ID
opcional
headerstring

Optional request ULID. A valid ULID (upper or lowercase) is honored; when the header is absent or invalid, the runtime mints the id. The response X-Request-ID header carries the canonical uppercase form.

space
obligatorio
pathstring

The space's id. A space the caller's audience does not reach is answered as one that does not exist.

Respuestas

  • 204

    The space and everything in it are deleted.

  • 401

    The request carries no credential, more than one, or one the platform does not accept, and is refused before the operation runs; `error.code` says why. Supply exactly one credential. Codes: invalid-request (no credential, or both Authorization:

    Leer más

    Bearer and x-api-key), api-key-invalid (a value that is not a platform API key, or a key of a kind the platform does not accept), api-key-unknown, api-key-revoked, api-key-expired, bootstrap-disabled (the one-shot installation credential, once a key exists), token-malformed (a bearer token that is not a JWT), token-algorithm-unsupported, token-signature-invalid, token-claim-invalid, token-issuer-mismatch, token-audience-mismatch, token-expired, token-not-yet-valid, issuer-untrusted, issuer-residency-mismatch (the issuer belongs to another plane), issuer-resolution-unknown, jwks-unavailable, jwks-key-not-found, staff-token-inactive (a platform operator's token), staff-not-operator, staff-directory-unavailable, identity-not-provisioned (a verified identity with no account on this plane), organization-not-found (a verified identity or key whose organization this plane does not know), internal-error (a fault while the credential is checked is refused too, fail closed), context-cancelled

  • 402

    The organization has to pay first: its standing is payment_required.

    Leer más

    The request boundary applies this payment gate to every route except an organization's billing routes, the caller's own context, organization list, onboarding, session report and personal keys, the public routes, and the routes of platform operators, who administer an organization that has to pay. The operations the gate covers declare this response. On /v1 the refusal is rendered in the OpenAI error format. Code: payment-required

  • 403

    No role of the caller holds `brain.manage` in the organization, or in the team of the space. Codes: policy-denied, brain-disabled (the organization has no Brain capacity)

  • 404

    The space does not exist or is not one the caller's audience reaches; or the plane has no Brain database configured (BRAIN_DATABASE_URL), so every Brain route is off. Codes: space-not-found, brain-not-enabled

  • 405

    The path is claimed but the request method is not allowed. Go ServeMux returns its standard plain-text response and lists permitted methods in Allow.

  • 500

    Platform failure. Codes: internal-error

Generado a partir de los contratos de la plataforma en el commit 5954fbc1.

Explora la plataforma

Obtén tu primera key API

El registro está abierto. Cuatro pasos hasta tu primera llamada: crea tu cuenta, crea tu organización, crea tu API key y empieza a usarla.

  1. 01Crea tu cuenta
  2. 02Crea tu organización
  3. 03Crea tu API key
  4. 04Empieza a usarla