Skip to content

Create a new custom record type

Request

🔐 Required role: CUSTYP_C

📖 Data dictionary: Records and custom record types

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.

A name that already exists (custom or built-in, e.g. Client) answers 409:

{
  "error": { "code": "ERROR", "message": "Entity type 'Client' already exists" },
  "meta": { "success": false, "timestamp": "2026-10-01T12:00:00Z", "version": "v1" }
}

Business Applications:

  • Define custom data structures
  • Extend system capabilities
Security
(BearerAuth and CfAccessClientId and CfAccessClientSecret) or BearerAuth
Bodyapplication/jsonrequired
namestringrequired

Name

displayNamestring or null

Displayname

descriptionstring or null

Description

fieldsArray of objectsrequired

Fields

curl -i -X POST \
  https://api.sandbox.aiwyn.app/api/v1/records/custom \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'CF-Access-Client-Id: YOUR_API_KEY_HERE' \
  -H 'CF-Access-Client-Secret: YOUR_API_KEY_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

Record type created successfully

Bodyapplication/json
dataobject
errorobject or null
metaobject
Response
{ "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" } }