From the California First Amendment Coalition: (May 20, 2013) The real outrage about the Justice Department’s use of secret subpoenas for the phone records of Associated Press journalists is that, based on the information that has surfaced to date, it was probably legal.
Under federal law the Justice Department needs only a subpoena–a piece of paper that a US Attorney generates unilaterally, without any court authorization–to obtain from phone companies and other service providers the call logs for customers. This includes essentially the same information you see on your monthly bill–numbers dialed, calls received, duration and times of calls.
Although federal prosecutors need a court’s OK to obtain the content of phone communications (and most, but not all, email communications), nothing in the relevant federal statute (the Stored Communications Act) requires a prosecutor to satisfy preconditions or to submit to judicial oversight when subpoenaing “metadata” associated with a phone number.
Also relevant are Justice Department guidelines for issuing subpoenas to the media. The guidelines, adopted in the 1970s, contain meaningful (albeit mainly procedural) limits on prosecutors’ discretion. However, the guidelines are just voluntary internal policies, without the force of law. Even if prosecutors failed to follow the guidelines in the AP matter–which is possible, perhaps probable–that dereliction and $2 will buy AP a cup of coffee.
What about the constitution? The Supreme Court dispensed with your Fourth Amendment right to privacy in this area long ago in an obscure and regrettable decision, Smith v. Maryland (1979). The Court ruled that phone company customers have no legitimate privacy interest in phone record data that are in the hands of a third-party, like a phone company.