API: Implement add_post method.

Still requires significant testing.