This document describes the external API system that allows external applications to access project data using API keys.
The external API provides secure, project-specific access to:
All external API endpoints require API key authentication using the X-API-Key header. API keys are tied to a specific project and provide access only to that project's data.
Base URL: app.hintoai.com/api/external/v1
curl -H "X-API-Key: your-api-key-here" \
https://app.hintoai.com/api/external/v1/projects/structure
Endpoint: GET /api/external/v1/projects/structure Authentication: Required (Project API Key)
Returns the hierarchical structure of folders and articles within the authenticated project.
Response:
{
"project": {
"id": "uuid",
"name": "Project Name",
"description": "Project description",
"url": "https://project-website.com",
"logoUrl": "https://logo-url.com/logo.png",
"projectBrandData": { /* branding data */ },
"isSearchEngineIndexed": true
},
"structure": {
"folders": [
{
"id": 1,
"name": "Folder Name",
"articles": [
{
"id": 1,
"title": "Article Title",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z",
"video_id": "uuid"
}
],
"children": [/* nested folders */]
}
],
"rootArticles": [
{
"id": 2,
"title": "Root Article",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z",
"video_id": "uuid"
}
]
}
}
Endpoint: GET /api/external/v1/articles/{id} Authentication: Required (Project API Key)
Returns a specific article with its content in HTML or Markdown format.
Query Parameters:
Response (HTML format):
{
"article": {
"id": 1,
"title": "Article Title",
"project_id": "uuid",
"folder_id": 1,
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
},
"content": {
"html": "<h1>Article Title</h1><p>Article content...</p>",
"format": "html"
},
"project": {
"slug": "project-slug",
"name": "Project Name"
}
}
Response (Markdown format):
{
"article": {
"id": 1,
"title": "Article Title",
"project_id": "uuid",
"folder_id": 1,
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
},
"content": {
"markdown": "# Article Title\n\nArticle content...",
"format": "markdown"
},
"project": {
"slug": "project-slug",
"name": "Project Name"
}
}
Endpoint: GET /api/external/v1/projects/export Authentication: Required (Project API Key)
Downloads the entire project as a ZIP archive or single file.
Query Parameters:
Response:
All endpoints return consistent error responses:
{
"error": "Error type",
"message": "Detailed error message"
}
Common error codes:
curl -H "X-API-Key: your-api-key" \
https://app.hintoai.com/api/external/v1/projects/structure
curl -H "X-API-Key: your-api-key" \
https://app.hintoai.com/api/external/v1/articles/123
curl -H "X-API-Key: your-api-key" \
https://app.hintoai.com/api/external/v1/articles/123?format=markdown
curl -H "X-API-Key: your-api-key" \
https://app.hintoai.com/api/external/v1/articles/123?clean=true
curl -H "X-API-Key: your-api-key" \
https://app.hintoai.com/api/external/v1/projects/export?format=html \
-o project-export.zip
curl -H "X-API-Key: your-api-key" \
https://app.hintoai.com/api/external/v1/projects/export?format=llm-text \
-o project-export.txt
curl -H "X-API-Key: your-api-key" \
https://app.hintoai.com/api/external/v1/projects/export?format=markdown \
-o project-export.zip