# Aiwyn API

# 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** - JWT API key exchange for short-lived bearer JWTs
- 📊 **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.


Version: 1.0.0

## Servers

Sandbox
```
https://demo.api.aiwyn.ai
```

Staging
```
https://staging.api.aiwyn.app
```

## Security

### BearerAuth

[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

Type: http
Scheme: bearer
Bearer Format: JWT

### SecurityHeaders

Additional security headers that may be required or optional
depending on the authentication method and tenant configuration.


Type: object

## Download OpenAPI description

 - [Aiwyn API](https://dev.docs.api.aiwyn.ai/api/_bundle/bundle.yaml)

## 🔐 Authentication

 - [POST /v1/auth/token](https://dev.docs.api.aiwyn.ai/api/bundle/authentication/generateapitoken.md): Exchange a **JWT API key** for a **short-lived bearer JWT** used to access Product APIs. **Headers:** - `Tenant`: your tenant schema (recommended; required by many endpoints)
## 👤 Client

 - [POST /gql/v1/clients](https://dev.docs.api.aiwyn.ai/api/bundle/client/getclients.md): **Retrieve all clients with limit/offset pagination** This endpoint lists all clients. It does not apply filters. Use `POST /gql/v1/clients/search` when you need a where clause. **Pagination (v1 — int
 - [POST /gql/v1/clients/search](https://dev.docs.api.aiwyn.ai/api/bundle/client/filterclientsdynamic.md): **Advanced client filtering with custom GraphQL where clauses and dynamic ordering** **Pagination (v1 — limit/offset):** `pageSize` is a limit (records to return). `page` is an offset (records to skip
 - [GET /gql/v1/client/{id}](https://dev.docs.api.aiwyn.ai/api/bundle/client/getclientbyid.md): **Retrieve a specific client by its unique identifier** This endpoint provides detailed client information including: - Complete client details and demographics - Client status and relationship inform
 - [POST /api/v1/clients/v1/onboard](https://dev.docs.api.aiwyn.ai/api/bundle/client/onboardnewclient.md): **Onboard a new client with inline contact creation** Creates a new client record and simultaneously resolves or creates up to three associated contacts (preferred, billing, and secondary). Each conta
 - [POST /gql/v1/client_types](https://dev.docs.api.aiwyn.ai/api/bundle/client/getclienttypespaginated.md): **Retrieve all client types with basic pagination support** **Pagination (v1 — limit/offset):** `pageSize` is a limit (records to return). `page` is an offset (records to skip), not a page index. Hasu
 - [POST /gql/v1/tax_regions](https://dev.docs.api.aiwyn.ai/api/bundle/client/gettaxregionspaginated.md): **Retrieve all tax regions with basic pagination support** **Pagination (v1 — limit/offset):** `pageSize` is a limit (records to return). `page` is an offset (records to skip), not a page index. Hasur
## 👥 Client Group

 - [POST /gql/v1/client_groups](https://dev.docs.api.aiwyn.ai/api/bundle/client-group/getclientgroups.md): **Retrieve all client groups with basic pagination support** **Pagination (v1 — limit/offset):** `pageSize` is a limit (records to return). `page` is an offset (records to skip), not a page index. Has
## 📇 Contact

 - [POST /gql/v1/contacts](https://dev.docs.api.aiwyn.ai/api/bundle/contact/getcontactspaginated.md): **Retrieve all contacts with basic pagination support** **Pagination (v1 — limit/offset):** `pageSize` is a limit (records to return). `page` is an offset (records to skip), not a page index. Hasura m
 - [POST /gql/v1/contacts/search](https://dev.docs.api.aiwyn.ai/api/bundle/contact/filtercontactsdynamic.md): **Advanced contact filtering with custom GraphQL where clauses and dynamic ordering** **Pagination (v1 — limit/offset):** `pageSize` is a limit (records to return). `page` is an offset (records to ski
 - [GET /gql/v1/contact/{id}](https://dev.docs.api.aiwyn.ai/api/bundle/contact/getcontactbyid.md): **Retrieve a specific contact by its unique identifier** This endpoint provides detailed contact information including: - Complete contact details and demographics - Contact status and relationship in
 - [GET /gql/v1/contacts/by_client/{clientId}](https://dev.docs.api.aiwyn.ai/api/bundle/contact/getcontactsbyclientid.md): **Retrieve active contacts associated with a specific client** Returns all contacts linked to the given client via the contact-client relationship, where the contact, contact-client link, and contact
 - [POST /api/v1/contacts/upsert](https://dev.docs.api.aiwyn.ai/api/bundle/contact/upsertcontact.md): **Upsert up to 100 contacts, each linked to one or more existing clients, in one request** Send a `contacts` array (1–100). Each entry upserts a contact (contact_info + contact) and its links to exist
## 🧩 Client Business Entity

 - [POST /gql/v1/client_business_entities](https://dev.docs.api.aiwyn.ai/api/bundle/client-business-entity/getclientbusinessentitiespaginated.md): **Retrieve all client business entities with basic pagination support** **Pagination (v1 — limit/offset):** `pageSize` is a limit (records to return). `page` is an offset (records to skip), not a page
## 🔗 Contact Client

 - [POST /gql/v1/contact_clients](https://dev.docs.api.aiwyn.ai/api/bundle/contact-client/getcontactclientspaginated.md): **Retrieve all contact-client relationships with basic pagination support** **Pagination (v1 — limit/offset):** `pageSize` is a limit (records to return). `page` is an offset (records to skip), not a
## 🪪 Contact Info

 - [POST /gql/v1/contact_infos](https://dev.docs.api.aiwyn.ai/api/bundle/contact-info/getcontactinfospaginated.md): **Retrieve all contact info records with basic pagination support** **Pagination (v1 — limit/offset):** `pageSize` is a limit (records to return). `page` is an offset (records to skip), not a page ind
## 🏢 Department

 - [POST /gql/v1/departments](https://dev.docs.api.aiwyn.ai/api/bundle/department/getdepartmentspaginated.md): **Retrieve all departments with basic pagination support** **Pagination (v1 — limit/offset):** `pageSize` is a limit (records to return). `page` is an offset (records to skip), not a page index. Hasur
## 🏭 Industry

 - [POST /gql/v1/industries](https://dev.docs.api.aiwyn.ai/api/bundle/industry/getindustriespaginated.md): **Retrieve all industries with basic pagination support** **Pagination (v1 — limit/offset):** `pageSize` is a limit (records to return). `page` is an offset (records to skip), not a page index. Hasura
## 🧾 Job

 - [POST /gql/v1/jobs](https://dev.docs.api.aiwyn.ai/api/bundle/job/getjobspaginated.md): **Retrieve all jobs with basic pagination support** **Pagination (v1 — limit/offset):** `pageSize` is a limit (records to return). `page` is an offset (records to skip), not a page index. Hasura maps
 - [GET /gql/v1/job/{id}](https://dev.docs.api.aiwyn.ai/api/bundle/job/getjobbyid.md): **Retrieve a specific job by its unique identifier** This is a read-only lookup endpoint backed by Hasura.
## 🧩 Job Template

 - [POST /gql/v1/job_templates](https://dev.docs.api.aiwyn.ai/api/bundle/job-template/getjobtemplatespaginated.md): **Retrieve all job templates with basic pagination support** **Pagination (v1 — limit/offset):** `pageSize` is a limit (records to return). `page` is an offset (records to skip), not a page index. Has
## 🏬 Office

 - [POST /gql/v1/offices](https://dev.docs.api.aiwyn.ai/api/bundle/office/getofficespaginated.md): **Retrieve all offices with basic pagination support** **Pagination (v1 — limit/offset):** `pageSize` is a limit (records to return). `page` is an offset (records to skip), not a page index. Hasura ma
## 🏛 Org

 - [POST /gql/v1/orgs](https://dev.docs.api.aiwyn.ai/api/bundle/org/getorgspaginated.md): **Retrieve all orgs with basic pagination support** **Pagination (v1 — limit/offset):** `pageSize` is a limit (records to return). `page` is an offset (records to skip), not a page index. Hasura maps
## 🧷 Service Line

 - [POST /gql/v1/service_lines](https://dev.docs.api.aiwyn.ai/api/bundle/service-line/getservicelinespaginated.md): **Retrieve all service lines with basic pagination support** **Pagination (v1 — limit/offset):** `pageSize` is a limit (records to return). `page` is an offset (records to skip), not a page index. Has
## 🧑‍💼 Staff

 - [POST /gql/v1/staff](https://dev.docs.api.aiwyn.ai/api/bundle/staff/getstaff.md): **Staff directory and human resource management with organizational structure** **Pagination (v1 — limit/offset):** `pageSize` is a limit (records to return). `page` is an offset (records to skip), no
 - [POST /gql/v1/staff/search](https://dev.docs.api.aiwyn.ai/api/bundle/staff/filterstaffdynamic.md): **Advanced staff filtering with custom GraphQL where clauses and dynamic ordering** **Pagination (v1 — limit/offset):** `pageSize` is a limit (records to return). `page` is an offset (records to skip)
 - [GET /gql/v1/staff/{id}](https://dev.docs.api.aiwyn.ai/api/bundle/staff/getstaffbyid.md): **Retrieve a specific staff member by their unique identifier** This endpoint provides staff member information including: - Staff member identification and PMS reference - Personal details (name and
 - [POST /api/v1/staff](https://dev.docs.api.aiwyn.ai/api/bundle/staff/onboardstaff.md): **Create a new staff member, optionally assigning them to a rate card** Creates a staff record and, when `rateCardAssignment` is provided, atomically creates the corresponding billing rate and average
 - [PUT /api/v1/staff/{staffId}](https://dev.docs.api.aiwyn.ai/api/bundle/staff/updatestaff.md): **Update an existing staff member's profile and optionally replace their rate card assignment** All fields are optional — only the fields you include will be updated. Omitted fields retain their curre
 - [POST /api/v1/staff/type/batch/create](https://dev.docs.api.aiwyn.ai/api/bundle/staff/stafftypebatchcreate.md): **Create staff types in batch** Creates up to **100** staff types in a single request. Notes: - The request body is JSON `{ "items": [ ... ] }` where `items` is an array of staff type objects (same sh
 - [POST /api/v1/staff/type/batch/lookup](https://dev.docs.api.aiwyn.ai/api/bundle/staff/stafftypebatchlookup.md): **Lookup staff types page by page** Returns a page of staff types ordered by id ascending. Notes: - `pageSize` must be between **1** and **100** - `page` is zero-based (`page` 0 is the first page) **
## 💳 Payments

 - [POST /gql/v1/payments](https://dev.docs.api.aiwyn.ai/api/bundle/payments/getpayments.md): **Retrieve payment records with transaction details and security compliance** **Pagination (v1 — limit/offset):** `pageSize` is a limit (records to return). `page` is an offset (records to skip), not
 - [POST /gql/v1/payments/search](https://dev.docs.api.aiwyn.ai/api/bundle/payments/filterpaymentsdynamic.md): **Advanced payment filtering with custom GraphQL where clauses and dynamic ordering** **Pagination (v1 — limit/offset):** `pageSize` is a limit (records to return). `page` is an offset (records to ski
 - [GET /gql/v1/payment/{id}](https://dev.docs.api.aiwyn.ai/api/bundle/payments/getpaymentbyid.md): **Retrieve a specific payment by its unique identifier** This endpoint provides detailed payment information including: - Complete payment transaction details - PCI-compliant payment method informatio
 - [POST /api/v1/clients/v1/link/payment](https://dev.docs.api.aiwyn.ai/api/bundle/payments/createclientpaymentlink.md): **Create a single-use quick payment link that lets a client pay in the Aiwyn payment portal** The client is resolved by `clientRef`, the same identifier the client carries in the firm's practice manag
## 🧾 Billing

 - [POST /gql/v1/draft_invoice_histories](https://dev.docs.api.aiwyn.ai/api/bundle/billing/getdraftinvoicehistoriespaginated.md): **Retrieve draft invoice histories with basic pagination support** **Pagination (v1 — limit/offset):** `pageSize` is a limit (records to return). `page` is an offset (records to skip), not a page inde
 - [POST /gql/v1/draft_invoice_histories/search](https://dev.docs.api.aiwyn.ai/api/bundle/billing/filterdraftinvoicehistoriesdynamic.md): **Advanced draft invoice history filtering with custom GraphQL where clauses and dynamic ordering** **Pagination (v1 — limit/offset):** `pageSize` is a limit (records to return). `page` is an offset (
 - [GET /gql/v1/draft_invoice/{id}](https://dev.docs.api.aiwyn.ai/api/bundle/billing/getdraftinvoicebyid.md): **Retrieve a specific draft invoice by its unique identifier** This endpoint provides detailed draft invoice information including: - Complete draft invoice details and line items - Draft status and r
## 📄 Invoices

 - [POST /gql/v1/invoices](https://dev.docs.api.aiwyn.ai/api/bundle/invoices/getinvoices.md): **Retrieve invoices with comprehensive filtering and financial data** **Pagination (v1 — limit/offset):** `pageSize` is a limit (records to return). `page` is an offset (records to skip), not a page i
 - [POST /gql/v1/invoices/search](https://dev.docs.api.aiwyn.ai/api/bundle/invoices/filterinvoicesdynamic.md): **Advanced invoice filtering with custom GraphQL where clauses and dynamic ordering** **Pagination (v1 — limit/offset):** `pageSize` is a limit (records to return). `page` is an offset (records to ski
 - [GET /gql/v1/invoice/{id}](https://dev.docs.api.aiwyn.ai/api/bundle/invoices/getinvoicebyid.md): **Retrieve a specific invoice by its unique identifier** This endpoint provides detailed invoice information including: - Complete invoice details and line items - Invoice status and payment tracking
 - [GET /api/v1/invoices/unpaid](https://dev.docs.api.aiwyn.ai/api/bundle/invoices/getunpaidinvoicesbyclientref.md): **Return the unpaid invoices of one client, resolved by client reference** The client is resolved by `clientRef`, the same identifier `POST /api/v1/clients/v1/link/payment` accepts, and the invoices r
## 📋 Projects

 - [POST /gql/v1/projects](https://dev.docs.api.aiwyn.ai/api/bundle/projects/getprojectspaginated.md): **Retrieve all projects with basic pagination support** **Pagination (v1 — limit/offset):** `pageSize` is a limit (records to return). `page` is an offset (records to skip), not a page index. Hasura m
 - [POST /gql/v1/projects/search](https://dev.docs.api.aiwyn.ai/api/bundle/projects/filterprojectsdynamic.md): **Advanced project filtering with custom GraphQL where clauses and dynamic ordering** **Pagination (v1 — limit/offset):** `pageSize` is a limit (records to return). `page` is an offset (records to ski
 - [GET /gql/v1/project/{id}](https://dev.docs.api.aiwyn.ai/api/bundle/projects/getprojectbyid.md): **Retrieve a specific project by its unique identifier** This endpoint provides detailed project information including: - Complete project details and specifications - Project status and lifecycle inf
 - [POST /api/v1/projects/create_from_template](https://dev.docs.api.aiwyn.ai/api/bundle/projects/createprojectsfromtemplate.md): **Create jobs from job templates** Creates one or more jobs for a client from job templates. Up to 100 templates may be provided in a single request. Each entry in `jobTemplates` can override field-le
 - [POST /api/v1/projects/assign_staff](https://dev.docs.api.aiwyn.ai/api/bundle/projects/assignstafftoproject.md): **Assign staff to a project** Creates associations between staff members and a job: - `staffJobAssignments`: assigns staff directly to the job via `staff_job` records - `staffTaskAssignments`: assigns
 - [POST /api/v1/projects/remove_staff](https://dev.docs.api.aiwyn.ai/api/bundle/projects/removestafffromproject.md): **Remove staff from a project** Deactivates associations between staff members and a job: - `staffJobAssignments`: deactivates matching `staff_job` records - `staffTaskAssignments`: deactivates matchi
## ⏱ Time Management

 - [GET /v1/task-types](https://dev.docs.api.aiwyn.ai/api/bundle/time-management/gettasktypes.md): **Retrieve all task types** Returns every task type available for the tenant, ordered alphabetically by display name. Task types classify the work performed on time entries and projects, and carry bil
 - [POST /v1/task-types/search](https://dev.docs.api.aiwyn.ai/api/bundle/time-management/searchtasktypesdynamic.md): **Advanced task type filtering with custom GraphQL where clauses and dynamic ordering** **Pagination (v1 — limit/offset):** `pageSize` is a limit (records to return). `page` is an offset (records to s
 - [GET /v1/task/{id}](https://dev.docs.api.aiwyn.ai/api/bundle/time-management/findtaskbyid.md): **Retrieve a specific task by its unique identifier** Returns full task details including the associated task type, assignee staff member, and parent job reference. **Real Example:** ```bash curl --l
 - [POST /v1/tasks/search](https://dev.docs.api.aiwyn.ai/api/bundle/time-management/searchtasksdynamic.md): **Advanced task filtering with custom GraphQL where clauses and dynamic ordering** **Pagination (v1 — limit/offset):** `pageSize` is a limit (records to return). `page` is an offset (records to skip),
 - [POST /gql/v1/wip](https://dev.docs.api.aiwyn.ai/api/bundle/time-management/getwip.md): **Work in Progress tracking with comprehensive financial lifecycle management** **Pagination (v1 — limit/offset):** `pageSize` is a limit (records to return). `page` is an offset (records to skip), no
 - [POST /gql/v1/wips/search](https://dev.docs.api.aiwyn.ai/api/bundle/time-management/filterwipsdynamic.md): **Advanced WIP filtering with custom GraphQL where clauses and dynamic ordering** **Pagination (v1 — limit/offset):** `pageSize` is a limit (records to return). `page` is an offset (records to skip),
 - [GET /gql/v1/wip/{id}](https://dev.docs.api.aiwyn.ai/api/bundle/time-management/getwipbyid.md): **Retrieve a specific work-in-progress (WIP) time entry by its unique identifier** This endpoint provides detailed WIP time entry information including: - Complete time entry details and descriptions
 - [GET /api/v1/codes/types](https://dev.docs.api.aiwyn.ai/api/bundle/time-management/listtimemanagementcodetypes.md): **List available time management code record types** Returns the code types that can be managed via the Product API under `/api/v1/codes`.
 - [GET /api/v1/codes/schema/{type}](https://dev.docs.api.aiwyn.ai/api/bundle/time-management/gettimemanagementcodeschema.md): **Get field schema for a time management code type** Returns field definitions for the requested code type.
 - [POST /api/v1/codes](https://dev.docs.api.aiwyn.ai/api/bundle/time-management/upserttimemanagementcodes.md): **Create or update time management code records (upsert)** Records are created if they don't exist, or updated if matched by `systemRef`. Maximum 100 records per request. **Real Example:** ```bash cu
 - [POST /api/v1/codes/batch/{type}](https://dev.docs.api.aiwyn.ai/api/bundle/time-management/pagedlookuptimemanagementcodes.md): **Lookup time management code records in pages** Request body: `{ "pageSize": 25, "page": 0 }` **Real Example:** ```bash curl --location 'https://{{host}}/api/v1/codes/batch/{type}' \ --header 'Autho
 - [GET /api/v1/entries/types](https://dev.docs.api.aiwyn.ai/api/bundle/time-management/listtimemanagemententrytypes.md): **List available time management entry record types** Returns the entry types that can be managed via the Product API under `/api/v1/entries`.
 - [GET /api/v1/entries/schema/{type}](https://dev.docs.api.aiwyn.ai/api/bundle/time-management/gettimemanagemententryschema.md): **Get field schema for a time management entry type** Returns field definitions for the requested entry type. For `TimeEntry`, the schema includes optional `taskId` (FK to Task) and `code` (work code
 - [POST /api/v1/entries](https://dev.docs.api.aiwyn.ai/api/bundle/time-management/upserttimemanagemententries.md): **Create or update time management entry records (upsert)** Records are created if they don't exist, or updated if matched by top-level `systemRef`. Maximum 100 records per request. ### TimeEntry — li
 - [POST /api/v1/entries/batch/{type}](https://dev.docs.api.aiwyn.ai/api/bundle/time-management/pagedlookuptimemanagemententries.md): **Lookup time management entry records in pages** Request body: `{ "pageSize": 25, "page": 0 }` **Real Example:** ```bash curl --location 'https://{{host}}/api/v1/entries/batch/{type}' \ --header 'Au
## ✉️ Engagement

 - [POST /gql/v1/engagements](https://dev.docs.api.aiwyn.ai/api/bundle/engagement/getengagements.md): **Project engagement tracking with comprehensive workflow management** **Pagination (v1 — limit/offset):** `pageSize` is a limit (records to return). `page` is an offset (records to skip), not a page
 - [POST /gql/v1/engagements/search](https://dev.docs.api.aiwyn.ai/api/bundle/engagement/searchengagementsdynamic.md): **Search Engagements with Dynamic Filters** **Pagination (v1 — limit/offset):** `pageSize` is a limit (records to return). `page` is an offset (records to skip), not a page index. Hasura maps these as
 - [GET /gql/v1/engagement/{id}](https://dev.docs.api.aiwyn.ai/api/bundle/engagement/getengagementbyid.md): **Retrieve a specific engagement by its unique identifier** This endpoint provides detailed engagement information including: - Complete engagement details and scope - Engagement status and lifecycle
 - [PATCH /api/v1/engagements/{engagementId}](https://dev.docs.api.aiwyn.ai/api/bundle/engagement/updateengagement.md): **Update an existing engagement by ID** Partially updates an engagement. Only the fields included in the request body are modified — omitted fields are left unchanged. At least one field must be provi
 - [POST /api/v1/engagements/create](https://dev.docs.api.aiwyn.ai/api/bundle/engagement/createengagementletter.md): **Create a single engagement letter** Creates an engagement letter for a specific client. The engagement letter will be associated with the specified client, fiscal year, and assigned staff. **Require
 - [POST /api/v1/engagements/batch/create](https://dev.docs.api.aiwyn.ai/api/bundle/engagement/createbatchengagementletters.md): **Create a batch of engagement letters asynchronously** Submits a batch of engagement letter creation requests. The batch is processed asynchronously — use the returned batch ID with the `GET /api/v1/
 - [GET /api/v1/engagements/batch/{batchId}/status](https://dev.docs.api.aiwyn.ai/api/bundle/engagement/getengagementbatchstatus.md): **Retrieve the status of an engagement batch** Returns the current processing status of a previously submitted engagement batch, along with the IDs of any engagements that have been created so far. Us
 - [GET /gql/v1/engagement_documents/by_engagement/{engagementId}](https://dev.docs.api.aiwyn.ai/api/bundle/engagement/getengagementdocumentsbyengagementid.md): **Retrieve documents associated with a specific engagement** Returns all engagement documents linked to the given engagement ID, including the document type name for each record. **Real Example:** ``
## 🗃️ Records

 - [POST /api/v1/records](https://dev.docs.api.aiwyn.ai/api/bundle/records/createorupdaterecords.md): **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 r
 - [PUT /api/v1/records](https://dev.docs.api.aiwyn.ai/api/bundle/records/updaterecords.md): **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 Behav
 - [DELETE /api/v1/records](https://dev.docs.api.aiwyn.ai/api/bundle/records/deleterecords.md): **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 Succe
 - [GET /api/v1/records/types](https://dev.docs.api.aiwyn.ai/api/bundle/records/listentitytypes.md): **List available record types** Returns record types that can be managed via this API, with schema URLs. **Business Applications:** - Discover record types
 - [GET /api/v1/records/schema/{type}](https://dev.docs.api.aiwyn.ai/api/bundle/records/getentityschema.md): **Get field schema for a record type** Returns field definitions including types, validation, and foreign key relationships. **Business Applications:** - Dynamic form generation - Field validation - I
 - [GET /api/v1/records/custom](https://dev.docs.api.aiwyn.ai/api/bundle/records/listcustomrecordtypes.md): **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 r
 - [POST /api/v1/records/custom](https://dev.docs.api.aiwyn.ai/api/bundle/records/createcustomrecordtype.md): **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:** - De
 - [GET /api/v1/records/custom/{name}](https://dev.docs.api.aiwyn.ai/api/bundle/records/getcustomrecordtype.md): **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
 - [PUT /api/v1/records/custom/{name}](https://dev.docs.api.aiwyn.ai/api/bundle/records/updatecustomrecordtype.md): **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
 - [DELETE /api/v1/records/custom/{name}](https://dev.docs.api.aiwyn.ai/api/bundle/records/deactivatecustomrecordtype.md): **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:** - Re
## 🔔 Event Subscriptions

 - [GET /api/v1/event-subscriptions/catalog](https://dev.docs.api.aiwyn.ai/api/bundle/event-subscriptions/geteventsettingscatalog.md): **Get catalog of available event types** Returns all entity/operation combinations that can be subscribed to. Use the 'enabled' query parameter to filter by enabled status. **Business Applications:**
 - [POST /api/v1/event-subscriptions](https://dev.docs.api.aiwyn.ai/api/bundle/event-subscriptions/createeventsubscription.md): **Create a webhook subscription for entity events** Subscribe to receive webhook notifications when entities are created, updated, or deleted. The webhook URL must use HTTPS and will receive POST requ
 - [PATCH /api/v1/event-subscriptions/{id}](https://dev.docs.api.aiwyn.ai/api/bundle/event-subscriptions/updateeventsubscription.md): **Update an existing webhook subscription** Modify subscription properties such as delivery URL, filter expression, or description. Only provided fields will be updated. **Business Applications:** - U
 - [DELETE /api/v1/event-subscriptions/{id}](https://dev.docs.api.aiwyn.ai/api/bundle/event-subscriptions/deactivateeventsubscription.md): **Deactivate a webhook subscription** Soft-deletes a subscription by marking it as inactive. The subscription can be reactivated later if needed. **Business Applications:** - Stop receiving webhooks -
 - [POST /api/v1/event-subscriptions/{id}/reactivate](https://dev.docs.api.aiwyn.ai/api/bundle/event-subscriptions/reactivateeventsubscription.md): **Reactivate a webhook subscription** Reactivates a previously deactivated subscription. **Business Applications:** - Restore webhook integrations - Resume event notifications **Real Example:** ```b
 - [GET /api/v1/event-subscriptions/{id}/deliveries](https://dev.docs.api.aiwyn.ai/api/bundle/event-subscriptions/getwebhookdeliveryhistory.md): **Retrieve webhook delivery attempts for a subscription** Returns a paginated list of delivery attempts for webhook events for the given subscription. Supports filtering by HTTP status code and time r
 - [GET /api/v1/event-subscriptions/webhook/secret](https://dev.docs.api.aiwyn.ai/api/bundle/event-subscriptions/getsubscriptionsecret.md): **Get the webhook signing secret** Retrieves the secret used to sign webhook payloads. Use this secret to verify webhook authenticity on your server. **Business Applications:** - Webhook signature ver
 - [POST /api/v1/webhook/test/generate](https://dev.docs.api.aiwyn.ai/api/bundle/event-subscriptions/generatewebhooktestpayload.md): **Generate a signed test webhook payload** Generates a signature for an arbitrary JSON payload using the provided secret. This is intended for debugging webhook integrations ONLY. **Business Applicati
 - [POST /api/v1/webhook/test/validate](https://dev.docs.api.aiwyn.ai/api/bundle/event-subscriptions/validatewebhooktestsignature.md): **Validate a webhook signature** Verifies that the provided signature matches the payload and secret. This is intended for debugging webhook integrations ONLY. **Business Applications:** - Webhook tro
## 📁 File

 - [GET /api/v1/files](https://dev.docs.api.aiwyn.ai/api/bundle/file/listfiles.md): **Retrieve a paginated list of files scoped to the tenant** Returns files across whitelisted sources: CLIENT_REQUEST, DELIVERABLE, REFERENCE_FILE, DMS_DIRECT_UPLOAD. **Optional Filters:** - `createdAf
 - [GET /api/v1/files/{id}](https://dev.docs.api.aiwyn.ai/api/bundle/file/getfilebyid.md): **Retrieve file metadata by Aiwyn ID** Returns file metadata including filename, source type, status, and optional download URL. **Query Parameters:** - `includeDownloadUrl` (optional, default: false)
