Suggestions API
Generate and manage link suggestions
Generate Suggestions
Generate link suggestions for a page:
POST /api/projects/{projectId}/suggestions
Request Body:
{
"sourcePageUrl": "https://example.com/page",
"limit": 10,
"minRelevanceScore": 0.8
}
Response:
{
"data": [
{
"id": "sugg_123",
"sourcePageUrl": "https://example.com/page",
"targetPageUrl": "https://example.com/target",
"anchorText": "relevant link",
"relevanceScore": 0.92,
"context": "Learn about relevant link techniques..."
}
]
}
List Suggestions
List all suggestions for a project:
GET /api/projects/{projectId}/suggestions
Query Parameters:
status- Filter by status (pending, approved, rejected, implemented)limit- Number of results (default: 50)offset- Pagination offset (default: 0)
Response:
{
"data": [
{
"id": "sugg_123",
"sourcePageUrl": "https://example.com/page",
"targetPageUrl": "https://example.com/target",
"status": "pending",
"relevanceScore": 0.92
}
]
}
Get Suggestion
Get a specific suggestion:
GET /api/projects/{projectId}/suggestions/{suggestionId}
Response:
{
"data": {
"id": "sugg_123",
"sourcePageUrl": "https://example.com/page",
"targetPageUrl": "https://example.com/target",
"anchorText": "relevant link",
"context": "Learn about relevant link techniques...",
"relevanceScore": 0.92,
"status": "pending"
}
}
Update Suggestion
Update suggestion status:
PATCH /api/projects/{projectId}/suggestions/{suggestionId}
Request Body:
{
"status": "approved"
}
Status Values:
pending- New suggestionapproved- Approved for implementationrejected- Rejectedimplemented- Already implemented
Delete Suggestion
Delete a suggestion:
DELETE /api/projects/{projectId}/suggestions/{suggestionId}