Skip to content

Welcome to Aiwyn API

The Aiwyn API provides programmatic access to our comprehensive suite of financial automation tools. Build powerful integrations and automate your accounting workflows with our RESTful APIs.

Key Features

  • 🔐 Secure Authentication - Industry-standard OAuth 2.0 and API key authentication
  • 📊 Real-time Data - Access up-to-date financial information
  • 🚀 High Performance - Low latency, high throughput API infrastructure
  • 📚 Comprehensive Coverage - Full access to clients, engagements, expenses, and more
  • 🛠️ Developer-Friendly - Extensive documentation, SDKs, and code examples

API Versioning

We use URL versioning for our APIs. The current version is v1. All endpoints are prefixed with the version number.

Testing Enviornments

  • Sandbox runs the latest development branch.
  • Staging mirrors production behavior and stability.
Download OpenAPI description
Overview
Languages
Servers
Mock server
https://api.doc.aiwyn.ai/_mock/bundle
Sandbox
https://demo.api.aiwyn.ai
Staging
https://staging.api.aiwyn.app

🔐 Authentication

Authentication endpoints for obtaining access tokens and managing API keys.

Operations

👤 Client

Manage client records, profiles, and related operations.

Operations

📇 Contact

Manage contact information and relationships for clients.

Operations

🧩 Client Business Entity

Manage client business entities used for client categorization and structure.

Operations

🔗 Contact Client

Manage contact ↔ client relationship records.

Operations

🪪 Contact Info

Manage contact information records (address, email, phone, etc.).

Operations

🏢 Department

Manage departments and organizational units.

Operations

🏭 Industry

Manage industry classifications.

Operations
Operations

🧩 Job Template

Manage job templates.

Operations

🏬 Office

Manage office locations.

Operations
Operations

🧷 Service Line

Manage service line classifications.

Operations

🧑‍💼 Staff

Manage staff accounts, roles, and permissions.

Operations

💳 Payments

Handle incoming and outgoing payments.

Operations

🧾 Billing

Manage billing cycles, statements, and billing configurations.

Operations

📄 Invoices

Create, send, and manage invoices.

Operations

📋 Projects

Handle engagements, projects, and workflow tracking.

Operations

⏱ Time

Track and manage billable and non-billable time entries.

Operations

✉️ Engagement

Create, send, and track engagement.

Operations

🛤 Last Mile

Handle the final delivery stage and client closing processes.

🗃️ Records

Create, update, and manage entity records across standard and custom record types.

The Records API provides:

  • Record Operations - Create, update, and delete records for any entity type
  • Schema Discovery - Query available entity types and their field definitions
  • Custom Record Types - Define and manage custom record type schemas
Operations

Request

Create or update records (upsert)

Records are created if they don't exist, or updated if matched by systemRef.

Partial Success Behavior:

  • Each record is processed independently
  • Successful records are persisted even if others fail
  • Check summary.failed and individual records[].status for failures
  • Failed records include error details in records[].error

Limits: Maximum 100 records per request.

Business Applications:

  • Bulk record import
  • Entity synchronization

Real Example:

curl --location 'https://{{host}}/api/v1/records' \
--header 'Authorization: bearer {{token}}' \
--header 'Content-Type: application/json' \
--data '{
  "records": example value
}'
Security
BearerAuth
Bodyapplication/jsonrequired
recordsArray of objectsrequired

Records

records[].​typestring

Type

records[].​systemRefobject or null

Systemref

records[].​attributesobject

Attributes

curl -i -X POST \
  https://api.doc.aiwyn.ai/_mock/bundle/api/v1/records \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "records": [
      {
        "type": "string",
        "systemRef": {},
        "attributes": {}
      }
    ]
  }'

Responses

Records created successfully

Bodyapplication/json
dataobject
errorobject or null
metaobject
Response
application/json
{ "data": { "summary": {}, "records": [] }, "error": {}, "meta": { "success": true, "message": "string", "timestamp": "2019-08-24T14:15:22Z", "version": "string" } }

Update records (fails if not found)

Request

Update existing records only

Only updates existing records. Returns error if record not found by systemRef. The systemRef field is required for all records in PUT requests.

Partial Success Behavior:

  • Each record is processed independently
  • Successful records are persisted even if others fail
  • Records not found will have status FAILED with error code RECORD_NOT_FOUND
  • Check summary.failed and individual records[].status for failures

Limits: Maximum 100 records per request.

Business Applications:

  • Strict update workflows
  • Guaranteed existence updates

Real Example:

curl --location 'https://{{host}}/api/v1/records' \
--header 'Authorization: bearer {{token}}' \
--header 'Content-Type: application/json' \
--data '{
  "records": example value
}'
Security
BearerAuth
Bodyapplication/jsonrequired
recordsArray of objectsrequired

Records

records[].​typestring

Type

records[].​systemRefobject or null

Systemref

records[].​attributesobject

Attributes

curl -i -X PUT \
  https://api.doc.aiwyn.ai/_mock/bundle/api/v1/records \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "records": [
      {
        "type": "string",
        "systemRef": {},
        "attributes": {}
      }
    ]
  }'

Responses

Records updated successfully

Bodyapplication/json
dataobject
errorobject or null
metaobject
Response
application/json
{ "data": { "summary": {}, "records": [] }, "error": {}, "meta": { "success": true, "message": "string", "timestamp": "2019-08-24T14:15:22Z", "version": "string" } }

Request

Delete (inactivate) records

Soft-deletes records by marking them as inactive. Returns error if record not found. The systemRef field is required for all records in DELETE requests.

Partial Success Behavior:

  • Each record is processed independently
  • Successful deletions are persisted even if others fail
  • Records not found will have status FAILED with error code RECORD_NOT_FOUND
  • Check summary.failed and individual records[].status for failures

Limits: Maximum 100 records per request.

Business Applications:

  • Bulk inactivation
  • Record cleanup
Security
BearerAuth
Bodyapplication/jsonrequired
recordsArray of objectsrequired

Records

records[].​typestring

Type

records[].​systemRefobject

Systemref

curl -i -X DELETE \
  https://api.doc.aiwyn.ai/_mock/bundle/api/v1/records \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "records": [
      {
        "type": "string",
        "systemRef": {}
      }
    ]
  }'

Responses

Records deleted successfully - No content returned

Request

List available record types

Returns record types that can be managed via this API, with schema URLs.

Business Applications:

  • Discover record types
Security
BearerAuth
curl -i -X GET \
  https://api.doc.aiwyn.ai/_mock/bundle/api/v1/records/types \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Records updated successfully

Bodyapplication/json
dataobject
errorobject or null
metaobject
Response
application/json
{ "data": { "entityTypes": [] }, "error": {}, "meta": { "success": true, "message": "string", "timestamp": "2019-08-24T14:15:22Z", "version": "string" } }

Get field schema for a record type

Request

Get field schema for a record type

Returns field definitions including types, validation, and foreign key relationships.

Business Applications:

  • Dynamic form generation
  • Field validation
  • Integration mapping
Security
BearerAuth
curl -i -X GET \
  'https://api.doc.aiwyn.ai/_mock/bundle/api/v1/records/schema/{type}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Records updated successfully

Bodyapplication/json
dataobject
errorobject or null
metaobject
Response
application/json
{ "data": { "entityType": "string", "fields": [] }, "error": {}, "meta": { "success": true, "message": "string", "timestamp": "2019-08-24T14:15:22Z", "version": "string" } }

Request

List all custom record types

Returns all custom record type definitions for the tenant. Use includeInactive=true to include deactivated record types.

Business Applications:

  • Discover custom record types
  • Integration configuration
Security
BearerAuth
curl -i -X GET \
  https://api.doc.aiwyn.ai/_mock/bundle/api/v1/records/custom \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Records updated successfully

Bodyapplication/json
object
Response
application/json
{}

Request

Create a new custom record type

Creates a new custom record type with the specified field schema. The record type name must be unique and follow naming conventions.

Business Applications:

  • Define custom data structures
  • Extend system capabilities

Real Example:

curl --location 'https://{{host}}/api/v1/records/custom' \
--header 'Authorization: bearer {{token}}' \
--header 'Content-Type: application/json' \
--data '{
  "name": "Example Name",
  "displayName": "Example Name",
  "description": "example value"
}'
Security
BearerAuth
Bodyapplication/jsonrequired
namestringrequired

Name

displayNamestring or null

Displayname

descriptionstring or null

Description

fieldsArray of objectsrequired

Fields

fields[].​namestring

Name

fields[].​displayNamestring or null

Displayname

fields[].​typestring

Type

fields[].​requiredboolean

Required

fields[].​nullableboolean

Nullable

fields[].​descriptionstring or null

Description

fields[].​referencedEntityTypestring or null

Referencedentitytype

fields[].​rankinteger or null(int32)

Rank

curl -i -X POST \
  https://api.doc.aiwyn.ai/_mock/bundle/api/v1/records/custom \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "string",
    "displayName": "string",
    "description": "string",
    "fields": [
      {
        "name": "string",
        "displayName": "string",
        "type": "string",
        "required": true,
        "nullable": true,
        "description": "string",
        "referencedEntityType": "string",
        "rank": 0
      }
    ]
  }'

Responses

Records created successfully

Bodyapplication/json
dataobject
errorobject or null
metaobject
Response
application/json
{ "data": { "id": 0, "name": "string", "displayName": "string", "description": "string", "isCustom": true, "active": true, "fields": [], "recordsUrl": "string", "schemaUrl": "string" }, "error": {}, "meta": { "success": true, "message": "string", "timestamp": "2019-08-24T14:15:22Z", "version": "string" } }

Request

Get a custom record type by name

Returns the full definition of a custom record type including its field schema.

Business Applications:

  • View record type schema
  • Integration setup
Security
BearerAuth
curl -i -X GET \
  'https://api.doc.aiwyn.ai/_mock/bundle/api/v1/records/custom/{name}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Records updated successfully

Bodyapplication/json
dataobject
errorobject or null
metaobject
Response
application/json
{ "data": { "id": 0, "name": "string", "displayName": "string", "description": "string", "isCustom": true, "active": true, "fields": [], "recordsUrl": "string", "schemaUrl": "string" }, "error": {}, "meta": { "success": true, "message": "string", "timestamp": "2019-08-24T14:15:22Z", "version": "string" } }

Request

Update a custom record type

Updates an existing custom record type. Only provided fields will be updated. Note: Changing fields may affect existing data.

Business Applications:

  • Modify record type definitions
  • Add new fields

Real Example:

curl --location 'https://{{host}}/api/v1/records/custom/{name}' \
--header 'Authorization: bearer {{token}}' \
--header 'Content-Type: application/json' \
--data '{
  "displayName": "Example Name",
  "description": "example value",
  "fields": example value
}'
Security
BearerAuth
Bodyapplication/jsonrequired
displayNamestring or null

Displayname

descriptionstring or null

Description

fieldsArray of objects or null

Fields

activeboolean or null

Active

curl -i -X PUT \
  'https://api.doc.aiwyn.ai/_mock/bundle/api/v1/records/custom/{name}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "displayName": "string",
    "description": "string",
    "fields": [
      {
        "name": "string",
        "displayName": "string",
        "type": "string",
        "required": true,
        "nullable": true,
        "description": "string",
        "referencedEntityType": "string",
        "rank": 0
      }
    ],
    "active": true
  }'

Responses

Records updated successfully

Bodyapplication/json
dataobject
errorobject or null
metaobject
Response
application/json
{ "data": { "id": 0, "name": "string", "displayName": "string", "description": "string", "isCustom": true, "active": true, "fields": [], "recordsUrl": "string", "schemaUrl": "string" }, "error": {}, "meta": { "success": true, "message": "string", "timestamp": "2019-08-24T14:15:22Z", "version": "string" } }

Request

Deactivate a custom record type

Soft-deletes a custom record type by marking it as inactive. Existing data is preserved but the type will no longer appear in lists.

Business Applications:

  • Remove custom record types
  • Clean up unused definitions
Security
BearerAuth
curl -i -X DELETE \
  'https://api.doc.aiwyn.ai/_mock/bundle/api/v1/records/custom/{name}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Records deleted successfully - No content returned

🔔 Event Subscriptions

Create and manage webhook subscriptions for entity events.

The Event Subscriptions API provides:

  • Webhook Management - Create, update, and deactivate webhook subscriptions
  • Event Filtering - Subscribe to specific entity types and operations (CREATE, UPDATE, DELETE)
  • Security - Retrieve webhook signing secrets for payload verification
Operations

📁 File

Download and access files associated with records and documents.

Operations