Skip to content

Update a custom record type

Request

🔐 Required role: CUSTYP_C

📖 Data dictionary: Records and custom record types

Update a custom record type

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

description can be changed on its own; omit fields to keep the current field definitions. A type stored without field definitions needs fields sent with it (400 otherwise). Field names already on the type are kept as they are, even if they are not snake_case.

Business Applications:

  • Modify record type definitions
  • Add new fields
Security
(BearerAuth and CfAccessClientId and CfAccessClientSecret) or BearerAuth
Path
namestringrequired

Name of the custom record type.

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.sandbox.aiwyn.app/api/v1/records/custom/{name}' \
  -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 '{
    "displayName": "string",
    "description": "string",
    "fields": [
      {
        "name": "string",
        "displayName": "string",
        "type": "string",
        "required": true,
        "nullable": true,
        "description": "string",
        "referencedEntityType": "string",
        "rank": 0
      }
    ],
    "active": true
  }'

Responses

Record type updated 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" } }