MagickMind
API ReferenceMagickSpaces

Context retrieval for the calling agent (end-user JWT). Returns chat history; the deprecated pelican fetcher is accepted and ignored.

Supports an optional `x-api-key` header (Bearer token format) for API-key-scoped access.

POST
/v1/end-user/magickspaces/{id}/context

Authorization

EndUserAuth
AuthorizationBearer <token>

End-user JWT minted via POST /v1/end-users/tokens, sent as Authorization: Bearer <token>.

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/v1/end-user/magickspaces/string/context" \  -H "Content-Type: application/json" \  -d '{}'
{  "chat_history": [    {      "artifact_ids": [        "string"      ],      "client_message_id": "string",      "content": "string",      "create_at": "string",      "deduplicated": true,      "id": "string",      "magickspace_id": "string",      "magickspace_type": "string",      "message_type": "string",      "reply_to_message_id": "string",      "sent_by_user_id": "string",      "sent_by_user_name": "string",      "status": "string",      "update_at": "string"    }  ],  "corpora": [    {      "description": "string",      "id": "string",      "name": "string"    }  ],  "corpus": [    {      "content": "string"    }  ],  "fetcher": "string",  "magickspace_id": "string",  "magickspace_type": "string",  "participant_id": "string"}