API Reference
Authentication
MarkStore uses Bearer token authentication. Include your API token in the Authorization header with the Bearer scheme.
Your API Token
You can find your personal API token in your account settings. Keep it safe and never expose it in client-side code.
Example Request
Here's a sample cURL request showing how to authenticate with your token:
curl -X GET https://usemarkstore.com/api/v1/files \
-H "Authorization: Bearer msk_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
-H "Accept: application/json"Authentication Headers
| Header | Description |
|---|---|
Authorization | Bearer token in the format: Bearer msk_... |
Accept | Set to application/json (recommended) |
Quick Example (Node.js)
Using the fetch API with a Bearer token.
const token = 'msk_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
const res = await fetch('https://usemarkstore.com/api/v1/files', {
method: 'GET',
headers: {
'Authorization': `Bearer ${token}`,
'Accept': 'application/json',
}
});
const data = await res.json();
console.log(data);Making Requests
All API requests should be made to the base URL with the appropriate HTTP method.
Base URL
https://usemarkstore.comError Handling
The API returns standard HTTP status codes and JSON error responses.
| Code | Description |
|---|---|
| 200 | Success |
| 201 | Created |
| 400 | Bad Request — invalid parameters |
| 401 | Unauthorized — missing or invalid token |
| 404 | Not Found — resource doesn't exist |
| 409 | Conflict — resource already exists |
| 500 | Server Error |
Example error response:
{
"error": "Unauthorized — provide Authorization: Bearer msk_…"
}Rate Limits
API requests are rate-limited to ensure fair usage. If you exceed the limit, you'll receive a 429 status code.
Files
Endpoints for uploading, downloading, and managing files. Supports Markdown (.md) and JSON (.json) file types.
Endpoints
/api/v1/filesList and retrieve files
/api/v1/filesUpload a file
/api/v1/files/{id}Get a specific file
/api/v1/files/{id}Update a file
/api/v1/files/{id}Delete a file
List Files
Retrieve all files in your account. Optionally filter by folder or project.
| Parameter | Type | Description |
|---|---|---|
folder | string | Filter by folder name (use "all" for all folders) |
project | string | Filter by project ID or name |
Response:
{
"files": [
{
"id": "file_abc123",
"name": "document.md",
"type": "md",
"folder_id": "folder_xyz",
"folder_name": "Documents",
"size": 1234,
"created_at": "2025-05-01T12:34:56Z",
"updated_at": "2025-05-02T10:00:00Z"
}
]
}Create File
Upload a new file. Supports Markdown and JSON content.
curl -X POST https://usemarkstore.com/api/v1/files \
-H "Authorization: Bearer msk_..." \
-H "Content-Type: application/json" \
-d '{
"name": "notes.md",
"type": "md",
"content": "# My Notes\n\nHello, world!"
}'| Field | Type | Description |
|---|---|---|
name* | string | Filename (auto-appends .md or .json) |
type* | string | "md" or "json" |
content | string | File content |
folderName | string | Target folder name |
projectId | string | Target project ID |
projectName | string | Target project name |
Response (201 Created):
{
"ok": true,
"file": {
"id": "file_new123",
"name": "notes.md",
"type": "md",
"folder_id": "folder_default",
"folder_name": "Files",
"size": 28,
"created_at": "2025-05-03T14:00:00Z",
"updated_at": "2025-05-03T14:00:00Z",
"content": "# My Notes\n\nHello, world!"
}
}Get File
Retrieve a specific file by ID, including its content.
curl -X GET https://usemarkstore.com/api/v1/files/{id} \
-H "Authorization: Bearer msk_..."Update File
Update a file's content and/or name. Creates a new version.
curl -X PATCH https://usemarkstore.com/api/v1/files/{id} \
-H "Authorization: Bearer msk_..." \
-H "Content-Type: application/json" \
-d '{"content": "# Updated content", "name": "renamed.md"}'Delete File
Permanently delete a file.
curl -X DELETE https://usemarkstore.com/api/v1/files/{id} \
-H "Authorization: Bearer msk_..."Folders
Organize your files with folders. Create, list, update, and delete folders programmatically.
/api/v1/foldersList all folders
/api/v1/foldersCreate a folder
/api/v1/folders/{id}Get folder by ID
/api/v1/folders/{id}Rename a folder
/api/v1/folders/{id}Delete a folder
List Files in Folder
Use the folder query parameter on the files endpoint.
curl -X GET "https://usemarkstore.com/api/v1/files?folder=Documents" \
-H "Authorization: Bearer msk_..."Projects
Group your content into projects for better organization. Projects have their own folder structure.
Project Endpoints
/api/v1/projectsList all projects
/api/v1/projectsCreate a project
/api/v1/projects/{id}Get project by ID
/api/v1/projects/{id}Update project
/api/v1/projects/{id}Delete project
Project Folders
/api/v1/projects/{id}/foldersList project folders
/api/v1/projects/{id}/foldersCreate project folder
/api/v1/projects/{id}/folders/{folderId}Update folder
/api/v1/projects/{id}/folders/{folderId}Delete folder
List Project Files
curl -X GET "https://usemarkstore.com/api/v1/files?project=my-project" \
-H "Authorization: Bearer msk_..."Create File in Project
curl -X POST https://usemarkstore.com/api/v1/files \
-H "Authorization: Bearer msk_..." \
-H "Content-Type: application/json" \
-d '{
"name": "readme.md",
"type": "md",
"content": "# Project README",
"projectName": "my-project"
}'Versions
Every update to a file creates a new version. View version history and retrieve previous versions via the API.
/api/v1/files/{id}/versionsList file versions
/api/v1/files/{id}/versions/{version}Get specific version
List Versions
curl -X GET https://usemarkstore.com/api/v1/files/{id}/versions \
-H "Authorization: Bearer msk_..."Need Help?
If you have questions or need support, check out our quickstart guide or reach out.