Skip to content

User & Settings

GET /api/v1/user/me

Returns the authenticated user’s profile.

Terminal window
curl https://neuralrepo.com/api/v1/user/me \
-H "X-API-Key: nrp_YOUR_KEY"

Response 200 OK

{
"id": "user_abc123",
"email": "you@example.com",
"display_name": "Jane Doe",
"avatar_url": "https://avatars.example.com/jane.jpg",
"plan": "pro",
"settings_json": {},
"has_anthropic_key": true,
"has_openai_key": false,
"has_openrouter_key": false,
"has_github_sync": true,
"created_at": "2026-01-15T08:00:00Z",
"updated_at": "2026-03-20T12:00:00Z"
}

PATCH /api/v1/user/me

FieldTypeRequiredDescription
display_namestringNoYour display name
settings_jsonobjectNoArbitrary settings object
Terminal window
curl -X PATCH https://neuralrepo.com/api/v1/user/me \
-H "X-API-Key: nrp_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"display_name": "Jane D.", "settings_json": {"theme": "dark"}}'

Response 200 OK — Returns the updated user object.

GET /api/v1/user/api-keys

Returns all active API keys. The key value is masked in the response.

POST /api/v1/user/api-keys

FieldTypeRequiredDescription
labelstringNoDescriptive label for the key

Response 201 Created

{
"id": "ak_abc123",
"label": "CI Pipeline",
"key": "nrp_a1b2c3d4...",
"created_at": "2026-03-24T09:00:00Z"
}

DELETE /api/v1/user/api-keys/:id

Immediately revokes the key. Returns 204 No Content.

GET /api/v1/user/mcp-tokens

Lists MCP (Model Context Protocol) tokens used by AI assistant integrations. These tokens are managed through the NeuralRepo dashboard and the MCP OAuth flow.

NeuralRepo’s AI features (such as the develop endpoint) require a provider API key. You can store keys for supported providers.

PUT /api/v1/user/byok/:provider

The :provider parameter can be anthropic, openai, or openrouter.

FieldTypeRequiredDescription
api_keystringYesYour provider API key
Terminal window
curl -X PUT https://neuralrepo.com/api/v1/user/byok/anthropic \
-H "X-API-Key: nrp_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"api_key": "sk-ant-..."}'

Response 200 OK

{
"provider": "anthropic",
"saved": true
}

DELETE /api/v1/user/byok/:provider

Removes your stored key for the given provider. Returns 204 No Content.

POST /api/v1/user/byok/:provider/test

Validates the stored key by making a test request to the provider.

Terminal window
curl -X POST https://neuralrepo.com/api/v1/user/byok/anthropic/test \
-H "X-API-Key: nrp_YOUR_KEY"

Response 200 OK

{
"provider": "anthropic",
"valid": true
}

GET /api/v1/user/byok/status

Returns the status of all BYOK providers at once.

{
"anthropic": true,
"openai": false,
"openrouter": false
}

POST /api/v1/user/export

Exports all of your ideas, tags, relations, and links as a JSON file.

Terminal window
curl -X POST https://neuralrepo.com/api/v1/user/export \
-H "X-API-Key: nrp_YOUR_KEY" \
-o export.json

POST /api/v1/user/export/csv

Exports your ideas as a CSV file, suitable for spreadsheets.

Terminal window
curl -X POST https://neuralrepo.com/api/v1/user/export/csv \
-H "X-API-Key: nrp_YOUR_KEY" \
-o export.csv
StatusMeaning
200 OKSuccessful read or update
201 CreatedKey created
204 No ContentKey or provider key deleted
400 Bad RequestValidation error
401 UnauthorizedMissing or invalid auth
403 ForbiddenPlan limits exceeded