Menu

Referência da API · Perfil

Documentos

profile · documents · 3 operações

GET/v1/profile/documents

List the organization's context documents

profile.documents.list

LeituraIdempotenteDesde 2026-11-01

Lists the organization's context documents (Settings → Profile: presentations, price lists, briefs that MB Suite's AI reads as context about the organization; at most 20 per organization, counted together with Brand Voice's), newest first, paginated by cursor: file name, MIME type, size, processing status (processing, ready, or error with error_message), the AI indexing status (embedding_status, chunk_count; read but not indexed for lack of AI credits is status ready with embedding_status error and embedding_error ai_credits_exhausted, ai_personal_limit or payment_required), the AI summary of older uploads when there is one, who uploaded it and when. Brand Voice's documents are not listed here (social_brand_voice.documents.list). status filters the page read and Brand Voice's documents are dropped from it, so a page can bring fewer than limit while has_more is true: follow next_cursor. The text comes with profile.documents.get. Files are uploaded from the screen. Requires view access to the Profile module.

Escopo
profile:read
Permissão
Ver o módulo
Tool do MCP
profile_documents_listNa superfície completa; na compacta, mb_execute_operation com id: "profile.documents.list".

Custo declarado: até 202 leituras e 0 escritas por chamada (contam na cota diária).

Parâmetros

limitintegerqueryopcional

How many items this page brings at most (see the maximum and the default in the schema).

Padrão: 50

cursorstringqueryopcional

The next_cursor of the previous page, exactly as it came (only for the same list and filters); without it, the first page.

statusenumqueryopcional

Only documents in this processing status (filtered on the page read).

Valores: processing, ready, error

Resposta

dataarray<object>
has_moreboolean
next_cursorstring

Erros

Exemplo

curl "https://api.mb-suite.com/v1/profile/documents" \
  -H "Authorization: Bearer $MB_API_KEY"

Testar com a sua API key de teste

Com uma API key de teste o pedido vai sempre para a sua organização de prática: dados de exemplo que você pode reiniciar.

curl "https://api.mb-suite.com/v1/profile/documents" \
  -H "Authorization: Bearer $MB_TEST_KEY"
GET/v1/profile/documents/{document_id}

Get one context document with its text

profile.documents.get

LeituraIdempotenteDesde 2026-11-01

Returns one context document of the organization profile with the text MB Suite extracted from it (extracted_text, up to 50,000 characters; empty while it is processing or when extraction failed): the text the AI reads as context about the organization. Not found (context_document_not_found) when the id does not exist or is a Brand Voice document. The file itself is downloaded from the screen. Requires view access to the Profile module.

Escopo
profile:read
Permissão
Ver o módulo
Tool do MCP
profile_documents_getNa superfície completa; na compacta, mb_execute_operation com id: "profile.documents.get".

Custo declarado: até 1 leituras e 0 escritas por chamada (contam na cota diária).

Parâmetros

document_idstringrotaobrigatório

Id of a context document (from profile.documents.list).

Resposta

idstring
file_namestring
mime_typestring
size_bytesnumber
statusenum

Valores: processing, ready, error

uploaded_bystring
uploaded_atnumber
updated_atnumber
error_messagestring
embedding_statusenum

Valores: pending, processing, ready, error

embedding_errorstring
chunk_countnumber

Fragments indexed for the AI (retrieval).

summarystring

Short AI summary kept from older uploads (new documents have none).

extracted_textstring

Text extracted from the file (only in profile.documents.get).

Erros

Exemplo

curl "https://api.mb-suite.com/v1/profile/documents/{document_id}" \
  -H "Authorization: Bearer $MB_API_KEY"

Testar com a sua API key de teste

Com uma API key de teste o pedido vai sempre para a sua organização de prática: dados de exemplo que você pode reiniciar.

curl "https://api.mb-suite.com/v1/profile/documents/{document_id}" \
  -H "Authorization: Bearer $MB_TEST_KEY"
DELETE/v1/profile/documents/{document_id}

Delete a context document

profile.documents.delete

IrreversívelDesde 2026-11-01

Deletes a context document of the organization profile for good: the file, its extracted text and its AI fragments, so MB Suite's AI stops using it. Brand Voice's documents are not reachable here (social_brand_voice.documents.delete). It does not go to the trash and cannot be undone: outside the screen it always needs a dry run (which says how many AI fragments go) and its confirm_token, and a credential allowed to delete. Returns how many fragments were removed. Requires edit access to the Profile module.

Pede confirmação: primeiro dry_run: true (prévia e confirm_token, válido por 10 minutos e por uma única execução), depois o mesmo corpo com confirm_token. Em algumas poucas, só com certos dados: a descrição diz quando. Por que e como: Prévia e confirmação.

Escopo
profile:write e «Permitir exclusões» (profile:delete no OAuth)
Permissão
Editar no módulo
Tool do MCP
profile_documents_deleteNa superfície completa; na compacta, mb_execute_operation com id: "profile.documents.delete".

Custo declarado: até 45 leituras e 45 escritas por chamada (contam na cota diária).

Parâmetros

document_idstringrotaobrigatório

Id of a context document (from profile.documents.list).

Resposta

oktrue
chunks_deletednumber

Erros

Exemplo

curl -X DELETE "https://api.mb-suite.com/v1/profile/documents/{document_id}" \
  -H "Authorization: Bearer $MB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "dry_run": true
}'

Testar com a sua API key de teste

Com uma API key de teste o pedido vai sempre para a sua organização de prática: dados de exemplo que você pode reiniciar.

curl -X DELETE "https://api.mb-suite.com/v1/profile/documents/{document_id}" \
  -H "Authorization: Bearer $MB_TEST_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "dry_run": true
}'