Complete reference documentation for the CloudBooks REST API. Build powerful integrations and automate your workflows with our comprehensive API.
Get started with the CloudBooks API in minutes. Follow our comprehensive guides and examples to integrate CloudBooks into your applications.
The CloudBooks API is organized around REST. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.
Here's a simple example to get you started. This request retrieves your user profile:
curl -X POST https://api.cloudbooks.com/v1/auth/login \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"password": "your_password"
}'The CloudBooks API uses API keys to authenticate requests. You can view and manage your API keys in the CloudBooks Dashboard.
Include your API key in the Authorization header of every request:
Authorization: Bearer sk_live_1234567890abcdefFor applications that need to access user data on behalf of other users:
Authorization: Bearer user_access_token/auth/loginAuthenticate user and get access token
/auth/refreshAuth requiredRefresh access token
/auth/logoutAuth requiredInvalidate access token
/users/meAuth requiredGet current user profile
/users/meAuth requiredUpdate current user profile
/users/{id}Auth requiredGet user by ID
/users/meAuth requiredDelete current user account
/organizationsAuth requiredList all organizations
/organizationsAuth requiredCreate new organization
/organizations/{id}Auth requiredGet organization by ID
/organizations/{id}Auth requiredUpdate organization
/organizations/{id}Auth requiredDelete organization
/projectsAuth requiredList all projects
/projectsAuth requiredCreate new project
/projects/{id}Auth requiredGet project by ID
/projects/{id}Auth requiredUpdate project
/projects/{id}Auth requiredDelete project
Here are examples in multiple programming languages to help you get started quickly:
const response = await fetch('https://api.cloudbooks.com/v1/auth/login', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
email: 'user@example.com',
password: 'your_password'
})
});
const data = await response.json();
console.log(data);interface LoginRequest {
email: string;
password: string;
}
interface LoginResponse {
token: string;
user: User;
}
async function login(credentials: LoginRequest): Promise<LoginResponse> {
const response = await fetch('https://api.cloudbooks.com/v1/auth/login', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(credentials)
});
if (!response.ok) {
throw new Error('Login failed');
}
return response.json();
}import requests
url = 'https://api.cloudbooks.com/v1/auth/login'
payload = {
'email': 'user@example.com',
'password': 'your_password'
}
response = requests.post(url, json=payload)
data = response.json()
print(data)CloudBooks uses conventional HTTP response codes to indicate the success or failure of an API request. Codes in the 2xx range indicate success, codes in the 4xx range indicate an error from the provided information, and codes in the 5xx range indicate server errors.
Request succeeded
Resource successfully created
Invalid request parameters
Authentication credentials missing or invalid
Authenticated but lacks permissions
Requested resource does not exist
Rate limit exceeded
Something went wrong on our end
{
"error": {
"code": "invalid_request",
"message": "Invalid email format",
"details": {
"field": "email",
"issue": "Must be a valid email address"
}
}
}The CloudBooks API enforces rate limits to ensure system stability and fair usage across all customers. Rate limits vary based on your subscription plan.
per hour
per hour
unlimited
Every API response includes headers to help you track your usage:
We provide official SDKs in popular programming languages to make integration easier. Each SDK includes type definitions, comprehensive documentation, and code examples.
npm install @cloudbooks/sdkpip install cloudbooks-sdkgem install cloudbookscomposer require cloudbooks/sdkgo get github.com/cloudbooks/go-sdkMaven / Gradle available