MENU navbar-image

Introduction

SWELLEnterprise API provides comprehensive access to all modules and features. Use API tokens for authentication and configure webhooks to receive real-time event notifications.

# SWELLEnterprise API Documentation

Welcome to the SWELLEnterprise API! This comprehensive REST API provides programmatic access to all modules and features in your SWELL account.

## Quick Start

1. **Create an API Token**: Go to Settings → API Tokens in your account
2. **Use the Token**: Include it in the `Authorization` header: `Bearer your-token-here`
3. **Make Requests**: All endpoints are prefixed with `/api/v1/`

## Authentication

All API requests require authentication using a Bearer token. You can create and manage API tokens in your account settings.

**Example Request:**
```bash
curl -H "Authorization: Bearer your-api-token-here" \
     -H "Accept: application/json" \
     https://your-domain.com/api/v1/crm/contacts
```

**JavaScript Example:**
```javascript
fetch('https://your-domain.com/api/v1/crm/contacts', {
  headers: {
    'Authorization': 'Bearer your-api-token-here',
    'Accept': 'application/json'
  }
})
```

## Rate Limiting

API requests are rate limited to **60 requests per minute** per token. If you exceed this limit, you'll receive a `429 Too Many Requests` response with a `Retry-After` header indicating when you can retry.

## Pagination

List endpoints support pagination with the following query parameters:
- `page`: Page number (default: 1)
- `per_page`: Items per page (default: 15, max: 100)

**Example:**
```
GET /api/v1/crm/contacts?page=2&per_page=50
```

## Filtering & Search

Most list endpoints support:
- `search`: Full-text search across relevant fields
- `sort`: Sort by field (e.g., `sort=name` or `sort=-created_at` for descending)
- Field-specific filters (e.g., `company_id`, `status_id`)

**Example:**
```
GET /api/v1/crm/contacts?search=john&company_id=1&sort=-created_at
```

## Bulk Operations

Some endpoints support bulk operations for creating, updating, or deleting multiple records at once. See individual endpoint documentation for details.

## Webhooks

Configure webhooks to receive real-time notifications when events occur in your account. Webhooks use HMAC signatures for security verification.

- **Create Subscriptions**: `POST /api/v1/webhooks/subscriptions`
- **Available Events**: `GET /api/v1/webhooks/events`
- **Test Webhooks**: Use the test endpoint to verify your webhook configuration

See the Webhooks section for complete documentation.

## Error Handling

The API uses standard HTTP status codes and returns detailed error messages:

- `400 Bad Request`: Invalid request parameters
- `401 Unauthorized`: Missing or invalid authentication token
- `403 Forbidden`: Insufficient permissions
- `404 Not Found`: Resource not found
- `422 Validation Error`: Request validation failed
- `429 Too Many Requests`: Rate limit exceeded
- `500 Internal Server Error`: Server error

**Error Response Format:**
```json
{
  "error": {
    "message": "Validation failed",
    "code": "VALIDATION_ERROR",
    "errors": {
      "email": ["The email field is required."]
    }
  },
  "meta": {
    "timestamp": "2026-01-15T12:00:00Z"
  }
}
```

## Response Format

All successful responses follow this structure:

```json
{
  "data": { ... },
  "message": "Operation successful",
  "meta": {
    "timestamp": "2026-01-15T12:00:00Z",
    "version": "v1"
  }
}
```

Paginated responses include additional metadata:

```json
{
  "data": [ ... ],
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 10,
    "per_page": 15,
    "to": 15,
    "total": 150,
    "timestamp": "2026-01-15T12:00:00Z",
    "version": "v1"
  },
  "links": { ... }
}
```

<aside>💡 **Tip**: As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile). You can switch the language used with the tabs at the top right.</aside>

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer Bearer {YOUR_API_TOKEN}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

You can create API tokens in your account settings. Go to Settings → API Tokens to generate a new token.

Authentication

Create a new API token.

requires authentication

Example request:
curl --request POST \
    "http://localhost/api/v1/api/v1/tokens" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"abilities\": [
        \"architecto\"
    ],
    \"expires_at\": \"2026-03-27T17:33:05\"
}"
const url = new URL(
    "http://localhost/api/v1/api/v1/tokens"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b",
    "abilities": [
        "architecto"
    ],
    "expires_at": "2026-03-27T17:33:05"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/tokens

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Must not be greater than 255 characters. Example: b

abilities   string[]  optional    
expires_at   string  optional    

Must be a valid date. Example: 2026-03-27T17:33:05

Revoke a specific API token.

requires authentication

Example request:
curl --request DELETE \
    "http://localhost/api/v1/api/v1/tokens/architecto" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/api/v1/tokens/architecto"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/tokens/{tokenId}

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

tokenId   string     

Example: architecto

Revoke all API tokens for the authenticated user.

requires authentication

Example request:
curl --request DELETE \
    "http://localhost/api/v1/api/v1/tokens" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/api/v1/tokens"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/tokens

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

CRM - Companies

Store a newly created company.

requires authentication

Example request:
curl --request POST \
    "http://localhost/api/v1/api/v1/crm/companies" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Acme Corp\",
    \"email\": \"info@acme.com\",
    \"phone\": \"+1234567890\",
    \"website\": \"https:\\/\\/acme.com\",
    \"address\": \"123 Main St\",
    \"notes\": \"Important client\"
}"
const url = new URL(
    "http://localhost/api/v1/api/v1/crm/companies"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Acme Corp",
    "email": "info@acme.com",
    "phone": "+1234567890",
    "website": "https:\/\/acme.com",
    "address": "123 Main St",
    "notes": "Important client"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/crm/companies

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

The company name. Example: Acme Corp

email   string  optional    

The company email. Example: info@acme.com

phone   string  optional    

The company phone. Example: +1234567890

website   string  optional    

The company website. Example: https://acme.com

address   string  optional    

The company address. Example: 123 Main St

notes   string  optional    

Notes about the company. Example: Important client

Update the specified company.

requires authentication

Example request:
curl --request PUT \
    "http://localhost/api/v1/api/v1/crm/companies/1" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Acme Corp\",
    \"email\": \"info@acme.com\",
    \"phone\": \"+1234567890\",
    \"website\": \"https:\\/\\/acme.com\",
    \"address\": \"123 Main St\",
    \"notes\": \"Important client\"
}"
const url = new URL(
    "http://localhost/api/v1/api/v1/crm/companies/1"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Acme Corp",
    "email": "info@acme.com",
    "phone": "+1234567890",
    "website": "https:\/\/acme.com",
    "address": "123 Main St",
    "notes": "Important client"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/crm/companies/{id}

PATCH api/v1/crm/companies/{id}

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The company ID. Example: 1

Body Parameters

name   string  optional    

The company name. Example: Acme Corp

email   string  optional    

The company email. Example: info@acme.com

phone   string  optional    

The company phone. Example: +1234567890

website   string  optional    

The company website. Example: https://acme.com

address   string  optional    

The company address. Example: 123 Main St

notes   string  optional    

Notes about the company. Example: Important client

Remove the specified company.

requires authentication

Example request:
curl --request DELETE \
    "http://localhost/api/v1/api/v1/crm/companies/1" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/api/v1/crm/companies/1"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/crm/companies/{id}

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The company ID. Example: 1

CRM - Contacts

Store a newly created contact.

requires authentication

Example request:
curl --request POST \
    "http://localhost/api/v1/api/v1/crm/contacts" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"first_name\": \"John\",
    \"last_name\": \"Doe\",
    \"email\": \"john@example.com\",
    \"phone\": \"+1234567890\",
    \"company_id\": 1,
    \"notes\": \"Important client\"
}"
const url = new URL(
    "http://localhost/api/v1/api/v1/crm/contacts"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "first_name": "John",
    "last_name": "Doe",
    "email": "john@example.com",
    "phone": "+1234567890",
    "company_id": 1,
    "notes": "Important client"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/crm/contacts

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

first_name   string     

The contact's first name. Example: John

last_name   string     

The contact's last name. Example: Doe

email   string  optional    

The contact's email. Example: john@example.com

phone   string  optional    

The contact's phone. Example: +1234567890

company_id   integer  optional    

The company ID. Example: 1

notes   string  optional    

Notes about the contact. Example: Important client

Update the specified contact.

requires authentication

Example request:
curl --request PUT \
    "http://localhost/api/v1/api/v1/crm/contacts/1" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"first_name\": \"John\",
    \"last_name\": \"Doe\",
    \"email\": \"john@example.com\",
    \"phone\": \"+1234567890\",
    \"company_id\": 1,
    \"notes\": \"Important client\"
}"
const url = new URL(
    "http://localhost/api/v1/api/v1/crm/contacts/1"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "first_name": "John",
    "last_name": "Doe",
    "email": "john@example.com",
    "phone": "+1234567890",
    "company_id": 1,
    "notes": "Important client"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/crm/contacts/{id}

PATCH api/v1/crm/contacts/{id}

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The contact ID. Example: 1

Body Parameters

first_name   string  optional    

The contact's first name. Example: John

last_name   string  optional    

The contact's last name. Example: Doe

email   string  optional    

The contact's email. Example: john@example.com

phone   string  optional    

The contact's phone. Example: +1234567890

company_id   integer  optional    

The company ID. Example: 1

notes   string  optional    

Notes about the contact. Example: Important client

Remove the specified contact.

requires authentication

Example request:
curl --request DELETE \
    "http://localhost/api/v1/api/v1/crm/contacts/1" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/api/v1/crm/contacts/1"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/crm/contacts/{id}

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The contact ID. Example: 1

Bulk create contacts.

requires authentication

Example request:
curl --request POST \
    "http://localhost/api/v1/api/v1/crm/contacts/bulk" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"contacts\": [
        {
            \"first_name\": \"John\",
            \"last_name\": \"Doe\",
            \"email\": \"john@example.com\"
        }
    ]
}"
const url = new URL(
    "http://localhost/api/v1/api/v1/crm/contacts/bulk"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "contacts": [
        {
            "first_name": "John",
            "last_name": "Doe",
            "email": "john@example.com"
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/crm/contacts/bulk

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

contacts   string[]     

Array of contact objects to create.

*   object  optional    
first_name   string     

The contact's first name. Example: John

last_name   string     

The contact's last name. Example: Doe

email   string  optional    

The contact's email. Example: john@example.com

phone   string  optional    

The contact's phone. Example: +1234567890

company_id   integer  optional    

The company ID. Example: 1

notes   string  optional    

Notes about the contact. Example: Important client

Bulk update contacts.

requires authentication

Example request:
curl --request PUT \
    "http://localhost/api/v1/api/v1/crm/contacts/bulk" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"contacts\": [
        {
            \"id\": 1,
            \"first_name\": \"Jane\"
        },
        {
            \"id\": 2,
            \"email\": \"new@example.com\"
        }
    ]
}"
const url = new URL(
    "http://localhost/api/v1/api/v1/crm/contacts/bulk"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "contacts": [
        {
            "id": 1,
            "first_name": "Jane"
        },
        {
            "id": 2,
            "email": "new@example.com"
        }
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/crm/contacts/bulk

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

contacts   string[]     

Array of contact updates.

*   object  optional    
id   integer     

The contact ID to update. Example: 1

first_name   string  optional    

The contact's first name. Example: Jane

last_name   string  optional    

The contact's last name. Example: Doe

email   string  optional    

The contact's email. Example: jane@example.com

phone   string  optional    

The contact's phone. Example: +1234567890

company_id   integer  optional    

The company ID. Example: 1

notes   string  optional    

Notes about the contact. Example: Updated client

Bulk delete contacts.

requires authentication

Example request:
curl --request DELETE \
    "http://localhost/api/v1/api/v1/crm/contacts/bulk" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"ids\": [
        1,
        2,
        3
    ]
}"
const url = new URL(
    "http://localhost/api/v1/api/v1/crm/contacts/bulk"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": [
        1,
        2,
        3
    ]
};

fetch(url, {
    method: "DELETE",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

DELETE api/v1/crm/contacts/bulk

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

ids   string[]     

Array of contact IDs to delete.

*   integer     

The contact ID. Example: 1

CRM - Leads

Store a newly created lead.

requires authentication

Example request:
curl --request POST \
    "http://localhost/api/v1/api/v1/crm/leads" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"New Project Opportunity\",
    \"value\": \"5000.00\",
    \"status_id\": 1,
    \"source_id\": 1,
    \"company_id\": 1,
    \"assigned_to\": 1,
    \"description\": \"Potential client\"
}"
const url = new URL(
    "http://localhost/api/v1/api/v1/crm/leads"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "New Project Opportunity",
    "value": "5000.00",
    "status_id": 1,
    "source_id": 1,
    "company_id": 1,
    "assigned_to": 1,
    "description": "Potential client"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/crm/leads

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

title   string     

The lead title. Example: New Project Opportunity

value   decimal  optional    

The lead value. Example: 5000.00

status_id   integer     

The status ID. Example: 1

source_id   integer  optional    

The referral source ID. Example: 1

company_id   integer  optional    

The company ID. Example: 1

assigned_to   integer  optional    

The assigned user ID. Example: 1

description   string  optional    

The lead description. Example: Potential client

Update the specified lead.

requires authentication

Example request:
curl --request PUT \
    "http://localhost/api/v1/api/v1/crm/leads/1" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"New Project Opportunity\",
    \"value\": \"5000.00\",
    \"status_id\": 1,
    \"source_id\": 1,
    \"company_id\": 1,
    \"assigned_to\": 1,
    \"description\": \"Potential client\"
}"
const url = new URL(
    "http://localhost/api/v1/api/v1/crm/leads/1"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "New Project Opportunity",
    "value": "5000.00",
    "status_id": 1,
    "source_id": 1,
    "company_id": 1,
    "assigned_to": 1,
    "description": "Potential client"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/crm/leads/{id}

PATCH api/v1/crm/leads/{id}

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The lead ID. Example: 1

Body Parameters

title   string  optional    

The lead title. Example: New Project Opportunity

value   decimal  optional    

The lead value. Example: 5000.00

status_id   integer  optional    

The status ID. Example: 1

source_id   integer  optional    

The referral source ID. Example: 1

company_id   integer  optional    

The company ID. Example: 1

assigned_to   integer  optional    

The assigned user ID. Example: 1

description   string  optional    

The lead description. Example: Potential client

Remove the specified lead.

requires authentication

Example request:
curl --request DELETE \
    "http://localhost/api/v1/api/v1/crm/leads/1" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/api/v1/crm/leads/1"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/crm/leads/{id}

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The lead ID. Example: 1

Client Portal

Manage client portal access and configuration.

Get Portal Configuration

requires authentication

Get the current portal configuration for the authenticated tenant.

Example request:
curl --request GET \
    --get "http://localhost/api/v1/api/v1/client-portal/config" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/api/v1/client-portal/config"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "portal_name": "Client Portal",
        "primary_color": "#3B82F6",
        "enabled_modules": [
            "invoices",
            "proposals"
        ],
        "is_active": true
    }
}
 

Request      

GET api/v1/client-portal/config

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Send Portal Invitation to Contact

requires authentication

Send a portal access invitation email to a contact.

Example request:
curl --request POST \
    "http://localhost/api/v1/api/v1/client-portal/contacts/1/invite" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"custom_message\": \"\\\"Welcome to your client portal!\\\"\"
}"
const url = new URL(
    "http://localhost/api/v1/api/v1/client-portal/contacts/1/invite"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "custom_message": "\"Welcome to your client portal!\""
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "message": "Portal invitation sent successfully",
    "token": "portal-access-token-here"
}
 

Example response (404):


{
    "message": "Contact not found"
}
 

Request      

POST api/v1/client-portal/contacts/{contactId}/invite

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

contactId   string     

The ID of the contact. Example: 1

Body Parameters

custom_message   string  optional    

optional Custom message to include in the invitation email. Example: "Welcome to your client portal!"

Send Portal Invitation to Company

requires authentication

Send a portal access invitation email to a company.

Example request:
curl --request POST \
    "http://localhost/api/v1/api/v1/client-portal/companies/1/invite" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"custom_message\": \"architecto\"
}"
const url = new URL(
    "http://localhost/api/v1/api/v1/client-portal/companies/1/invite"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "custom_message": "architecto"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "message": "Portal invitation sent successfully",
    "token": "portal-access-token-here"
}
 

Request      

POST api/v1/client-portal/companies/{companyId}/invite

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

companyId   string     

The ID of the company. Example: 1

Body Parameters

custom_message   string  optional    

optional Custom message to include in the invitation email. Example: architecto

Get Portal Token

requires authentication

Get or create a portal access token for a contact or company.

Example request:
curl --request POST \
    "http://localhost/api/v1/api/v1/client-portal/token" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"contact\",
    \"id\": \"1\"
}"
const url = new URL(
    "http://localhost/api/v1/api/v1/client-portal/token"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "type": "contact",
    "id": "1"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "token": "portal-access-token-here",
    "url": "https://your-domain.com/client-portal/token-here",
    "expires_at": "2026-02-19T00:00:00Z"
}
 

Request      

POST api/v1/client-portal/token

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

type   required  optional    

string The type: "contact" or "company". Example: contact

id   required  optional    

integer The ID of the contact or company. Example: 1

Endpoints

POST api/v1/projects/projects/{project_id}/approvals

requires authentication

Example request:
curl --request POST \
    "http://localhost/api/v1/api/v1/projects/projects/16/approvals" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/api/v1/projects/projects/16/approvals"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/projects/projects/{project_id}/approvals

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

project_id   integer     

The ID of the project. Example: 16

POST api/v1/projects/projects/{project_id}/approvals/{approval_id}/approve

requires authentication

Example request:
curl --request POST \
    "http://localhost/api/v1/api/v1/projects/projects/16/approvals/16/approve" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/api/v1/projects/projects/16/approvals/16/approve"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/projects/projects/{project_id}/approvals/{approval_id}/approve

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

project_id   integer     

The ID of the project. Example: 16

approval_id   integer     

The ID of the approval. Example: 16

POST api/v1/projects/projects/{project_id}/approvals/{approval_id}/reject

requires authentication

Example request:
curl --request POST \
    "http://localhost/api/v1/api/v1/projects/projects/16/approvals/16/reject" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/api/v1/projects/projects/16/approvals/16/reject"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/projects/projects/{project_id}/approvals/{approval_id}/reject

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

project_id   integer     

The ID of the project. Example: 16

approval_id   integer     

The ID of the approval. Example: 16

POST api/v1/projects/projects/{project_id}/approvals/{approval_id}/request-changes

requires authentication

Example request:
curl --request POST \
    "http://localhost/api/v1/api/v1/projects/projects/16/approvals/16/request-changes" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/api/v1/projects/projects/16/approvals/16/request-changes"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/projects/projects/{project_id}/approvals/{approval_id}/request-changes

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

project_id   integer     

The ID of the project. Example: 16

approval_id   integer     

The ID of the approval. Example: 16

POST api/v1/projects/projects/{project_id}/revision-requests

requires authentication

Example request:
curl --request POST \
    "http://localhost/api/v1/api/v1/projects/projects/16/revision-requests" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/api/v1/projects/projects/16/revision-requests"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/projects/projects/{project_id}/revision-requests

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

project_id   integer     

The ID of the project. Example: 16

PATCH api/v1/projects/projects/{project_id}/revision-requests/{revisionRequest_id}

requires authentication

Example request:
curl --request PATCH \
    "http://localhost/api/v1/api/v1/projects/projects/16/revision-requests/16" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/api/v1/projects/projects/16/revision-requests/16"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PATCH",
    headers,
}).then(response => response.json());

Request      

PATCH api/v1/projects/projects/{project_id}/revision-requests/{revisionRequest_id}

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

project_id   integer     

The ID of the project. Example: 16

revisionRequest_id   integer     

The ID of the revisionRequest. Example: 16

POST api/v1/projects/projects/{project_id}/annotations

requires authentication

Example request:
curl --request POST \
    "http://localhost/api/v1/api/v1/projects/projects/16/annotations" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/api/v1/projects/projects/16/annotations"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/projects/projects/{project_id}/annotations

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

project_id   integer     

The ID of the project. Example: 16

Upload a screenshot for use when creating an annotation.

requires authentication

Returns the path to store in annotation.screenshot_path.

Example request:
curl --request POST \
    "http://localhost/api/v1/api/v1/projects/projects/16/annotations/upload-screenshot" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/api/v1/projects/projects/16/annotations/upload-screenshot"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/projects/projects/{project_id}/annotations/upload-screenshot

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

project_id   integer     

The ID of the project. Example: 16

PATCH api/v1/projects/projects/{project_id}/annotations/{id}

requires authentication

Example request:
curl --request PATCH \
    "http://localhost/api/v1/api/v1/projects/projects/16/annotations/16" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/api/v1/projects/projects/16/annotations/16"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PATCH",
    headers,
}).then(response => response.json());

Request      

PATCH api/v1/projects/projects/{project_id}/annotations/{id}

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

project_id   integer     

The ID of the project. Example: 16

id   integer     

The ID of the annotation. Example: 16

DELETE api/v1/projects/projects/{project_id}/annotations/{id}

requires authentication

Example request:
curl --request DELETE \
    "http://localhost/api/v1/api/v1/projects/projects/16/annotations/16" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/api/v1/projects/projects/16/annotations/16"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/projects/projects/{project_id}/annotations/{id}

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

project_id   integer     

The ID of the project. Example: 16

id   integer     

The ID of the annotation. Example: 16

POST api/v1/projects/projects/{project_id}/annotations/{annotation_id}/comments

requires authentication

Example request:
curl --request POST \
    "http://localhost/api/v1/api/v1/projects/projects/16/annotations/16/comments" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/api/v1/projects/projects/16/annotations/16/comments"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/projects/projects/{project_id}/annotations/{annotation_id}/comments

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

project_id   integer     

The ID of the project. Example: 16

annotation_id   integer     

The ID of the annotation. Example: 16

Switch user's current tenant context.

requires authentication

Example request:
curl --request POST \
    "http://localhost/api/v1/api/v1/tenant/switch/16" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/api/v1/tenant/switch/16"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/tenant/switch/{tenant_id}

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

tenant_id   integer     

The ID of the tenant. Example: 16

Register a push notification subscription

requires authentication

Example request:
curl --request POST \
    "http://localhost/api/v1/api/v1/push/subscribe" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"endpoint\": \"http:\\/\\/www.bailey.biz\\/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html\",
    \"keys\": {
        \"p256dh\": \"architecto\",
        \"auth\": \"architecto\"
    }
}"
const url = new URL(
    "http://localhost/api/v1/api/v1/push/subscribe"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "endpoint": "http:\/\/www.bailey.biz\/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html",
    "keys": {
        "p256dh": "architecto",
        "auth": "architecto"
    }
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/push/subscribe

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

endpoint   string     

Must be a valid URL. Example: http://www.bailey.biz/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html

keys   object     
p256dh   string     

Example: architecto

auth   string     

Example: architecto

Unregister a push notification subscription

requires authentication

Example request:
curl --request POST \
    "http://localhost/api/v1/api/v1/push/unsubscribe" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"token\": \"architecto\"
}"
const url = new URL(
    "http://localhost/api/v1/api/v1/push/unsubscribe"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "token": "architecto"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/push/unsubscribe

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

token   string     

Example: architecto

Resolve a connector token to a SWELL API token.

requires authentication

Called by the MCP server only (protected by X-MCP-Resolve-Secret).

Example request:
curl --request POST \
    "http://localhost/api/v1/api/mcp/resolve" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"connector_token\": \"architecto\"
}"
const url = new URL(
    "http://localhost/api/v1/api/mcp/resolve"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "connector_token": "architecto"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/mcp/resolve

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

connector_token   string     

Example: architecto

POST api/upload-image

requires authentication

Example request:
curl --request POST \
    "http://localhost/api/v1/api/upload-image" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "file=@/tmp/phposan4t04930n19QyZyU" 
const url = new URL(
    "http://localhost/api/v1/api/upload-image"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('file', document.querySelector('input[name="file"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Request      

POST api/upload-image

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

Body Parameters

file   file     

Must be an image. Must not be greater than 5120 kilobytes. Example: /tmp/phposan4t04930n19QyZyU

Generate an image using DALL-E and store it locally (URLs expire after 60 min).

requires authentication

Example request:
curl --request POST \
    "http://localhost/api/v1/api/cover-image/generate-ai" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"prompt\": \"b\"
}"
const url = new URL(
    "http://localhost/api/v1/api/cover-image/generate-ai"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "prompt": "b"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/cover-image/generate-ai

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

prompt   string     

Must be at least 1 character. Must not be greater than 1000 characters. Example: b

Finance - Estimates

Store a newly created estimate in storage.

requires authentication

Example request:
curl --request POST \
    "http://localhost/api/v1/api/v1/finance/estimates" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"contact_id\": 1,
    \"company_id\": 1,
    \"status\": \"draft\",
    \"valid_until\": \"2026-12-31\",
    \"subtotal\": \"1000.00\",
    \"tax_rate\": \"10.00\",
    \"currency\": \"USD\",
    \"notes\": \"Estimate notes\"
}"
const url = new URL(
    "http://localhost/api/v1/api/v1/finance/estimates"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "contact_id": 1,
    "company_id": 1,
    "status": "draft",
    "valid_until": "2026-12-31",
    "subtotal": "1000.00",
    "tax_rate": "10.00",
    "currency": "USD",
    "notes": "Estimate notes"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/finance/estimates

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

contact_id   integer  optional    

The contact ID. Example: 1

company_id   integer  optional    

The company ID. Example: 1

status   string  optional    

The estimate status. Example: draft

valid_until   date  optional    

The expiration date. Example: 2026-12-31

subtotal   decimal  optional    

The subtotal amount. Example: 1000.00

tax_rate   decimal  optional    

The tax rate percentage. Example: 10.00

currency   string  optional    

The currency code. Example: USD

notes   string  optional    

Additional notes. Example: Estimate notes

Update the specified estimate in storage.

requires authentication

Example request:
curl --request PUT \
    "http://localhost/api/v1/api/v1/finance/estimates/16" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/api/v1/finance/estimates/16"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request      

PUT api/v1/finance/estimates/{id}

PATCH api/v1/finance/estimates/{id}

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the estimate. Example: 16

estimate   integer     

The ID of the estimate. Example: 1

Remove the specified estimate from storage.

requires authentication

Example request:
curl --request DELETE \
    "http://localhost/api/v1/api/v1/finance/estimates/16" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/api/v1/finance/estimates/16"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/finance/estimates/{id}

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the estimate. Example: 16

estimate   integer     

The ID of the estimate to delete. Example: 1

Finance - Invoices

Store a newly created invoice.

requires authentication

Example request:
curl --request POST \
    "http://localhost/api/v1/api/v1/finance/invoices" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"invoice_number\": \"INV-001\",
    \"status\": \"draft\",
    \"invoice_date\": \"2026-01-01\",
    \"due_date\": \"2026-01-31\",
    \"contact_id\": 1,
    \"company_id\": 1,
    \"subtotal\": \"1000.00\",
    \"tax_rate\": \"10.00\",
    \"tax_total\": \"100.00\",
    \"total\": \"1100.00\",
    \"late_fee_total\": \"0.00\",
    \"currency\": \"USD\",
    \"notes\": \"Payment terms\",
    \"terms\": \"Net 30\"
}"
const url = new URL(
    "http://localhost/api/v1/api/v1/finance/invoices"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "invoice_number": "INV-001",
    "status": "draft",
    "invoice_date": "2026-01-01",
    "due_date": "2026-01-31",
    "contact_id": 1,
    "company_id": 1,
    "subtotal": "1000.00",
    "tax_rate": "10.00",
    "tax_total": "100.00",
    "total": "1100.00",
    "late_fee_total": "0.00",
    "currency": "USD",
    "notes": "Payment terms",
    "terms": "Net 30"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/finance/invoices

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

invoice_number   string  optional    

The invoice number. Example: INV-001

status   string     

The invoice status. Example: draft

invoice_date   date  optional    

The invoice date. Example: 2026-01-01

due_date   date  optional    

The due date. Example: 2026-01-31

contact_id   integer  optional    

The contact ID. Example: 1

company_id   integer  optional    

The company ID. Example: 1

subtotal   decimal  optional    

The subtotal. Example: 1000.00

tax_rate   decimal  optional    

The tax rate percentage. Example: 10.00

tax_total   decimal  optional    

The tax total. Example: 100.00

total   decimal  optional    

The total. Example: 1100.00

late_fee_total   decimal  optional    

The late fee total. Example: 0.00

currency   string  optional    

The currency code. Example: USD

notes   string  optional    

Notes. Example: Payment terms

terms   string  optional    

Terms and conditions. Example: Net 30

Update the specified invoice.

requires authentication

Example request:
curl --request PUT \
    "http://localhost/api/v1/api/v1/finance/invoices/1" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"invoice_number\": \"INV-001\",
    \"status\": \"paid\",
    \"invoice_date\": \"2026-01-01\",
    \"due_date\": \"2026-01-31\",
    \"contact_id\": 1,
    \"company_id\": 1,
    \"subtotal\": \"1000.00\",
    \"tax_rate\": \"10.00\",
    \"tax_total\": \"100.00\",
    \"total\": \"1100.00\",
    \"late_fee_total\": \"0.00\",
    \"currency\": \"USD\",
    \"notes\": \"Payment terms\",
    \"terms\": \"Net 30\"
}"
const url = new URL(
    "http://localhost/api/v1/api/v1/finance/invoices/1"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "invoice_number": "INV-001",
    "status": "paid",
    "invoice_date": "2026-01-01",
    "due_date": "2026-01-31",
    "contact_id": 1,
    "company_id": 1,
    "subtotal": "1000.00",
    "tax_rate": "10.00",
    "tax_total": "100.00",
    "total": "1100.00",
    "late_fee_total": "0.00",
    "currency": "USD",
    "notes": "Payment terms",
    "terms": "Net 30"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/finance/invoices/{id}

PATCH api/v1/finance/invoices/{id}

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The invoice ID. Example: 1

Body Parameters

invoice_number   string  optional    

The invoice number. Example: INV-001

status   string  optional    

The invoice status. Example: paid

invoice_date   date  optional    

The invoice date. Example: 2026-01-01

due_date   date  optional    

The due date. Example: 2026-01-31

contact_id   integer  optional    

The contact ID. Example: 1

company_id   integer  optional    

The company ID. Example: 1

subtotal   decimal  optional    

The subtotal. Example: 1000.00

tax_rate   decimal  optional    

The tax rate percentage. Example: 10.00

tax_total   decimal  optional    

The tax total. Example: 100.00

total   decimal  optional    

The total. Example: 1100.00

late_fee_total   decimal  optional    

The late fee total. Example: 0.00

currency   string  optional    

The currency code. Example: USD

notes   string  optional    

Notes. Example: Payment terms

terms   string  optional    

Terms and conditions. Example: Net 30

Remove the specified invoice.

requires authentication

Example request:
curl --request DELETE \
    "http://localhost/api/v1/api/v1/finance/invoices/1" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/api/v1/finance/invoices/1"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/finance/invoices/{id}

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The invoice ID. Example: 1

Forms

Store a newly created form.

requires authentication

Example request:
curl --request POST \
    "http://localhost/api/v1/api/v1/forms/forms" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Contact Form\",
    \"description\": \"Main contact form\",
    \"settings\": {
        \"theme\": \"light\",
        \"redirect_url\": \"\\/thank-you\"
    },
    \"structure\": {
        \"fields\": [],
        \"steps\": []
    }
}"
const url = new URL(
    "http://localhost/api/v1/api/v1/forms/forms"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Contact Form",
    "description": "Main contact form",
    "settings": {
        "theme": "light",
        "redirect_url": "\/thank-you"
    },
    "structure": {
        "fields": [],
        "steps": []
    }
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/forms/forms

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

The form name. Example: Contact Form

description   string  optional    

The form description. Example: Main contact form

settings   object  optional    

Form settings.

structure   object  optional    

Form structure.

Update the specified form.

requires authentication

Example request:
curl --request PUT \
    "http://localhost/api/v1/api/v1/forms/forms/1" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Updated Contact Form\",
    \"description\": \"Eius et animi quos velit et.\",
    \"settings\": [],
    \"structure\": []
}"
const url = new URL(
    "http://localhost/api/v1/api/v1/forms/forms/1"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Updated Contact Form",
    "description": "Eius et animi quos velit et.",
    "settings": [],
    "structure": []
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/forms/forms/{id}

PATCH api/v1/forms/forms/{id}

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The form ID. Example: 1

Body Parameters

name   string  optional    

The form name. Example: Updated Contact Form

description   string  optional    

The form description. Example: Eius et animi quos velit et.

settings   object  optional    

Form settings.

structure   object  optional    

Form structure.

Remove the specified form.

requires authentication

Example request:
curl --request DELETE \
    "http://localhost/api/v1/api/v1/forms/forms/1" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/api/v1/forms/forms/1"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/forms/forms/{id}

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The form ID. Example: 1

Duplicate a form.

requires authentication

Example request:
curl --request POST \
    "http://localhost/api/v1/api/v1/forms/forms/1/duplicate" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/api/v1/forms/forms/1/duplicate"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/forms/forms/{id}/duplicate

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The form ID. Example: 1

Publish a form.

requires authentication

Example request:
curl --request POST \
    "http://localhost/api/v1/api/v1/forms/forms/1/publish" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/api/v1/forms/forms/1/publish"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/forms/forms/{id}/publish

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The form ID. Example: 1

Forms - Integrations

Store a newly created form integration.

requires authentication

Example request:
curl --request POST \
    "http://localhost/api/v1/api/v1/forms/forms/16/integrations" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"create_contact\",
    \"name\": \"Create Contact\",
    \"config\": {
        \"list_ids\": [
            1,
            2
        ]
    },
    \"field_mapping\": {
        \"email\": \"email\",
        \"first_name\": \"first_name\"
    },
    \"conditions\": [],
    \"order\": 0,
    \"is_active\": true
}"
const url = new URL(
    "http://localhost/api/v1/api/v1/forms/forms/16/integrations"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "type": "create_contact",
    "name": "Create Contact",
    "config": {
        "list_ids": [
            1,
            2
        ]
    },
    "field_mapping": {
        "email": "email",
        "first_name": "first_name"
    },
    "conditions": [],
    "order": 0,
    "is_active": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/forms/forms/{form_id}/integrations

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

form_id   integer     

The ID of the form. Example: 16

id   integer     

The form ID. Example: 1

Body Parameters

type   string     

Integration type. Example: create_contact

name   string  optional    

Integration name. Example: Create Contact

config   object  optional    

Integration configuration.

field_mapping   object  optional    

Field mapping.

conditions   string[]  optional    

Conditional execution rules.

order   integer  optional    

Execution order. Example: 0

is_active   boolean  optional    

Whether integration is active. Example: true

Update the specified form integration.

requires authentication

Example request:
curl --request PUT \
    "http://localhost/api/v1/api/v1/forms/forms/16/integrations/1" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Updated Integration\",
    \"config\": [],
    \"field_mapping\": [],
    \"conditions\": [
        \"architecto\"
    ],
    \"order\": 16,
    \"is_active\": false
}"
const url = new URL(
    "http://localhost/api/v1/api/v1/forms/forms/16/integrations/1"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Updated Integration",
    "config": [],
    "field_mapping": [],
    "conditions": [
        "architecto"
    ],
    "order": 16,
    "is_active": false
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/forms/forms/{form_id}/integrations/{id}

PATCH api/v1/forms/forms/{form_id}/integrations/{id}

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

form_id   integer     

The ID of the form. Example: 16

id   integer     

The form ID. Example: 1

integrationId   integer     

The integration ID. Example: 1

Body Parameters

name   string  optional    

Integration name. Example: Updated Integration

config   object  optional    

Integration configuration.

field_mapping   object  optional    

Field mapping.

conditions   string[]  optional    

Conditional execution rules.

order   integer  optional    

Execution order. Example: 16

is_active   boolean  optional    

Whether integration is active. Example: false

Remove the specified form integration.

requires authentication

Example request:
curl --request DELETE \
    "http://localhost/api/v1/api/v1/forms/forms/16/integrations/1" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/api/v1/forms/forms/16/integrations/1"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/forms/forms/{form_id}/integrations/{id}

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

form_id   integer     

The ID of the form. Example: 16

id   integer     

The form ID. Example: 1

integrationId   integer     

The integration ID. Example: 1

Forms - Public

Submit a form (public endpoint).

requires authentication

Example request:
curl --request POST \
    "http://localhost/api/v1/api/v1/public/forms/contact-form/submit" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"data\": {
        \"name\": \"John Doe\",
        \"email\": \"john@example.com\"
    },
    \"started_at\": \"2026-01-21T10:00:00Z\"
}"
const url = new URL(
    "http://localhost/api/v1/api/v1/public/forms/contact-form/submit"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "data": {
        "name": "John Doe",
        "email": "john@example.com"
    },
    "started_at": "2026-01-21T10:00:00Z"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/public/forms/{slug}/submit

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

slug   string     

The form slug. Example: contact-form

Body Parameters

data   object     

Form field data.

started_at   string  optional    

ISO 8601 datetime when form was started. Example: 2026-01-21T10:00:00Z

Products

Store a newly created product in storage.

requires authentication

Example request:
curl --request POST \
    "http://localhost/api/v1/api/v1/products/products" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Premium Plan\",
    \"description\": \"Premium subscription plan\",
    \"price\": \"99.00\",
    \"billing_frequency\": \"monthly\"
}"
const url = new URL(
    "http://localhost/api/v1/api/v1/products/products"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Premium Plan",
    "description": "Premium subscription plan",
    "price": "99.00",
    "billing_frequency": "monthly"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/products/products

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

The product name. Example: Premium Plan

description   string  optional    

The product description. Example: Premium subscription plan

price   decimal     

The product price. Example: 99.00

billing_frequency   string  optional    

The billing frequency. Example: monthly

Update the specified product in storage.

requires authentication

Example request:
curl --request PUT \
    "http://localhost/api/v1/api/v1/products/products/16" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/api/v1/products/products/16"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request      

PUT api/v1/products/products/{id}

PATCH api/v1/products/products/{id}

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the product. Example: 16

product   integer     

The ID of the product. Example: 1

Remove the specified product from storage.

requires authentication

Example request:
curl --request DELETE \
    "http://localhost/api/v1/api/v1/products/products/16" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/api/v1/products/products/16"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/products/products/{id}

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the product. Example: 16

product   integer     

The ID of the product to delete. Example: 1

Projects

Store a newly created project.

requires authentication

Example request:
curl --request POST \
    "http://localhost/api/v1/api/v1/projects/projects" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Website Redesign\",
    \"description\": \"Complete redesign of company website\",
    \"status\": \"active\",
    \"color\": \"#3B82F6\",
    \"icon\": \"📱\",
    \"start_date\": \"2026-01-01\",
    \"due_date\": \"2026-12-31\",
    \"contact_id\": 1,
    \"company_id\": 1,
    \"manager_id\": 1,
    \"budget_hours\": \"100.00\"
}"
const url = new URL(
    "http://localhost/api/v1/api/v1/projects/projects"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Website Redesign",
    "description": "Complete redesign of company website",
    "status": "active",
    "color": "#3B82F6",
    "icon": "📱",
    "start_date": "2026-01-01",
    "due_date": "2026-12-31",
    "contact_id": 1,
    "company_id": 1,
    "manager_id": 1,
    "budget_hours": "100.00"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/projects/projects

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

The project name. Example: Website Redesign

description   string  optional    

The project description. Example: Complete redesign of company website

status   string  optional    

The project status. Example: active

color   string  optional    

The project color. Example: #3B82F6

icon   string  optional    

The project icon. Example: 📱

start_date   date  optional    

The project start date. Example: 2026-01-01

due_date   date  optional    

The project due date. Example: 2026-12-31

contact_id   integer  optional    

The contact ID. Example: 1

company_id   integer  optional    

The company ID. Example: 1

manager_id   integer  optional    

The manager user ID. Example: 1

budget_hours   decimal  optional    

The budget hours. Example: 100.00

Update the specified project.

requires authentication

Example request:
curl --request PUT \
    "http://localhost/api/v1/api/v1/projects/projects/1" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Website Redesign\",
    \"description\": \"Complete redesign\",
    \"status\": \"completed\",
    \"color\": \"#10B981\",
    \"icon\": \"✅\",
    \"start_date\": \"2026-01-01\",
    \"due_date\": \"2026-12-31\",
    \"contact_id\": 1,
    \"company_id\": 1,
    \"manager_id\": 1,
    \"budget_hours\": \"120.00\"
}"
const url = new URL(
    "http://localhost/api/v1/api/v1/projects/projects/1"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Website Redesign",
    "description": "Complete redesign",
    "status": "completed",
    "color": "#10B981",
    "icon": "✅",
    "start_date": "2026-01-01",
    "due_date": "2026-12-31",
    "contact_id": 1,
    "company_id": 1,
    "manager_id": 1,
    "budget_hours": "120.00"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/projects/projects/{id}

PATCH api/v1/projects/projects/{id}

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The project ID. Example: 1

Body Parameters

name   string  optional    

The project name. Example: Website Redesign

description   string  optional    

The project description. Example: Complete redesign

status   string  optional    

The project status. Example: completed

color   string  optional    

The project color. Example: #10B981

icon   string  optional    

The project icon. Example:

start_date   date  optional    

The project start date. Example: 2026-01-01

due_date   date  optional    

The project due date. Example: 2026-12-31

contact_id   integer  optional    

The contact ID. Example: 1

company_id   integer  optional    

The company ID. Example: 1

manager_id   integer  optional    

The manager user ID. Example: 1

budget_hours   decimal  optional    

The budget hours. Example: 120.00

Remove the specified project.

requires authentication

Example request:
curl --request DELETE \
    "http://localhost/api/v1/api/v1/projects/projects/1" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/api/v1/projects/projects/1"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/projects/projects/{id}

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The project ID. Example: 1

Projects - Tasks

Store a newly created task.

requires authentication

Example request:
curl --request POST \
    "http://localhost/api/v1/api/v1/projects/tasks" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"Design homepage\",
    \"description\": \"Create modern homepage design\",
    \"project_id\": 1,
    \"section_id\": 1,
    \"parent_id\": 1,
    \"status_id\": 1,
    \"priority\": \"high\",
    \"assigned_to\": 1,
    \"due_date\": \"2026-01-15\",
    \"start_date\": \"2026-01-01\",
    \"estimated_hours\": \"8.00\"
}"
const url = new URL(
    "http://localhost/api/v1/api/v1/projects/tasks"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "Design homepage",
    "description": "Create modern homepage design",
    "project_id": 1,
    "section_id": 1,
    "parent_id": 1,
    "status_id": 1,
    "priority": "high",
    "assigned_to": 1,
    "due_date": "2026-01-15",
    "start_date": "2026-01-01",
    "estimated_hours": "8.00"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/projects/tasks

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

title   string     

The task title. Example: Design homepage

description   string  optional    

The task description. Example: Create modern homepage design

project_id   integer     

The project ID. Example: 1

section_id   integer  optional    

The section/task list ID. Example: 1

parent_id   integer  optional    

The parent task ID (for subtasks). Example: 1

status_id   integer     

The status ID. Example: 1

priority   string  optional    

The priority. Example: high

assigned_to   integer  optional    

The assigned user ID. Example: 1

due_date   date  optional    

The due date. Example: 2026-01-15

start_date   date  optional    

The start date. Example: 2026-01-01

estimated_hours   decimal  optional    

The estimated hours. Example: 8.00

Update the specified task.

requires authentication

Example request:
curl --request PUT \
    "http://localhost/api/v1/api/v1/projects/tasks/1" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"Design homepage\",
    \"description\": \"Create modern homepage design\",
    \"project_id\": 1,
    \"section_id\": 1,
    \"parent_id\": 1,
    \"status_id\": 1,
    \"priority\": \"high\",
    \"assigned_to\": 1,
    \"due_date\": \"2026-01-15\",
    \"start_date\": \"2026-01-01\",
    \"estimated_hours\": \"8.00\"
}"
const url = new URL(
    "http://localhost/api/v1/api/v1/projects/tasks/1"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "Design homepage",
    "description": "Create modern homepage design",
    "project_id": 1,
    "section_id": 1,
    "parent_id": 1,
    "status_id": 1,
    "priority": "high",
    "assigned_to": 1,
    "due_date": "2026-01-15",
    "start_date": "2026-01-01",
    "estimated_hours": "8.00"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/projects/tasks/{id}

PATCH api/v1/projects/tasks/{id}

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The task ID. Example: 1

Body Parameters

title   string  optional    

The task title. Example: Design homepage

description   string  optional    

The task description. Example: Create modern homepage design

project_id   integer  optional    

The project ID. Example: 1

section_id   integer  optional    

The section/task list ID. Example: 1

parent_id   integer  optional    

The parent task ID. Example: 1

status_id   integer  optional    

The status ID. Example: 1

priority   string  optional    

The priority. Example: high

assigned_to   integer  optional    

The assigned user ID. Example: 1

due_date   date  optional    

The due date. Example: 2026-01-15

start_date   date  optional    

The start date. Example: 2026-01-01

estimated_hours   decimal  optional    

The estimated hours. Example: 8.00

Remove the specified task.

requires authentication

Example request:
curl --request DELETE \
    "http://localhost/api/v1/api/v1/projects/tasks/1" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/api/v1/projects/tasks/1"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/projects/tasks/{id}

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The task ID. Example: 1

Proposals

Store a newly created proposal in storage.

requires authentication

Example request:
curl --request POST \
    "http://localhost/api/v1/api/v1/proposals/proposals" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"Website Redesign Proposal\",
    \"contact_id\": 1,
    \"company_id\": 1,
    \"lead_id\": 1,
    \"content\": \"<p>Proposal content<\\/p>\",
    \"status\": \"draft\",
    \"expires_at\": \"2026-12-31\",
    \"subtotal\": \"1000.00\",
    \"tax_rate\": \"10.00\",
    \"currency\": \"USD\"
}"
const url = new URL(
    "http://localhost/api/v1/api/v1/proposals/proposals"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "Website Redesign Proposal",
    "contact_id": 1,
    "company_id": 1,
    "lead_id": 1,
    "content": "<p>Proposal content<\/p>",
    "status": "draft",
    "expires_at": "2026-12-31",
    "subtotal": "1000.00",
    "tax_rate": "10.00",
    "currency": "USD"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/proposals/proposals

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

title   string     

The proposal title. Example: Website Redesign Proposal

contact_id   integer  optional    

The contact ID. Example: 1

company_id   integer  optional    

The company ID. Example: 1

lead_id   integer  optional    

The lead ID. Example: 1

content   string  optional    

The proposal content (HTML). Example: <p>Proposal content</p>

status   string  optional    

The proposal status. Example: draft

expires_at   date  optional    

The expiration date. Example: 2026-12-31

subtotal   decimal  optional    

The subtotal amount. Example: 1000.00

tax_rate   decimal  optional    

The tax rate percentage. Example: 10.00

currency   string  optional    

The currency code. Example: USD

Update the specified proposal in storage.

requires authentication

Example request:
curl --request PUT \
    "http://localhost/api/v1/api/v1/proposals/proposals/16" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"Updated Proposal Title\",
    \"status\": \"sent\",
    \"content\": \"<p>Updated content<\\/p>\"
}"
const url = new URL(
    "http://localhost/api/v1/api/v1/proposals/proposals/16"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "Updated Proposal Title",
    "status": "sent",
    "content": "<p>Updated content<\/p>"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/proposals/proposals/{id}

PATCH api/v1/proposals/proposals/{id}

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the proposal. Example: 16

proposal   integer     

The ID of the proposal. Example: 1

Body Parameters

title   string  optional    

The proposal title. Example: Updated Proposal Title

status   string  optional    

The proposal status. Example: sent

content   string  optional    

The proposal content. Example: <p>Updated content</p>

Remove the specified proposal from storage.

requires authentication

Example request:
curl --request DELETE \
    "http://localhost/api/v1/api/v1/proposals/proposals/16" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/api/v1/proposals/proposals/16"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/proposals/proposals/{id}

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the proposal. Example: 16

proposal   integer     

The ID of the proposal to delete. Example: 1

Support - Tickets

Store a newly created ticket.

requires authentication

Example request:
curl --request POST \
    "http://localhost/api/v1/api/v1/support/tickets" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"subject\": \"Payment issue\",
    \"inbox_id\": 1,
    \"priority\": \"normal\",
    \"customer_type\": \"Contact\",
    \"customer_id\": 10,
    \"assigned_to\": 5,
    \"tags\": [
        \"billing\",
        \"urgent\"
    ],
    \"message\": \"I\'m having trouble with payment\"
}"
const url = new URL(
    "http://localhost/api/v1/api/v1/support/tickets"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "subject": "Payment issue",
    "inbox_id": 1,
    "priority": "normal",
    "customer_type": "Contact",
    "customer_id": 10,
    "assigned_to": 5,
    "tags": [
        "billing",
        "urgent"
    ],
    "message": "I'm having trouble with payment"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/support/tickets

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

subject   string     

The ticket subject. Example: Payment issue

inbox_id   integer     

The inbox ID. Example: 1

priority   string  optional    

The priority level. Example: normal

customer_type   string  optional    

The customer type (Contact or Company). Example: Contact

customer_id   integer  optional    

The customer ID. Example: 10

assigned_to   integer  optional    

The assignee user ID. Example: 5

tags   string[]  optional    

Array of tag strings.

message   string     

The initial message body. Example: I'm having trouble with payment

Update the specified ticket.

requires authentication

Example request:
curl --request PUT \
    "http://localhost/api/v1/api/v1/support/tickets/1" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"subject\": \"Updated subject\",
    \"status\": \"open\",
    \"priority\": \"high\",
    \"assigned_to\": 5,
    \"tags\": [
        \"resolved\"
    ]
}"
const url = new URL(
    "http://localhost/api/v1/api/v1/support/tickets/1"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "subject": "Updated subject",
    "status": "open",
    "priority": "high",
    "assigned_to": 5,
    "tags": [
        "resolved"
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/support/tickets/{id}

PATCH api/v1/support/tickets/{id}

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ticket ID. Example: 1

Body Parameters

subject   string  optional    

The ticket subject. Example: Updated subject

status   string  optional    

The status. Example: open

priority   string  optional    

The priority level. Example: high

assigned_to   integer  optional    

The assignee user ID. Example: 5

tags   string[]  optional    

Array of tag strings.

Remove the specified ticket.

requires authentication

Example request:
curl --request DELETE \
    "http://localhost/api/v1/api/v1/support/tickets/1" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/api/v1/support/tickets/1"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/support/tickets/{id}

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ticket ID. Example: 1

Templates

Store a newly created template in storage.

requires authentication

Example request:
curl --request POST \
    "http://localhost/api/v1/api/v1/templates/templates" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Standard Proposal Template\",
    \"description\": \"A standard proposal template\",
    \"type\": \"proposal\",
    \"level\": \"full\",
    \"template_data\": {
        \"content\": \"...\"
    },
    \"is_public\": false,
    \"price\": \"0.00\"
}"
const url = new URL(
    "http://localhost/api/v1/api/v1/templates/templates"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Standard Proposal Template",
    "description": "A standard proposal template",
    "type": "proposal",
    "level": "full",
    "template_data": {
        "content": "..."
    },
    "is_public": false,
    "price": "0.00"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/templates/templates

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

The template name. Example: Standard Proposal Template

description   string  optional    

The template description. Example: A standard proposal template

type   string     

The template type. Example: proposal

level   string  optional    

The template level. Example: full

template_data   object  optional    

The template data (JSON object).

is_public   boolean  optional    

Whether the template is public. Example: false

price   decimal  optional    

The template price. Example: 0.00

Update the specified template in storage.

requires authentication

Example request:
curl --request PUT \
    "http://localhost/api/v1/api/v1/templates/templates/16" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Updated Template Name\",
    \"description\": \"Updated description\"
}"
const url = new URL(
    "http://localhost/api/v1/api/v1/templates/templates/16"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Updated Template Name",
    "description": "Updated description"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/templates/templates/{id}

PATCH api/v1/templates/templates/{id}

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the template. Example: 16

template   integer     

The ID of the template. Example: 1

Body Parameters

name   string  optional    

The template name. Example: Updated Template Name

description   string  optional    

The template description. Example: Updated description

Remove the specified template from storage.

requires authentication

Example request:
curl --request DELETE \
    "http://localhost/api/v1/api/v1/templates/templates/16" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/api/v1/templates/templates/16"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/templates/templates/{id}

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the template. Example: 16

template   integer     

The ID of the template to delete. Example: 1

Tenant

Update the current tenant.

requires authentication

Example request:
curl --request PUT \
    "http://localhost/api/v1/api/v1/tenant/current" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Acme Corp\",
    \"domain\": \"acme\",
    \"is_active\": true
}"
const url = new URL(
    "http://localhost/api/v1/api/v1/tenant/current"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Acme Corp",
    "domain": "acme",
    "is_active": true
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/tenant/current

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string  optional    

The tenant name. Example: Acme Corp

domain   string  optional    

The tenant domain. Example: acme

is_active   boolean  optional    

Whether the tenant is active. Example: true

Webhooks

Store a newly created webhook subscription.

requires authentication

Example request:
curl --request POST \
    "http://localhost/api/v1/api/v1/webhooks/subscriptions" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"My Integration\",
    \"url\": \"https:\\/\\/example.com\\/webhook\",
    \"events\": [
        \"contact.created\",
        \"contact.updated\"
    ],
    \"headers\": {
        \"X-Custom-Header\": \"value\"
    },
    \"max_retries\": 3,
    \"timeout\": 30
}"
const url = new URL(
    "http://localhost/api/v1/api/v1/webhooks/subscriptions"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "My Integration",
    "url": "https:\/\/example.com\/webhook",
    "events": [
        "contact.created",
        "contact.updated"
    ],
    "headers": {
        "X-Custom-Header": "value"
    },
    "max_retries": 3,
    "timeout": 30
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/webhooks/subscriptions

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

The webhook name. Example: My Integration

url   string     

The webhook URL. Example: https://example.com/webhook

events   string[]     

Array of event types.

headers   object  optional    

Custom headers to send.

max_retries   integer  optional    

Maximum retry attempts. Example: 3

timeout   integer  optional    

Request timeout in seconds. Example: 30

Update the specified webhook subscription.

requires authentication

Example request:
curl --request PUT \
    "http://localhost/api/v1/api/v1/webhooks/subscriptions/1" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"My Integration\",
    \"url\": \"https:\\/\\/example.com\\/webhook\",
    \"events\": [
        \"contact.created\"
    ],
    \"is_active\": true,
    \"headers\": {
        \"X-Custom\": \"value\"
    },
    \"max_retries\": 3,
    \"timeout\": 30
}"
const url = new URL(
    "http://localhost/api/v1/api/v1/webhooks/subscriptions/1"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "My Integration",
    "url": "https:\/\/example.com\/webhook",
    "events": [
        "contact.created"
    ],
    "is_active": true,
    "headers": {
        "X-Custom": "value"
    },
    "max_retries": 3,
    "timeout": 30
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/webhooks/subscriptions/{id}

PATCH api/v1/webhooks/subscriptions/{id}

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The webhook subscription ID. Example: 1

Body Parameters

name   string  optional    

The webhook name. Example: My Integration

url   string  optional    

The webhook URL. Example: https://example.com/webhook

events   string[]  optional    

Array of event types.

is_active   boolean  optional    

Whether the webhook is active. Example: true

headers   object  optional    

Custom headers.

max_retries   integer  optional    

Maximum retry attempts. Example: 3

timeout   integer  optional    

Request timeout. Example: 30

Remove the specified webhook subscription.

requires authentication

Example request:
curl --request DELETE \
    "http://localhost/api/v1/api/v1/webhooks/subscriptions/1" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/api/v1/webhooks/subscriptions/1"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/webhooks/subscriptions/{id}

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The webhook subscription ID. Example: 1

Regenerate the webhook secret.

requires authentication

Example request:
curl --request POST \
    "http://localhost/api/v1/api/v1/webhooks/subscriptions/1/regenerate-secret" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/api/v1/webhooks/subscriptions/1/regenerate-secret"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/webhooks/subscriptions/{id}/regenerate-secret

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The webhook subscription ID. Example: 1

Workspace

Create a page from template.

requires authentication

Example request:
curl --request POST \
    "http://localhost/api/v1/api/v1/workspace/pages" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"template_key\": \"meeting_notes\",
    \"parent_id\": null
}"
const url = new URL(
    "http://localhost/api/v1/api/v1/workspace/pages"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "template_key": "meeting_notes",
    "parent_id": null
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/workspace/pages

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

template_key   string     

Template key (blank, meeting_notes, project_brief, etc.). Example: meeting_notes

parent_id   integer  optional    

Parent page/folder ID.

Move a table row to a different group (board view).

requires authentication

Example request:
curl --request POST \
    "http://localhost/api/v1/api/v1/workspace/table/move-row" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"block_id\": 1,
    \"row_index\": 1,
    \"new_group_value\": \"Done\"
}"
const url = new URL(
    "http://localhost/api/v1/api/v1/workspace/table/move-row"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "block_id": 1,
    "row_index": 1,
    "new_group_value": "Done"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/workspace/table/move-row

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

block_id   integer     

Table block ID. Example: 1

row_index   integer     

Row index (0-based). Example: 1

new_group_value   string     

New group/column value. Example: Done

Update a page or block.

requires authentication

Example request:
curl --request PATCH \
    "http://localhost/api/v1/api/v1/workspace/pages/16" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/api/v1/workspace/pages/16"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PATCH",
    headers,
}).then(response => response.json());

Request      

PATCH api/v1/workspace/pages/{block_id}

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

block_id   integer     

The ID of the block. Example: 16

Restore a version.

requires authentication

Example request:
curl --request POST \
    "http://localhost/api/v1/api/v1/workspace/pages/16/versions/architecto" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/api/v1/workspace/pages/16/versions/architecto"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/workspace/pages/{block_id}/versions/{versionId}

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

block_id   integer     

The ID of the block. Example: 16

versionId   string     

Example: architecto

Add a comment.

requires authentication

Example request:
curl --request POST \
    "http://localhost/api/v1/api/v1/workspace/pages/16/comments" \
    --header "Authorization: Bearer Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/api/v1/workspace/pages/16/comments"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/workspace/pages/{block_id}/comments

Headers

Authorization        

Example: Bearer Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

block_id   integer     

The ID of the block. Example: 16