# 🗃️ 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

 - [POST /api/v1/records](https://api.doc.aiwyn.ai/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://api.doc.aiwyn.ai/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://api.doc.aiwyn.ai/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://api.doc.aiwyn.ai/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://api.doc.aiwyn.ai/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://api.doc.aiwyn.ai/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://api.doc.aiwyn.ai/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://api.doc.aiwyn.ai/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://api.doc.aiwyn.ai/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://api.doc.aiwyn.ai/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
