GoodMemGoodMem
ReferenceAPIREST APISystem

Initialize the system

POST /v1/system/init: Initializes the system by creating a root user and API key.

POST
/v1/system/init

Initializes the system by creating a root user and API key. This endpoint should only be called once during first-time setup. If the system is already initialized, the endpoint will return a success response without creating new credentials.

Header Parameters

GoodMem-Timeout-Ms?integer

Optional waiting budget in milliseconds, measured from REST servlet ingress and shared across all internal gRPC calls. Supply one decimal integer from 1 to 86400000. Omission adds no deadline. Existing shorter deadlines still apply. Expiry returns HTTP 504 before streaming starts; after streaming starts, no successful completion event is sent. Use SSE or opt into GoodMem-Stream-Terminal for an explicit terminal outcome. Retrieval work is cooperatively cancelled. An accepted mutation may still commit after timeout or disconnect; a failed response does not imply rollback.

Formatint64
Range1 <= value <= 86400000

Request Body

Empty request body - no parameters required

application/json
  1. body

Request for initializing the system. No parameters required.

Response Body

System initialization successful

application/json
  1. response

Response from the system initialization endpoint.

alreadyInitialized*boolean

Indicates whether the system was already initialized before this request.

Exampletrue
message*string

A human-readable message about the initialization status.

Example"System initialized successfully"
rootApiKey?|

The API key for the root user. Only present if system was just initialized (not previously initialized).

Example"goodmem_f923b5e6a07e4fb0bdcaa6b7d4c8fea1"
userId?|

The user ID of the root user. Only present if system was just initialized (not previously initialized).

Formatuuid
Example"550e8400-e29b-41d4-a716-446655440000"
Example Request
curl -X POST 'https://your-goodmem-server.example.com/v1/system/init' \  -H 'GoodMem-Timeout-Ms: 30000' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "alreadyInitialized": true,  "message": "System initialized successfully",  "rootApiKey": "goodmem_f923b5e6a07e4fb0bdcaa6b7d4c8fea1",  "userId": "550e8400-e29b-41d4-a716-446655440000"}