Skip to content

Aiwyn API (1.0.0)

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.

Download OpenAPI description
Overview
Languages
Servers
Mock server
https://api.doc.aiwyn.ai/_mock/bundle/
Staging Environment (Test Data)
https://demo.api.aiwyn.ai/

🔐 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

List contacts

Request

Retrieve all contacts with basic pagination support

Returns a paginated list of contacts. Default sort prioritizes last/first name.

Real Example:

curl --location 'https://{{host}}/v1/contacts' \
--header 'Authorization: bearer {{token}}' \
--header 'Content-Type: application/json' \
--data '{
  "pageSize": 25,
  "page": 0
}'
Security
BearerAuth
Bodyapplication/json
pageSizeinteger[ 1 .. 1000 ]

Maximum number of contacts to return

Default 50
pageinteger>= 0

Number of records to skip for pagination

Default 0
curl -i -X POST \
  https://api.doc.aiwyn.ai/_mock/bundle/gql/v1/contacts \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "pageSize": 25,
    "page": 0
  }'

Responses

Successfully retrieved contacts

Search contacts

Request

Advanced contact filtering with custom GraphQL where clauses and dynamic ordering

Filter contacts using boolean logic and relationship-aware fields from contact_info.

Real Example:

curl --location 'https://{{host}}/v1/contacts/search' \
--header 'Authorization: bearer {{token}}' \
--header 'Content-Type: application/json' \
--data '{
  "pageSize": 1,
  "where": {
    "_and": [
      {
        "_or": [
          {
            "contact_info": {
              "firstName": {
                "_ilike": "%john%"
              }
            }
          },
          {
            "contact_info": {
              "lastName": {
                "_ilike": "%doe%"
              }
            }
          }
        ]
      },
      {
        "active": {
          "_eq": true
        }
      },
      {
        "createdAt": {
          "_gte": "1900-01-01T00:00:00Z"
        }
      },
      {
        "contact_info": {
          "email": {
            "_ilike": "%@company.com%"
          }
        }
      }
    ]
  },
  "orderBy": [
    {
      "contact_info": {
        "lastName": "asc"
      }
    },
    {
      "createdAt": "desc"
    }
  ]
}'
Security
BearerAuth
Bodyapplication/json
limitinteger[ 1 .. 1000 ]
Default 1
whereobject

GraphQL-style where clause for complex contact filtering

Example: {"_and":[{"_or":[{"contact_info":{"firstName":{"_ilike":"%john%"}}},{"contact_info":{"lastName":{"_ilike":"%doe%"}}}]},{"active":{"_eq":true}},{"createdAt":{"_gte":"1900-01-01T00:00:00Z"}},{"contact_info":{"email":{"_ilike":"%@company.com%"}}}]}
orderByArray of objects

Dynamic ordering with nested relationship fields

Example: [{"contact_info":{"lastName":"asc"}},{"createdAt":"desc"}]
curl -i -X POST \
  https://api.doc.aiwyn.ai/_mock/bundle/gql/v1/contacts/search \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "limit": 1,
    "where": {
      "_and": [
        {
          "_or": [
            {
              "contact_info": {
                "firstName": {
                  "_ilike": "%john%"
                }
              }
            },
            {
              "contact_info": {
                "lastName": {
                  "_ilike": "%doe%"
                }
              }
            }
          ]
        },
        {
          "active": {
            "_eq": true
          }
        },
        {
          "createdAt": {
            "_gte": "1900-01-01T00:00:00Z"
          }
        },
        {
          "contact_info": {
            "email": {
              "_ilike": "%@company.com%"
            }
          }
        }
      ]
    },
    "orderBy": [
      {
        "contact_info": {
          "lastName": "asc"
        }
      },
      {
        "createdAt": "desc"
      }
    ]
  }'

Responses

Successfully retrieved filtered contacts

Get contact by ID

Request

Retrieve a specific contact by its unique identifier

This endpoint provides detailed contact information including:

  • Complete contact details and demographics
  • Contact status and relationship information
  • Client associations and roles
  • Communication preferences and history
  • Address and location information
  • Professional and personal details

Contact Management Features:

  • Contact lifecycle tracking
  • Client relationship management
  • Communication preference management
  • Address and location tracking
  • Professional information management

Contact Details Include:

  • Contact name and demographics
  • Contact status and type
  • Client associations
  • Communication preferences
  • Address information
  • Professional details

Business Applications:

  • Contact relationship management
  • Client communication planning
  • Contact database maintenance
  • Professional network management
  • Communication preference tracking

Real Example:

curl --location 'https://{{host}}/v1/contact/23456' \
--header 'Authorization: bearer {{token}}' \
--header 'Content-Type: application/json'

Response Example:

{
  "id": 23456,
  "firstName": "John",
  "lastName": "Smith",
  "email": "john.smith@acme.com",
  "phone": "+1-555-0123",
  "mobile": "+1-555-0456",
  "title": "Chief Financial Officer",
  "department": "Finance",
  "status": "ACTIVE",
  "type": "CLIENT_CONTACT",
  "clientId": 789,
  "clientName": "Acme Corporation",
  "isPrimaryContact": true,
  "address": {
    "street": "123 Business Ave",
    "city": "New York",
    "state": "NY",
    "zipCode": "10001",
    "country": "USA"
  },
  "communicationPreferences": {
    "preferredMethod": "EMAIL",
    "emailFrequency": "WEEKLY",
    "newsletterSubscription": true,
    "marketingEmails": false
  },
  "notes": "Primary contact for all financial matters and audit communications",
  "createdAt": "2023-01-15T10:00:00Z",
  "updatedAt": "2024-11-20T14:30:00Z"
}
Security
BearerAuth
Path
idinteger>= 1required

Unique identifier of the contact

Example: 23456
curl -i -X GET \
  https://api.doc.aiwyn.ai/_mock/bundle/gql/v1/contact/23456 \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Contact details retrieved successfully

Bodyapplication/json
idinteger

Unique contact identifier

Example: 23456
firstNamestring

Contact first name

Example: "John"
lastNamestring

Contact last name

Example: "Smith"
emailstring(email)

Primary email address

Example: "john.smith@acme.com"
phonestring

Primary phone number

Example: "+1-555-0123"
mobilestring

Mobile phone number

Example: "+1-555-0456"
titlestring

Job title or position

Example: "Chief Financial Officer"
departmentstring

Department or division

Example: "Finance"
statusstring

Contact status

Enum"ACTIVE""INACTIVE""PENDING""BLOCKED"
Example: "ACTIVE"
typestring

Contact type

Enum"CLIENT_CONTACT""PROSPECT""VENDOR""PARTNER""STAFF"
Example: "CLIENT_CONTACT"
clientIdinteger

Associated client identifier

Example: 789
clientNamestring

Client name

Example: "Acme Corporation"
isPrimaryContactboolean

Whether this is the primary contact for the client

Example: true
addressobject

Contact address information

communicationPreferencesobject

Communication preferences

notesstring

Additional notes about the contact

Example: "Primary contact for all financial matters and audit communications"
createdAtstring(date-time)

Contact creation timestamp

Example: "2023-01-15T10:00:00Z"
updatedAtstring(date-time)

Last update timestamp

Example: "2024-11-20T14:30:00Z"
Response
application/json
{ "id": 23456, "firstName": "John", "lastName": "Smith", "email": "john.smith@acme.com", "phone": "+1-555-0123", "mobile": "+1-555-0456", "title": "Chief Financial Officer", "department": "Finance", "status": "ACTIVE", "type": "CLIENT_CONTACT", "clientId": 789, "clientName": "Acme Corporation", "isPrimaryContact": true, "address": { "street": "123 Business Ave", "city": "New York", "state": "NY", "zipCode": "10001", "country": "USA" }, "communicationPreferences": { "preferredMethod": "EMAIL", "emailFrequency": "WEEKLY", "newsletterSubscription": true, "marketingEmails": false }, "notes": "Primary contact for all financial matters and audit communications", "createdAt": "2023-01-15T10:00:00Z", "updatedAt": "2024-11-20T14:30:00Z" }

🧑‍💼 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.