# Creates a new activity type record that does not already exist. This method will auto-generate an ID and create a new activity type. If an ID is specified for the activity type, an error will be thrown. Endpoint: POST /activityTypes/{tenantId} Version: v1-2025-04-18 Security: knox-authorizer ## Path parameters: - `tenantId` (string, required) The id of the tenant being accessed. ## Request fields (application/json): - `activity_editing_options` (object) - `activity_editing_options.form_id` (string) The form to use - `activity_editing_options.relative_date` (object) - `activity_editing_options.relative_date.number` (number, required) The unit of time - `activity_editing_options.relative_date.position` (string, required) How the unit relates to the reference date Enum: "after", "before", "on" - `activity_editing_options.relative_date.relative_to` (string, required) Enum: "the beginning of the month", "the beginning of the quarter", "the beginning of the week", "the beginning of the year", "the end of the month", "the end of the quarter", "the end of the week", "the end of the year", "the reference date" - `activity_editing_options.relative_date.unit_of_time` (string, required) Enum: "days", "months", "weeks", "years" - `activity_editing_options.until` (string) Enum: "forever", "relative date" - `additional_details_prompt` (string) The prompt text to show in the portal for additional details of an activity of this type - `allow_editing_in_portal` (boolean) Allow for editing activities in the portal - `credit_calculator_options` (object, required) - `credit_calculator_options.formulas` (array) - `credit_calculator_options.formulas.credit_type_id` (string, required) - `credit_calculator_options.formulas.formula` (string) Expression - `credit_calculator_options.instructions` (string) Instructions to display - `credit_calculator_options.variables` (array, required) - `credit_calculator_options.variables.label` (string, required) The display of the variable - `credit_calculator_options.variables.name` (string, required) - `credit_instructions` (string) Instructions on how to give CEU credits - `credit_type_ids` (array) The CEU types granted by activities of this type - `custom_field_values` (array) - `custom_field_values.boolean_value` (boolean) The boolean value - `custom_field_values.custom_field_id` (string) The unique identifier of the custom field - `custom_field_values.file_url_value` (string) The pointer to a file value - `custom_field_values.list_value` (array) The list value - `custom_field_values.numeric_value` (number) The numeric value - `custom_field_values.string_value` (string) The string value of the custom field - `custom_field_values.table_value` (array) A list of objects (a table) - `date_prompt` (string) The prompt text to show in the portal for the date of an activity of this type - `description` (string) Description of this activity and what credits it generates - `display_order` (number) Order to display this type - `enable_credit_calculator` (boolean) Enables to display of a credit calculate to automatically calculate credits - `file_upload_prompt` (string) The prompt text to show in the portal for an file upload of an activity of this type - `file_upload_setting` (string) Whether or not this activity requires a file upload Enum: "disabled", "optional", "required" - `hide_from_portal` (boolean) If set, hide from portal - `id` (string, required) The unique, string identifier of this activity type - `is_active` (boolean) Whether or not this activity type is active - `name` (string, required) The name of the activity type - `name_prompt` (string) The prompt text to show in the portal for the name of an activity of this type - `quantity_prompt` (string) The prompt text to show in the portal for quantity - `quantity_setting` (string) Whether or not this activity requires a quantity Enum: "disabled", "optional", "required" - `require_additional_details` (boolean) Whether additional details are required - `sys_bulk_load_at` (string) If this record was loaded via bulk, the timestamp when the record was processed - `sys_bulk_load_id` (string) If this record was loaded via bulk, the ID of the bulk load process - `sys_bulk_load_pk` (string) If this record was loaded via bulk, the tenant and key of the bulk load process used as a partition key - `sys_bulk_load_record_no` (number) If this record was loaded via bulk, the record number in the source file - `sys_bulk_load_source_file` (string) If this record was loaded via bulk, the source file - `sys_calculated_field_error` (string) The error associated with the calculated field - `sys_calculated_field_errors` (array) - `sys_calculated_field_errors.error` (string) - `sys_calculated_field_errors.field` (string) - `sys_configuration_snapshot_id` (string) If a snapshot was restored/applies to this record, the ID of the snapshot - `sys_created_at` (string, required) The date/time that this record was created, expressed in ISO-8601 date format - `sys_created_by_id` (string, required) The ID of the user that created this record - `sys_deleted_by_id` (string) The ID of the user that deleted (or last tried to delete) this object - `sys_directive` (string) Means for passing directive information into an object processing logic - `sys_external_id` (string) The ID that a record has from an external system or data import - `sys_has_files_in_s3` (boolean) If true, this record has files in S3. If false, it doesnt, so no need to hit S3 upon deletion - `sys_last_bulk_data_operation_id` (string) If this record was last touched by a bulk data operation, the ID of that operation - `sys_last_bulk_data_operation_sys_version` (string) If this record was last touched by a bulk data operation, the sys_version at the time of that operation - `sys_last_modified_at` (string, required) The date/time that this record record was last modified, expressed in ISO-8601 date format - `sys_last_modified_by_id` (string, required) The ID of the user that last modified this record - `sys_last_security_context` (object) The security context of the last insert, modify, or delete performed on this item - `sys_locked` (boolean) If set, this record is locked and cannot be changed via the API - `sys_snapshot_base_version` (number) The version to use as a base when creating a configuration snapshot; if not set, 1 is used. Helpful when creating a sandbox - `sys_version` (number) A number representing the version of this record in the database ## Response 200 fields (application/json): - `activity_editing_options` (object) - `activity_editing_options.form_id` (string) The form to use - `activity_editing_options.relative_date` (object) - `activity_editing_options.relative_date.number` (number, required) The unit of time - `activity_editing_options.relative_date.position` (string, required) How the unit relates to the reference date Enum: "after", "before", "on" - `activity_editing_options.relative_date.relative_to` (string, required) Enum: "the beginning of the month", "the beginning of the quarter", "the beginning of the week", "the beginning of the year", "the end of the month", "the end of the quarter", "the end of the week", "the end of the year", "the reference date" - `activity_editing_options.relative_date.unit_of_time` (string, required) Enum: "days", "months", "weeks", "years" - `activity_editing_options.until` (string) Enum: "forever", "relative date" - `additional_details_prompt` (string) The prompt text to show in the portal for additional details of an activity of this type - `allow_editing_in_portal` (boolean) Allow for editing activities in the portal - `credit_calculator_options` (object, required) - `credit_calculator_options.formulas` (array) - `credit_calculator_options.formulas.credit_type_id` (string, required) - `credit_calculator_options.formulas.formula` (string) Expression - `credit_calculator_options.instructions` (string) Instructions to display - `credit_calculator_options.variables` (array, required) - `credit_calculator_options.variables.label` (string, required) The display of the variable - `credit_calculator_options.variables.name` (string, required) - `credit_instructions` (string) Instructions on how to give CEU credits - `credit_type_ids` (array) The CEU types granted by activities of this type - `custom_field_values` (array) - `custom_field_values.boolean_value` (boolean) The boolean value - `custom_field_values.custom_field_id` (string) The unique identifier of the custom field - `custom_field_values.file_url_value` (string) The pointer to a file value - `custom_field_values.list_value` (array) The list value - `custom_field_values.numeric_value` (number) The numeric value - `custom_field_values.string_value` (string) The string value of the custom field - `custom_field_values.table_value` (array) A list of objects (a table) - `date_prompt` (string) The prompt text to show in the portal for the date of an activity of this type - `description` (string) Description of this activity and what credits it generates - `display_order` (number) Order to display this type - `enable_credit_calculator` (boolean) Enables to display of a credit calculate to automatically calculate credits - `file_upload_prompt` (string) The prompt text to show in the portal for an file upload of an activity of this type - `file_upload_setting` (string) Whether or not this activity requires a file upload Enum: "disabled", "optional", "required" - `hide_from_portal` (boolean) If set, hide from portal - `id` (string, required) The unique, string identifier of this activity type - `is_active` (boolean) Whether or not this activity type is active - `name` (string, required) The name of the activity type - `name_prompt` (string) The prompt text to show in the portal for the name of an activity of this type - `quantity_prompt` (string) The prompt text to show in the portal for quantity - `quantity_setting` (string) Whether or not this activity requires a quantity Enum: "disabled", "optional", "required" - `require_additional_details` (boolean) Whether additional details are required - `sys_bulk_load_at` (string) If this record was loaded via bulk, the timestamp when the record was processed - `sys_bulk_load_id` (string) If this record was loaded via bulk, the ID of the bulk load process - `sys_bulk_load_pk` (string) If this record was loaded via bulk, the tenant and key of the bulk load process used as a partition key - `sys_bulk_load_record_no` (number) If this record was loaded via bulk, the record number in the source file - `sys_bulk_load_source_file` (string) If this record was loaded via bulk, the source file - `sys_calculated_field_error` (string) The error associated with the calculated field - `sys_calculated_field_errors` (array) - `sys_calculated_field_errors.error` (string) - `sys_calculated_field_errors.field` (string) - `sys_configuration_snapshot_id` (string) If a snapshot was restored/applies to this record, the ID of the snapshot - `sys_created_at` (string, required) The date/time that this record was created, expressed in ISO-8601 date format - `sys_created_by_id` (string, required) The ID of the user that created this record - `sys_deleted_by_id` (string) The ID of the user that deleted (or last tried to delete) this object - `sys_directive` (string) Means for passing directive information into an object processing logic - `sys_external_id` (string) The ID that a record has from an external system or data import - `sys_has_files_in_s3` (boolean) If true, this record has files in S3. If false, it doesnt, so no need to hit S3 upon deletion - `sys_last_bulk_data_operation_id` (string) If this record was last touched by a bulk data operation, the ID of that operation - `sys_last_bulk_data_operation_sys_version` (string) If this record was last touched by a bulk data operation, the sys_version at the time of that operation - `sys_last_modified_at` (string, required) The date/time that this record record was last modified, expressed in ISO-8601 date format - `sys_last_modified_by_id` (string, required) The ID of the user that last modified this record - `sys_last_security_context` (object) The security context of the last insert, modify, or delete performed on this item - `sys_locked` (boolean) If set, this record is locked and cannot be changed via the API - `sys_snapshot_base_version` (number) The version to use as a base when creating a configuration snapshot; if not set, 1 is used. Helpful when creating a sandbox - `sys_version` (number) A number representing the version of this record in the database ## Response 400 fields ## Response 401 fields ## Response 403 fields ## Response 404 fields ## Response 405 fields ## Response 409 fields ## Response 429 fields ## Response 500 fields