# Update a custom object definition Updates a custom object definition by posting migration resource to initiate the migration of definitions. ### Limitations Updating custom field definition has the following limitations: * You can only have one action per update request. * You cannot delete fields from custom objects that contain records. * You can only add required fields to custom objects with no records. * You can change optional fields to required only on the custom objects with no records. ### Note The bulk deletion of custom fields on standard and custom objects is temporarily unavailable as we refine the Custom Field feature. You can still delete custom fields individually during this refinement process. If you want to delete multiple custom fields, ensure that you send each deletion request only after receiving the response for the previous request. The bulk deletion capability will be restored once the refinement is complete. Endpoint: POST /objects/migrations Version: 2026-02-20 Security: bearerAuth ## Header parameters: - `Accept-Encoding` (string) Include the Accept-Encoding: gzip header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a Content-Encoding header with the compression algorithm so that your client can decompress it. - `Content-Encoding` (string) Include the Content-Encoding: gzip header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload. - `Zuora-Track-Id` (string) A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (:), semicolon (;), double quote ("), and quote ('). - `Zuora-Entity-Ids` (string) An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you should not set this header. - `Zuora-Org-Ids` (string) Comma separated IDs. If you have Zuora Multi-Org enabled, you can use this header to specify which orgs to perform the operation in. If you do not have Zuora Multi-Org enabled, you should not set this header. The IDs must be a sub-set of the user's accessible orgs. If you specify an org that the user does not have access to, the operation fails. This header is important in Multi-Org (MO) setups because it defines the organization context under which the API should operate—mainly used for read access or data visibility filtering. If the header is not set, the operation is performed in scope of the user's accessible orgs. - `Zuora-Version` (string) API version that determines the response schema. The default version is used if this parameter is not included. Specify Zuora-Version in the request header if you expect a specific response schema. ## Request fields (application/json): - `actions` (array, required) The actions of updating custom object definitions, to be performed as parts of the migration. Currently only one action per migration is supported. Example: [{"field":{"definition":{"description":"Address zip code","label":"Zip code","maxLength":10,"type":"string"},"name":"zip__c"},"namespace":"default","object":"address","type":"addField"}] - `actions.description` (string) Optional property for updateObject action - `actions.enableCreateRecordAuditing` (boolean) Optional property for updateObject action. Indicates whether to audit the creation of custom object records of this custom object definition. Note that you must enable the Custom Object Definition audit trail setting in your Zuora tenant before auditing custom object record creation. For more information, see Manage audit trail settings. - `actions.enableDeleteRecordAuditing` (boolean) Optional property for updateObject action. Indicates whether to audit the deletion of custom object records of this custom object definition. Note that you must enable the Custom Object Definition audit trail setting in your Zuora tenant before auditing custom object record deletion. For more information, see Manage audit trail settings. - `actions.field` (object) A reference to a field. - `actions.field.auditable` (boolean) Indicates whether Audit Trail will record changes of this custom field. You can change auditable fields to non-auditable, and vice versa. One custom object can have a maximum of five auditable fields. - `actions.field.definition` (object) The custom field definition in the custom object - `actions.field.definition.default` (string) Applicable if the type of the action is updateField - `actions.field.definition.description` (string) Applicable if the type of the action is updateField - `actions.field.definition.displayName` (boolean) Indicates whether to use this field as the display name of the custom object when being linked to another custom object. This field applies only to the Text custom field type: - The type field is string. - The enum field is not specified. - `actions.field.definition.format` (string) The data format of the custom field - `actions.field.definition.label` (string) The UI label of the custom field - `actions.field.definition.maxLength` (integer) The maximum length of string that can be stored in the custom field. This field applies only to the following custom field types: - Text: - The type field is string. - The format field is not specified or is url. - The enum field is not specified. - Long Text: - The type field is string. - The format field is long-text. - Picklist: - The type field is string. - The enum field is specified. - The multiselect field is not specified or is false. - Multiselect: - The type field is string. - The enum field is specified. - The multiselect field is true. - `actions.field.definition.multiselect` (boolean) Indicates whether this is a multiselect custom field. This field applies only to the creation of Picklist or Multiselect custom fields: - The action type field is addField. - The definition type field is string. - The maxLength field is specified. - The enum field is specified. - `actions.field.definition.origin` (string) Specifies that this is a custom field Enum: "custom" - `actions.field.definition.type` (string) The data type of the custom field - `actions.field.filterable` (boolean) Indicates whether the field is filterable or not. Applicable to addField and updateField actions. You can change a filterable field to non-filterable and vice versa. You can also add a filterable field. One custom object can have a maximum of 10 filterable fields. Note that changing filterable fields triggers reindexing. It will take 12-24 hours before all your data are reindexed and available to query. - `actions.field.name` (string) The name of the custom field to be updated - `actions.field.required` (boolean) Indicates whether the field is required or optional. You can update a required field to optional. On the other hand, you can only update an optional field to required on the custom object with no records. You can only add a required field to the custom object with no records. - `actions.field.targetName` (string) Required if the type of the action is renameField - `actions.field.unique` (boolean) Indicates whether to specify a unique constraint to the field. You can remove the unique constraint on the field. However, you can only add a unique constraint to a filterable field if the custom object contains no record. One custom object can have a maximum of five fields with unique constraints. - `actions.label` (string) Optional property for updateObject action - `actions.namespace` (string, required) The namespace of the custom object definition to be updated Example: "default" - `actions.object` (string, required) The API name of the custom object definition to be updated Example: "address" - `actions.relationship` (object) - `actions.relationship.cardinality` (string) The cardinality of the relationship from this object to another object. Only the manyToOne cardinality can be used when creating relationships. A relationship with oneToMany cardinality is created implicitly when a manyToOne relationship is created. A custom object definition can have a maximum of 2 manyToOne relationships. Enum: "manyToOne" - `actions.relationship.fields` (object, required) Field mappings in the form of `: `. - `actions.relationship.namespace` (string, required) The namespace where the related object is located - `actions.relationship.object` (string, required) The API name of the related object - `actions.relationship.recordConstraints` (object) Specifies contraints to apply to custom object records. - `actions.relationship.recordConstraints.create` (object) - `actions.relationship.recordConstraints.create.enforceValidMapping` (boolean) Specifies whether Zuora validates the values of mapped fields in custom object records. By default, Zuora validates the values of mapped fields in custom object records. For example, if the custom object definition has a field called AccountId__c that is mapped to the Id field of the account object, Zuora verifies that the value of AccountId__c is a valid account ID when a custom object record is created. If the value of AccountId__c is not a valid account ID, the operation fails. - `actions.type` (string, required) The type of the updating action on a custom object definition Enum: "addField", "deleteField", "updateField", "updateObject", "renameField", "addRelationship", "deleteRelationship" ## Response 200 fields (application/json): - `actions` (array) The actions of updating custom object definitions, to be performed as parts of the migration. Currently only one action per migration is supported. Example: [{"field":{"definition":{"description":"Address zip code","label":"Zip code","maxLength":10,"type":"string"},"name":"zip__c"},"namespace":"default","object":"address","type":"addField"}] - `actions.description` (string) Optional property for updateObject action - `actions.enableCreateRecordAuditing` (boolean) Indicates whether to audit the creation of custom object records of this custom object definition. - `actions.enableDeleteRecordAuditing` (boolean) Indicates whether to audit the deletion of custom object records of this custom object definition. - `actions.field` (object) A reference to a field. - `actions.field.auditable` (boolean) Indicates whether Audit Trail will record changes of this custom field. You can change auditable fields to non-auditable, and vice versa. One custom object can have a maximum of five auditable fields. - `actions.field.definition` (object) The custom field definition in the custom object - `actions.field.definition.default` (string) Applicable if the type of the action is updateField - `actions.field.definition.description` (string) Applicable if the type of the action is updateField - `actions.field.definition.displayName` (boolean) Indicates whether to use this field as the display name of the custom object when being linked to another custom object. This field applies only to the Text custom field type: - The type field is string. - The enum field is not specified. - `actions.field.definition.format` (string) The data format of the custom field - `actions.field.definition.label` (string) The UI label of the custom field - `actions.field.definition.maxLength` (integer) The maximum length of string that can be stored in the custom field. This field applies only to the following custom field types: - Text: - The type field is string. - The format field is not specified or is url. - The enum field is not specified. - Long Text: - The type field is string. - The format field is long-text. - Picklist: - The type field is string. - The enum field is specified. - The multiselect field is not specified or is false. - Multiselect: - The type field is string. - The enum field is specified. - The multiselect field is true. - `actions.field.definition.multiselect` (boolean) Indicates whether this is a multiselect custom field. This field applies only to the creation of Picklist or Multiselect custom fields: - The action type field is addField. - The definition type field is string. - The maxLength field is specified. - The enum field is specified. - `actions.field.definition.origin` (string) Specifies that this is a custom field Enum: "custom" - `actions.field.definition.type` (string) The data type of the custom field - `actions.field.filterable` (boolean) Indicates whether the field is filterable or not. Applicable to addField and updateField actions. You can change a filterable field to non-filterable and vice versa. You can also add a filterable field. One custom object can have a maximum of 10 filterable fields. Note that changing filterable fields triggers reindexing. It will take 12-24 hours before all your data are reindexed and available to query. - `actions.field.name` (string) The name of the custom field to be updated - `actions.field.required` (boolean) Indicates whether the field is required or optional. You can update a required field to optional. On the other hand, you can only update an optional field to required on the custom object with no records. You can only add a required field to the custom object with no records. - `actions.field.targetName` (string) Required if the type of the action is renameField - `actions.field.unique` (boolean) Indicates whether to specify a unique constraint to the field. You can remove the unique constraint on the field. However, you can only add a unique constraint to a filterable field if the custom object contains no record. One custom object can have a maximum of five fields with unique constraints. - `actions.label` (string) Optional property for updateObject action - `actions.namespace` (string) The namespace of the custom object definition to be updated Example: "default" - `actions.object` (string) The API name of the custom object definition to be updated Example: "address" - `actions.relationship` (object) - `actions.relationship.cardinality` (string) The cardinality of the relationship from this object to another object. A manyToOne relationship means this object is the child object (the "many" side), and the referenced object (the "one" side) is the parent. A oneToMany relationship means this object is the parent object (the "one" side), and the referenced object (the "many" side) is the child. Enum: "manyToOne", "oneToMany" - `actions.relationship.fields` (object) Field mappings in the form of `: `. - `actions.relationship.namespace` (string) The namespace where the related object is located - `actions.relationship.object` (string) The API name of the related object - `actions.relationship.recordConstraints` (object) Specifies contraints to apply to custom object records. - `actions.relationship.recordConstraints.create` (object) - `actions.relationship.recordConstraints.create.enforceValidMapping` (boolean) Specifies whether Zuora validates the values of mapped fields in custom object records. - `actions.type` (string) The type of the updating action on a custom object definition Enum: "addField", "deleteField", "updateField", "updateObject", "renameField", "addRelationship", "deleteRelationship"