User & Settings
Get Current User
Section titled “Get Current User”GET /api/v1/user/me
Returns the authenticated user’s profile.
curl https://neuralrepo.com/api/v1/user/me \ -H "X-API-Key: nrp_YOUR_KEY"const res = await fetch("https://neuralrepo.com/api/v1/user/me", { headers: { "X-API-Key": "nrp_YOUR_KEY" },});const user = await res.json();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"}Update Profile
Section titled “Update Profile”PATCH /api/v1/user/me
Request Body
Section titled “Request Body”| Field | Type | Required | Description |
|---|---|---|---|
display_name | string | No | Your display name |
settings_json | object | No | Arbitrary settings object |
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.
API Keys
Section titled “API Keys”List Keys
Section titled “List Keys”GET /api/v1/user/api-keys
Returns all active API keys. The key value is masked in the response.
Create Key
Section titled “Create Key”POST /api/v1/user/api-keys
| Field | Type | Required | Description |
|---|---|---|---|
label | string | No | Descriptive label for the key |
Response 201 Created
{ "id": "ak_abc123", "label": "CI Pipeline", "key": "nrp_a1b2c3d4...", "created_at": "2026-03-24T09:00:00Z"}Delete Key
Section titled “Delete Key”DELETE /api/v1/user/api-keys/:id
Immediately revokes the key. Returns 204 No Content.
MCP Tokens
Section titled “MCP Tokens”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.
BYOK (Bring Your Own Key)
Section titled “BYOK (Bring Your Own Key)”NeuralRepo’s AI features (such as the develop endpoint) require a provider API key. You can store keys for supported providers.
Save Provider Key
Section titled “Save Provider Key”PUT /api/v1/user/byok/:provider
The :provider parameter can be anthropic, openai, or openrouter.
| Field | Type | Required | Description |
|---|---|---|---|
api_key | string | Yes | Your provider API key |
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 Provider Key
Section titled “Delete Provider Key”DELETE /api/v1/user/byok/:provider
Removes your stored key for the given provider. Returns 204 No Content.
Test Provider Key
Section titled “Test Provider Key”POST /api/v1/user/byok/:provider/test
Validates the stored key by making a test request to the provider.
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}Check All Providers
Section titled “Check All Providers”GET /api/v1/user/byok/status
Returns the status of all BYOK providers at once.
{ "anthropic": true, "openai": false, "openrouter": false}Data Export
Section titled “Data Export”JSON Export
Section titled “JSON Export”POST /api/v1/user/export
Exports all of your ideas, tags, relations, and links as a JSON file.
curl -X POST https://neuralrepo.com/api/v1/user/export \ -H "X-API-Key: nrp_YOUR_KEY" \ -o export.jsonCSV Export
Section titled “CSV Export”POST /api/v1/user/export/csv
Exports your ideas as a CSV file, suitable for spreadsheets.
curl -X POST https://neuralrepo.com/api/v1/user/export/csv \ -H "X-API-Key: nrp_YOUR_KEY" \ -o export.csvStatus Codes
Section titled “Status Codes”| Status | Meaning |
|---|---|
200 OK | Successful read or update |
201 Created | Key created |
204 No Content | Key or provider key deleted |
400 Bad Request | Validation error |
401 Unauthorized | Missing or invalid auth |
403 Forbidden | Plan limits exceeded |