Download OpenAPI specification:Download
Artalk is a modern comment system based on Golang.
Login by email with verify code (Need send email verify code first) or password
The data to login
code | string |
email required | string |
password | string |
{- "code": "string",
- "email": "string",
- "password": "string"
}
{- "token": "string",
- "user": {
- "badge_color": "string",
- "badge_name": "string",
- "email": "string",
- "id": 0,
- "is_admin": true,
- "link": "string",
- "name": "string",
- "receive_email": true
}
}
Register by email and verify code (if user exists, will update user, like forget or change password. Need send email verify code first)
The data to register
code required | string |
email required | string |
link | string |
name | string |
password required | string |
{- "code": "string",
- "email": "string",
- "link": "string",
- "name": "string",
- "password": "string"
}
{- "token": "string",
- "user": {
- "badge_color": "string",
- "badge_name": "string",
- "email": "string",
- "id": 0,
- "is_admin": true,
- "link": "string",
- "name": "string",
- "receive_email": true
}
}
This function is to solve the problem of multiple users with the same email address, should be called after user login and then check, and perform data merge.
The data
user_name required | string |
{- "user_name": "string"
}
{- "deleted_user_count": 0,
- "update_comments_count": 0,
- "update_notifies_count": 0,
- "update_votes_count": 0,
- "user_token": "string"
}
Get user info to prepare for login or check current user status
string The user email | |
name | string The username |
{- "is_login": true,
- "notifies": [
- {
- "comment_id": 0,
- "id": 0,
- "is_emailed": true,
- "is_read": true,
- "read_link": "string",
- "user_id": 0
}
], - "notifies_count": 0,
- "user": {
- "badge_color": "string",
- "badge_name": "string",
- "email": "string",
- "id": 0,
- "is_admin": true,
- "link": "string",
- "name": "string",
- "receive_email": true
}
}
Update user profile when user is logged in
The profile data to update
code | string |
email required | string |
link | string |
name required | string |
{- "code": "string",
- "email": "string",
- "link": "string",
- "name": "string"
}
{- "user": {
- "badge_color": "string",
- "badge_name": "string",
- "email": "string",
- "id": 0,
- "is_admin": true,
- "link": "string",
- "name": "string",
- "receive_email": true
}
}
Login user by name or email
The user login data
email required | string The user email |
name | string The username |
password required | string The user password |
{- "email": "string",
- "name": "string",
- "password": "string"
}
{- "token": "string",
- "user": {
- "badge_color": "string",
- "badge_name": "string",
- "email": "string",
- "id": 0,
- "is_admin": true,
- "link": "string",
- "name": "string",
- "receive_email": true
}
}
Verify user enters correct captcha code
The data to check
value required | string The captcha value to check |
{- "value": "string"
}
{ }
Get a list of comments by some conditions
string The user email | |
flat_mode | boolean Enable flat_mode |
limit | integer The limit for pagination |
name | string The username |
offset | integer The offset for pagination |
page_key required | string The comment page_key |
scope | string Enum: "page" "user" "site" The scope of comments |
search | string Search keywords |
site_name | string The site name of your content scope |
sort_by | string Enum: "date_asc" "date_desc" "vote" Sort by condition |
type | string Enum: "all" "mentions" "mine" "pending" Message center show type |
view_only_admin | boolean Only show comments by admin |
{- "comments": [
- {
- "badge_color": "string",
- "badge_name": "string",
- "content": "string",
- "content_marked": "string",
- "date": "string",
- "email_encrypted": "string",
- "id": 0,
- "ip_region": "string",
- "is_allow_reply": true,
- "is_collapsed": true,
- "is_pending": true,
- "is_pinned": true,
- "is_verified": true,
- "link": "string",
- "nick": "string",
- "page_key": "string",
- "page_url": "string",
- "rid": 0,
- "site_name": "string",
- "ua": "string",
- "user_id": 0,
- "visible": true,
- "vote_down": 0,
- "vote_up": 0
}
], - "count": 0,
- "page": {
- "admin_only": true,
- "date": "string",
- "id": 0,
- "key": "string",
- "pv": 0,
- "site_name": "string",
- "title": "string",
- "url": "string",
- "vote_down": 0,
- "vote_up": 0
}, - "roots_count": 0
}
Create a new comment
The comment data
content required | string The comment content |
email required | string The comment email |
link | string The comment link |
name required | string The comment name |
page_key required | string The comment page_key |
page_title | string The comment page_title |
rid | integer The comment rid |
site_name required | string The site name of your content scope |
ua | string The comment ua |
{- "content": "string",
- "email": "string",
- "link": "string",
- "name": "string",
- "page_key": "string",
- "page_title": "string",
- "rid": 0,
- "site_name": "string",
- "ua": "string"
}
{- "badge_color": "string",
- "badge_name": "string",
- "content": "string",
- "content_marked": "string",
- "date": "string",
- "email_encrypted": "string",
- "id": 0,
- "ip_region": "string",
- "is_allow_reply": true,
- "is_collapsed": true,
- "is_pending": true,
- "is_pinned": true,
- "is_verified": true,
- "link": "string",
- "nick": "string",
- "page_key": "string",
- "page_url": "string",
- "rid": 0,
- "site_name": "string",
- "ua": "string",
- "user_id": 0,
- "visible": true,
- "vote_down": 0,
- "vote_up": 0
}
Get the detail of a comment by comment id
id required | integer The comment ID you want to get |
{- "comment": {
- "badge_color": "string",
- "badge_name": "string",
- "content": "string",
- "content_marked": "string",
- "date": "string",
- "email_encrypted": "string",
- "id": 0,
- "ip_region": "string",
- "is_allow_reply": true,
- "is_collapsed": true,
- "is_pending": true,
- "is_pinned": true,
- "is_verified": true,
- "link": "string",
- "nick": "string",
- "page_key": "string",
- "page_url": "string",
- "rid": 0,
- "site_name": "string",
- "ua": "string",
- "user_id": 0,
- "visible": true,
- "vote_down": 0,
- "vote_up": 0
}, - "reply_comment": {
- "badge_color": "string",
- "badge_name": "string",
- "content": "string",
- "content_marked": "string",
- "date": "string",
- "email_encrypted": "string",
- "id": 0,
- "ip_region": "string",
- "is_allow_reply": true,
- "is_collapsed": true,
- "is_pending": true,
- "is_pinned": true,
- "is_verified": true,
- "link": "string",
- "nick": "string",
- "page_key": "string",
- "page_url": "string",
- "rid": 0,
- "site_name": "string",
- "ua": "string",
- "user_id": 0,
- "visible": true,
- "vote_down": 0,
- "vote_up": 0
}
}
Update a specific comment
id required | integer The comment ID you want to update |
The comment data
content required | string The comment content |
string The comment email | |
ip | string The comment ip |
is_collapsed required | boolean The comment is_collapsed |
is_pending required | boolean The comment is_pending |
is_pinned required | boolean The comment is_pinned |
link | string The comment link |
nick | string The comment nick |
page_key required | string The comment page_key |
rid required | integer The comment rid |
site_name required | string The site name of your content scope |
ua | string The comment ua |
{- "content": "string",
- "email": "string",
- "ip": "string",
- "is_collapsed": true,
- "is_pending": true,
- "is_pinned": true,
- "link": "string",
- "nick": "string",
- "page_key": "string",
- "rid": 0,
- "site_name": "string",
- "ua": "string"
}
{- "badge_color": "string",
- "badge_name": "string",
- "content": "string",
- "content_marked": "string",
- "date": "string",
- "email_encrypted": "string",
- "id": 0,
- "ip_region": "string",
- "is_allow_reply": true,
- "is_collapsed": true,
- "is_pending": true,
- "is_pinned": true,
- "is_verified": true,
- "link": "string",
- "nick": "string",
- "page_key": "string",
- "page_url": "string",
- "rid": 0,
- "site_name": "string",
- "ua": "string",
- "user_id": 0,
- "visible": true,
- "vote_down": 0,
- "vote_up": 0
}
Send an email to test the email sender
The email data
body required | string The body of email |
subject required | string The subject of email |
to_addr required | string The email address of the receiver |
{- "body": "string",
- "subject": "string",
- "to_addr": "string"
}
{ }
Apply settings and restart the server
The settings
yaml required | string The content of the config file in YAML format |
{- "yaml": "string"
}
{ }
Get config templates in different languages for rendering the settings page in the frontend
locale required | string The locale of the settings template you want to get |
{- "yaml": "string"
}
Get a list of notifies for user
name required | string The user name |
email required | string The user email |
{- "count": 0,
- "notifies": [
- {
- "comment_id": 0,
- "id": 0,
- "is_emailed": true,
- "is_read": true,
- "read_link": "string",
- "user_id": 0
}
]
}
Mark all notifies as read for user
The options
email required | string The user email |
name required | string The username |
{- "email": "string",
- "name": "string"
}
{ }
Get a list of pages by some conditions
limit | integer The limit for pagination |
offset | integer The offset for pagination |
search | string Search keywords |
site_name | string The site name of your content scope |
{- "count": 0,
- "pages": [
- {
- "admin_only": true,
- "date": "string",
- "id": 0,
- "key": "string",
- "pv": 0,
- "site_name": "string",
- "title": "string",
- "url": "string",
- "vote_down": 0,
- "vote_up": 0
}
]
}
Fetch the data of all pages
The options
site_name | string If not empty, only fetch pages of this site |
{- "site_name": "string"
}
{ }
Increase and get the number of page views
The page to record pv
page_key required | string The page key |
page_title | string The page title |
site_name | string The site name of your content scope |
{- "page_key": "string",
- "page_title": "string",
- "site_name": "string"
}
{- "pv": 0
}
Update a specific page
id required | integer The page ID you want to update |
The page data
admin_only required | boolean Updated page admin_only option |
key required | string Updated page key |
site_name required | string The site name of your content scope |
title required | string Updated page title |
{- "admin_only": true,
- "key": "string",
- "site_name": "string",
- "title": "string"
}
{- "admin_only": true,
- "date": "string",
- "id": 0,
- "key": "string",
- "pv": 0,
- "site_name": "string",
- "title": "string",
- "url": "string",
- "vote_down": 0,
- "vote_up": 0
}
Fetch the data of a specific page
id required | integer The page ID you want to fetch |
{- "admin_only": true,
- "date": "string",
- "id": 0,
- "key": "string",
- "pv": 0,
- "site_name": "string",
- "title": "string",
- "url": "string",
- "vote_down": 0,
- "vote_up": 0
}
Create a new site
The site data
name required | string The site name |
urls required | Array of strings The site urls |
{- "name": "string",
- "urls": [
- "string"
]
}
{- "first_url": "string",
- "id": 0,
- "name": "string",
- "urls": [
- "string"
], - "urls_raw": "string"
}
Update a specific site
id required | integer The site ID you want to update |
The site data
name required | string Updated site name |
urls required | Array of strings Updated site urls |
{- "name": "string",
- "urls": [
- "string"
]
}
{- "first_url": "string",
- "id": 0,
- "name": "string",
- "urls": [
- "string"
], - "urls_raw": "string"
}
Get the statistics of various data analysis
type required | string Enum: "latest_comments" "latest_pages" "pv_most_pages" "comment_most_pages" "page_pv" "site_pv" "page_comment" "site_comment" "rand_comments" "rand_pages" The type of statistics |
limit | integer The limit for pagination |
page_keys | string multiple page keys separated by commas |
site_name | string The site name of your content scope |
{- "data": null,
- "msg": "string"
}
Import data to Artalk
The data to import
assumeyes | boolean Automatically answer yes for all questions |
json_data | string The JSON data |
json_file | string The JSON file path |
target_site_name | string The target site name |
target_site_url | string The target site url |
url_keep_domain | boolean Keep domain |
url_resolver | boolean Enable URL resolver |
{- "assumeyes": true,
- "json_data": "string",
- "json_file": "string",
- "target_site_name": "string",
- "target_site_url": "string",
- "url_keep_domain": true,
- "url_resolver": true
}
Create a new user
The user data
badge_color | string The user badge color (hex format) |
badge_name | string The user badge name |
email required | string The user email |
is_admin required | boolean The user is an admin |
link | string The user link |
name required | string The user name |
password | string The user password |
receive_email required | boolean The user receive email |
{- "badge_color": "string",
- "badge_name": "string",
- "email": "string",
- "is_admin": true,
- "link": "string",
- "name": "string",
- "password": "string",
- "receive_email": true
}
{- "badge_color": "string",
- "badge_name": "string",
- "comment_count": 0,
- "email": "string",
- "id": 0,
- "is_admin": true,
- "is_in_conf": true,
- "last_ip": "string",
- "last_ua": "string",
- "link": "string",
- "name": "string",
- "receive_email": true
}
Update a specific user
id required | integer The user ID you want to update |
The user data
badge_color | string The user badge color (hex format) |
badge_name | string The user badge name |
email required | string The user email |
is_admin required | boolean The user is an admin |
link | string The user link |
name required | string The user name |
password | string The user password |
receive_email required | boolean The user receive email |
{- "badge_color": "string",
- "badge_name": "string",
- "email": "string",
- "is_admin": true,
- "link": "string",
- "name": "string",
- "password": "string",
- "receive_email": true
}
{- "badge_color": "string",
- "badge_name": "string",
- "comment_count": 0,
- "email": "string",
- "id": 0,
- "is_admin": true,
- "is_in_conf": true,
- "last_ip": "string",
- "last_ua": "string",
- "link": "string",
- "name": "string",
- "receive_email": true
}
Get a list of users by some conditions
type required | string Enum: "all" "admin" "in_conf" The type of users |
limit | integer The limit for pagination |
offset | integer The offset for pagination |
search | string Search keywords |
{- "count": 0,
- "users": [
- {
- "badge_color": "string",
- "badge_name": "string",
- "comment_count": 0,
- "email": "string",
- "id": 0,
- "is_admin": true,
- "is_in_conf": true,
- "last_ip": "string",
- "last_ua": "string",
- "link": "string",
- "name": "string",
- "receive_email": true
}
]
}
Get vote status for a specific comment or page
target_name required | string Enum: "comment" "page" The name of vote target |
target_id required | integer The target comment or page ID |
{- "down": 0,
- "is_down": true,
- "is_up": true,
- "up": 0
}
Create a new vote for a specific comment or page
target_name required | string Enum: "comment" "page" The name of vote target |
target_id required | integer The target comment or page ID |
choice required | string Enum: "up" "down" The vote choice |
The vote data
string The user email | |
name | string The username |
{- "email": "string",
- "name": "string"
}
{- "down": 0,
- "is_down": true,
- "is_up": true,
- "up": 0
}