The Continuo API is built with GraphQL using Apollo Server, providing a flexible and efficient way to interact with the platform's data. This documentation covers all available queries, mutations, and types.
- Development: http://localhost:4000/graphql
- Production: https://api.continuo.pro/graphql
The API uses JWT (JSON Web Tokens) for authentication. Include the token in the Authorization header:
Authorization: Bearer <your-jwt-token>
In development mode, you can access the GraphQL Playground at the same URL to explore the API interactively.
type User {
id: ID!
email: String!
firstName: String!
lastName: String!
fullName: String!
role: UserRole!
status: UserStatus!
avatar: String
phone: String
companyId: String!
company: Company!
lastLoginAt: DateTime
emailVerifiedAt: DateTime
createdAt: DateTime!
updatedAt: DateTime!
}type Company {
id: ID!
name: String!
slug: String!
email: String
phone: String
website: String
address: String
city: String
state: String
zipCode: String
country: String
industry: String
description: String
logo: String
status: CompanyStatus!
plan: SubscriptionPlan!
planStartedAt: DateTime
planExpiresAt: DateTime
users: [User!]!
userCount: Int!
createdAt: DateTime!
updatedAt: DateTime!
}enum UserRole {
OWNER
ADMIN
MANAGER
EMPLOYEE
VIEWER
}
enum UserStatus {
ACTIVE
INACTIVE
PENDING
SUSPENDED
}
enum CompanyStatus {
TRIAL
ACTIVE
SUSPENDED
CANCELLED
}
enum SubscriptionPlan {
FREE
STARTER
PROFESSIONAL
ENTERPRISE
}query Me {
me {
id
email
firstName
lastName
fullName
role
status
avatar
phone
companyId
company {
id
name
slug
plan
status
}
lastLoginAt
emailVerifiedAt
createdAt
}
}query VerifyEmail($token: String!) {
verifyEmail(token: $token)
}query GetUsers($companyId: String!) {
users(companyId: $companyId) {
id
email
firstName
lastName
fullName
role
status
avatar
phone
lastLoginAt
emailVerifiedAt
createdAt
}
}query GetUser($id: ID!) {
user(id: $id) {
id
email
firstName
lastName
fullName
role
status
avatar
phone
companyId
lastLoginAt
emailVerifiedAt
createdAt
updatedAt
}
}query GetMyCompany {
myCompany {
id
name
slug
email
phone
website
address
city
state
zipCode
country
industry
description
logo
status
plan
planStartedAt
planExpiresAt
userCount
createdAt
updatedAt
}
}query GetCompany($id: ID!) {
company(id: $id) {
id
name
slug
email
phone
website
address
city
state
zipCode
country
industry
description
logo
status
plan
planStartedAt
planExpiresAt
users {
id
firstName
lastName
email
role
status
}
userCount
createdAt
updatedAt
}
}mutation Register($input: RegisterInput!) {
register(input: $input) {
token
user {
id
email
firstName
lastName
fullName
role
status
companyId
company {
id
name
slug
plan
status
}
}
company {
id
name
slug
plan
status
}
}
}Input Type:
input RegisterInput {
email: String!
firstName: String!
lastName: String!
password: String!
companyName: String!
phone: String
}mutation Login($input: LoginInput!) {
login(input: $input) {
token
user {
id
email
firstName
lastName
fullName
role
status
companyId
company {
id
name
slug
plan
status
}
}
company {
id
name
slug
plan
status
}
}
}Input Type:
input LoginInput {
email: String!
password: String!
}mutation Logout {
logout
}mutation ForgotPassword($email: String!) {
forgotPassword(email: $email)
}mutation ResetPassword($input: ResetPasswordInput!) {
resetPassword(input: $input)
}Input Type:
input ResetPasswordInput {
token: String!
password: String!
}mutation ChangePassword($input: ChangePasswordInput!) {
changePassword(input: $input)
}Input Type:
input ChangePasswordInput {
currentPassword: String!
newPassword: String!
}mutation ResendVerificationEmail {
resendVerificationEmail
}mutation UpdateUser($id: ID!, $input: UpdateUserInput!) {
updateUser(id: $id, input: $input) {
id
email
firstName
lastName
fullName
role
status
avatar
phone
companyId
updatedAt
}
}Input Type:
input UpdateUserInput {
firstName: String
lastName: String
phone: String
avatar: String
}mutation DeleteUser($id: ID!) {
deleteUser(id: $id)
}mutation InviteUser($input: InviteUserInput!) {
inviteUser(input: $input) {
id
email
firstName
lastName
fullName
role
status
phone
createdAt
}
}Input Type:
input InviteUserInput {
email: String!
firstName: String!
lastName: String!
role: UserRole!
phone: String
}mutation UpdateUserRole($id: ID!, $role: UserRole!) {
updateUserRole(id: $id, role: $role) {
id
role
updatedAt
}
}mutation UpdateUserStatus($id: ID!, $status: UserStatus!) {
updateUserStatus(id: $id, status: $status) {
id
status
updatedAt
}
}mutation UpdateCompany($input: UpdateCompanyInput!) {
updateCompany(input: $input) {
id
name
email
phone
website
address
city
state
zipCode
country
industry
description
logo
updatedAt
}
}Input Type:
input UpdateCompanyInput {
name: String
email: String
phone: String
website: String
address: String
city: String
state: String
zipCode: String
country: String
industry: String
description: String
logo: String
}mutation UpdateSubscription($plan: SubscriptionPlan!) {
updateSubscription(plan: $plan) {
id
plan
planStartedAt
planExpiresAt
status
updatedAt
}
}The API returns GraphQL errors with the following structure:
{
"errors": [
{
"message": "Error description",
"locations": [{"line": 1, "column": 10}],
"path": ["fieldName"],
"extensions": {
"code": "ERROR_CODE"
}
}
]
}GRAPHQL_VALIDATION_FAILED: Invalid GraphQL queryUNAUTHENTICATED: Authentication requiredFORBIDDEN: Insufficient permissionsBAD_USER_INPUT: Invalid input dataINTERNAL_SERVER_ERROR: Server error
The API implements rate limiting to prevent abuse:
- Default: 100 requests per 15 minutes per IP
- Authentication endpoints: 10 requests per 15 minutes per IP
- GraphQL queries: 100 requests per 15 minutes per IP
For queries that return lists, pagination is supported:
query GetUsers($companyId: String!, $first: Int, $after: String) {
users(companyId: $companyId, first: $first, after: $after) {
edges {
node {
id
email
firstName
lastName
}
cursor
}
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
}
}Real-time features are planned for future sprints. The WebSocket endpoint will be available at:
- Development: ws://localhost:4000/graphql
- Production: wss://api.continuo.pro/graphql
Check API health at:
GET /health
Response:
{
"status": "healthy",
"timestamp": "2025-07-19T02:35:23.561Z",
"version": "0.1.0"
}// 1. Register a new user
const registerResponse = await fetch('/graphql', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
query: `
mutation Register($input: RegisterInput!) {
register(input: $input) {
token
user { id email firstName lastName }
company { id name }
}
}
`,
variables: {
input: {
email: 'john@example.com',
firstName: 'John',
lastName: 'Doe',
password: 'SecurePass123!',
companyName: 'Example Corp'
}
}
})
});
// 2. Login
const loginResponse = await fetch('/graphql', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
query: `
mutation Login($input: LoginInput!) {
login(input: $input) {
token
user { id email firstName lastName }
}
}
`,
variables: {
input: {
email: 'john@example.com',
password: 'SecurePass123!'
}
}
})
});
// 3. Get user data with token
const userResponse = await fetch('/graphql', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${token}`
},
body: JSON.stringify({
query: `
query Me {
me {
id
email
firstName
lastName
company { name plan status }
}
}
`
})
});npm install @apollo/client graphqlnpm install @apollo/client graphqlpip install gql[requests]gem install graphql-clientFor API support:
- Documentation: This file
- GraphQL Playground: http://localhost:4000/graphql (development)
- Issues: Create an issue on GitHub
- Health Check: http://localhost:4000/health
Last updated: July 19, 2025