Professional JSON Management API
Need an API key?
Create API Keyhttps://truejson.com/api/v1Authorization: Bearer YOUR_API_KEYcurl -X GET "https://truejson.com/api/v1/auth/test" \
-H "Authorization: Bearer YOUR_API_KEY"/documentsRetrieve all documents for the authenticated user.
curl -X GET "https://truejson.com/api/v1/documents" \
-H "Authorization: Bearer YOUR_API_KEY"{
"success": true,
"data": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "My JSON Document",
"content": "{\"key\": \"value\"}",
"createdAt": "2024-01-26T10:00:00Z",
"updatedAt": "2024-01-26T11:00:00Z"
}
]
}/documents/:id/versionscurl -X GET "https://truejson.com/api/v1/documents/123e4567-e89b-12d3-a456-426614174000/versions" \
-H "Authorization: Bearer YOUR_API_KEY"{
"success": true,
"data": [
{
"id": "version-uuid-1",
"documentId": "123e4567-e89b-12d3-a456-426614174000",
"versionNumber": "2",
"content": "{\"updated\": \"content\"}",
"description": "Auto-save",
"tag": "",
"createdAt": "2024-01-26T11:00:00Z"
},
{
"id": "version-uuid-2",
"documentId": "123e4567-e89b-12d3-a456-426614174000",
"versionNumber": "1",
"content": "{\"original\": \"content\"}",
"description": "Initial version",
"tag": "v1.0",
"createdAt": "2024-01-26T10:00:00Z"
}
]
}Rate limiting is applied per API key. When exceeded, you'll receive a 429 status code with retry information.
{
"success": false,
"error": "Unauthorized",
"message": "Invalid API key"
}const API_KEY = 'YOUR_API_KEY';
const BASE_URL = 'https://truejson.com/api/v1';
// Create a new document
async function createDocument(name, content) {
const response = await fetch(`${BASE_URL}/documents`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({ name, content })
});
const result = await response.json();
console.log('Created document:', result.data);
return result.data;
}
// Get all documents
async function getDocuments() {
const response = await fetch(`${BASE_URL}/documents`, {
headers: {
'Authorization': `Bearer ${API_KEY}`
}
});
const result = await response.json();
return result.data;
}
// Usage
createDocument('My API Document', '{"example": "data"}')
.then(doc => console.log('Document created:', doc.id));© 2026 TrueJson. All rights reserved.