Yes. Per Matt Santos on Wikipedia:
According to David Remnick’s biography of Barack Obama, “The Bridge,” and other news sources, West Wing writer and producer Eli Attie used then-State Senator Obama as a model for the character.
- Smith, Ben (5 April 2010). “Imagining Obama On ‘The West Wing‘”. Politico.
- Stelter, Brian (29 October 2008). “Following The Script: Obama, McCain and ‘The West Wing‘”. New York Times.
- Freedland, Jonathan (2008-02-21). “From West Wing to the real thing: Scriptwriters modeled TV’s ethnic minority candidate on young Barack Obama“. The Guardian.