SmartMemory
POST
/memory/code/index

Publish a client bundle only after validation and the existing repo cap.

Authorization

AuthorizationBearer <token>

Send Authorization: Bearer <token>. The token is either a Clerk session JWT or a SmartMemory API key (prefix sm_live_, sm_test_, or legacy sk_).

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Bulk index request for code entities and relations.

Response Body

application/json

application/json

curl -X POST "https://example.com/memory/code/index" \  -H "Content-Type: application/json" \  -d '{    "repo": "string",    "entities": [      {        "name": "string",        "entity_type": "string",        "file_path": "string",        "line_number": 0      }    ]  }'
null
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}