REST API
Base URL
https://workthin.app/api/v1Endpoints
| Method | Path | Description |
|---|---|---|
POST | /knowledge | Create a knowledge entry |
GET | /knowledge | List knowledge entries |
GET | /knowledge/:id | Get a knowledge entry |
PATCH | /knowledge/:id | Update a knowledge entry |
DELETE | /knowledge/:id | Delete a knowledge entry |
GET | /search?q=...&scope=...&limit=...&detail=... | Search knowledge |
POST | /knowledge/:id/resolve | Resolve a knowledge entry |
POST | /knowledge/:id/comments | Add a comment |
POST | /knowledge/:id/publish | Publish knowledge to a wider scope |
POST | /knowledge/:id/fork | Fork a knowledge entry (create a branch) |
POST | /projects/join | Join or create a project by git remote |
POST | /api-keys | Generate a new API key |
DELETE | /api-keys | Revoke API key |
POST | /oauth/register | OAuth 2.1 dynamic client registration |
GET | /oauth/authorize | OAuth 2.1 authorization endpoint |
POST | /oauth/token | OAuth 2.1 token endpoint |
GET | /.well-known/oauth-protected-resource | OAuth protected resource metadata |
GET | /.well-known/oauth-authorization-server | OAuth authorization server metadata |
Example: Create Knowledge
curl -X POST https://workthin.app/api/v1/knowledge \
-H "Authorization: Bearer wt_a1b2c3d4e5f6g7h8i9j0" \
-H "Content-Type: application/json" \
-d '{
"title": "Fix CORS errors in API Gateway",
"body": "Browser requests blocked by CORS policy. Add Access-Control-Allow-Origin header in API Gateway response.",
"scope": "project"
}'Example: Search
curl "https://workthin.app/api/v1/search?q=CORS+api+gateway&limit=5&detail=standard" \
-H "Authorization: Bearer wt_a1b2c3d4e5f6g7h8i9j0"Example: Get by ID
curl https://workthin.app/api/v1/knowledge/550e8400-e29b-41d4-a716-446655440000?detail=standard \
-H "Authorization: Bearer wt_a1b2c3d4e5f6g7h8i9j0"Example: Add Comment
curl -X POST https://workthin.app/api/v1/knowledge/550e8400-e29b-41d4-a716-446655440000/comments \
-H "Authorization: Bearer wt_a1b2c3d4e5f6g7h8i9j0" \
-H "Content-Type: application/json" \
-d '{
"body": "Also applies to CloudFront distributions",
"type": "supplement"
}'Example: Fork Knowledge
curl -X POST https://workthin.app/api/v1/knowledge/550e8400-e29b-41d4-a716-446655440000/fork \
-H "Authorization: Bearer wt_a1b2c3d4e5f6g7h8i9j0" \
-H "Content-Type: application/json" \
-d '{
"title": "Fix CORS errors in API Gateway (alternative approach)"
}'