Using field_create_field and field_create_instance to add a checkbox to a content type
This is how you create a single boolean checkbox field and field instance: I have excluded checking whether the field or instance exists, for brevity.

field_create_field(array(
  'field_name'  =&gt; "my_bool",
  'type'        =&gt; 'list_boolean',
  'cardinality' =&gt; 1,
  'settings'    =&gt; array(
    'allowed_values' =&gt; array( 
      /*
       * The docs say that this is optional, but without it,
       * the value is never saved to the datbase (tested with Drupal 7.28)
       */
      0 =&gt; '',
      1 =&gt; '',
    ),
  ),
));

field_create_instance(array(
  'field_name'  =&gt; "my_bool",
  'entity_type' =&gt; 'taxonomy_term',             // or 'node'
  'bundle'      =&gt; 'my_vocabulary_machine_name, // or 'my_content_type'
  'label'       =&gt; t('My boolean checkbox'),
  'required'    =&gt; false,                       // because not ticking a checkbox omits the value from $_POST
  'display'     =&gt; array(
    'default' =&gt; array(
      'type' =&gt; 'hidden',                       // optional. I want to hide it
    ),
  ),
  'widget'      =&gt; array(
    'type'     =&gt; 'options_onoff',              // gives you a checkbox
    'settings' =&gt; array(
      'display_label' =&gt; 1,                     // uses 'My boolean checkbox' as the label next to the actual checkbox
    ),
  ),
));