Links
Links attach external URLs to an idea — reference material, GitHub issues, design documents, or
any relevant resource. All three endpoints take the idea’s database id in the path, not its
#N display number.
List Links
Section titled “List Links”GET /api/v1/ideas/:id/links
Returns every link attached to the idea, newest first. Available on all plans.
curl https://neuralrepo.com/api/v1/ideas/137/links \ -H "X-API-Key: nrp_YOUR_KEY"const res = await fetch( "https://neuralrepo.com/api/v1/ideas/137/links", { headers: { "X-API-Key": "nrp_YOUR_KEY" } });const { links } = await res.json();Response 200 OK
{ "links": [ { "id": 1, "idea_id": 137, "url": "https://github.com/org/repo/issues/42", "title": "GitHub Issue #42", "link_type": "github-issue", "created_at": "2026-03-20 10:00:00" } ]}The same links are also embedded in the links array of GET /ideas/:id, so fetching an idea
already gives you them — this endpoint exists for when you only need the links.
Add Link
Section titled “Add Link”POST /api/v1/ideas/:id/links
Request Body
Section titled “Request Body”| Field | Type | Required | Description |
|---|---|---|---|
url | string | Yes | Must parse as a URL; max 2,000 characters |
title | string | No | Display title, max 200 characters |
link_type | string | No | One of the five types below (default url) |
curl -X POST https://neuralrepo.com/api/v1/ideas/137/links \ -H "X-API-Key: nrp_YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{ "url": "https://github.com/org/repo", "title": "Project repository", "link_type": "github-repo" }'const res = await fetch( "https://neuralrepo.com/api/v1/ideas/137/links", { method: "POST", headers: { "X-API-Key": "nrp_YOUR_KEY", "Content-Type": "application/json", }, body: JSON.stringify({ url: "https://github.com/org/repo", title: "Project repository", link_type: "github-repo", }), });const { link } = await res.json();Response 201 Created
{ "link": { "id": 2, "idea_id": 137, "url": "https://github.com/org/repo", "title": "Project repository", "link_type": "github-repo", "created_at": "2026-03-24 09:00:00" }}Nothing is fetched, validated, or unfurled at the far end: the URL only has to parse. A link to a
page that 404s is stored exactly like one that works, and title is whatever you supply — it is
never read from the page. Duplicate URLs on the same idea are allowed and create separate rows.
Delete Link
Section titled “Delete Link”DELETE /api/v1/ideas/:id/links/:linkId
Removes a link from an idea. Both ids are required, and the link must belong to that idea.
curl -X DELETE https://neuralrepo.com/api/v1/ideas/137/links/2 \ -H "X-API-Key: nrp_YOUR_KEY"Response 200 OK
{ "success": true}Link Types
Section titled “Link Types”link_type is a closed set — any other value is rejected with 400:
| Type | Description |
|---|---|
url | General web link (default) |
claude-chat | Claude conversation link |
github-repo | GitHub repository |
github-issue | GitHub issue or PR |
attachment | Accepted, but see below |
Link Schema
Section titled “Link Schema”| Field | Type | Description |
|---|---|---|
id | number | Unique link identifier — the :linkId for deletion |
idea_id | number | The idea this link belongs to |
url | string | The linked URL |
title | string | null | Display title |
link_type | string | One of the five types above |
created_at | string | UTC YYYY-MM-DD HH:MM:SS |
Status Codes
Section titled “Status Codes”| Status | Meaning |
|---|---|
200 OK | Links listed, or delete accepted |
201 Created | Link added |
400 Bad Request | Non-numeric id, unparseable URL, title too long, or unknown link_type |
401 Unauthorized | Missing or invalid auth |
404 Not Found | The idea does not exist or is not yours |