What is the programmatic equivalent of block save? From hook_save(), I've updated the "pages" attribute of a block, adding a path to the list.  

db_update('block')
    -&gt;fields(array('pages' =&gt; $pages))
    -&gt;condition('delta', $delta)
    -&gt;execute();


I've used the database API, (maybe that's the problem?) instead of the block API, because I'm under the impression there is no support in Drupal 7 for this. (hook_block_configure() I think is just for changes to default block configuration.)

The problem I'm having is that the update to the block pages attribute is not reflected, even after clearing caches, until I go to block edit form and click on Save.   

There's actually one thing in core's block module function block_admin_configure_submit, and that is to pass the event along:
   module_invoke($form_state['values']['module'], 'block_save', $form_state['values']['delta'], $form_state['values']);

I'm not sure how go about structure $form_state['values']. 
Is there a way to do this with the block API?

With regard to Context, we're already using it; we could accomplish the same thing by writing to path to exclude to the context['condition']['path'] attribute, (prefixing the path ~ to indicated "exclude").   This might be a better approach for us, but still would like to see the block code working.
The solution is to call drupal_form_submit.  For example:

module_load_include('inc', 'block', 'block.admin');
$form_state = array();
$form_state['values']['module'] = 'block';
$form_state['values']['op'] = 'Save block';
drupal_form_submit('block_admin_configure', $form_state, 'block', $delta);


You can apply this solution to other forms: from the browser, inspect the submit button, and get the 'op' value and the form's machine name.  In source, find the admin.inc that implements the form, and include that, and get the submit functions parameter signature; in this case, the 4th parameter is the form's delta value.