> For a complete page index, fetch https://docs.synthflow.ai/llms.txt. For full documentation content, fetch https://docs.synthflow.ai/llms-full.txt.

# List phone book entries

GET https://api.synthflow.ai/v2/phonebooks/{phone_book_id}/entries

List the entries of a phone book.

Reference: https://docs.synthflow.ai/api-reference/platform-api/phone-books/list-phone-book-entries

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Servers

- `https://api.synthflow.ai/v2` (Global, default)
- `https://api.us.synthflow.ai/v2` (United States)
- `https://api.eu.synthflow.ai/v2` (European Union)

## Request

### Path parameters

- `phone_book_id` (string, required) — Phone book ID.

### Query parameters

- `page_number` (integer, optional, default: 1) — Page number.
- `page_size` (integer, optional, default: 10) — Number of entries per page.

## Response

### 200

200

- `status` (string, optional) — Whether the request was successful.
- `response` (PhonebooksPhoneBookIdEntriesGetResponsesContentApplicationJsonSchemaResponse, optional)

## Types

### PhonebooksPhoneBookIdEntriesGetResponsesContentApplicationJsonSchemaResponse

- `total` (integer, optional) — Total number of entries in the phone book.
- `page_size` (integer, optional) — Number of entries per page.
- `page_number` (integer, optional) — Page number.
- `items` (list of PhonebooksPhoneBookIdEntriesGetResponsesContentApplicationJsonSchemaResponseItemsItems, optional)

### PhonebooksPhoneBookIdEntriesGetResponsesContentApplicationJsonSchemaResponseItemsItems

- `phone_book_entry_id` (string, optional) — Phone book entry ID.
- `phone_book_id` (string, optional) — Phone book ID.
- `phone_number` (string, optional) — Phone number of the entry.
- `transfer_condition` (string, optional) — When the agent transfers the call to this number.

## Examples

**Response**

```json
{
  "status": "ok",
  "response": {
    "total": 2,
    "page_size": 10,
    "page_number": 1,
    "items": [
      {
        "phone_book_entry_id": "b29da8ff-c89e-4628-94b6-d81193f883c7",
        "phone_book_id": "a19da8ff-c89e-4628-94b6-d81193f883c6",
        "phone_number": "+12025551234",
        "transfer_condition": "When the caller asks for a sales representative"
      },
      {
        "phone_book_entry_id": "c39da8ff-c89e-4628-94b6-d81193f883c8",
        "phone_book_id": "a19da8ff-c89e-4628-94b6-d81193f883c6",
        "phone_number": "+12025555678",
        "transfer_condition": "When the caller asks for technical support"
      }
    ]
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.synthflow.ai/v2/phonebooks/a19da8ff-c89e-4628-94b6-d81193f883c6/entries"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.synthflow.ai/v2/phonebooks/a19da8ff-c89e-4628-94b6-d81193f883c6/entries"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.synthflow.ai/v2/phonebooks/a19da8ff-c89e-4628-94b6-d81193f883c6/entries")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.synthflow.ai/v2/phonebooks/a19da8ff-c89e-4628-94b6-d81193f883c6/entries")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.synthflow.ai/v2/phonebooks/a19da8ff-c89e-4628-94b6-d81193f883c6/entries");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.synthflow.ai/v2/phonebooks/a19da8ff-c89e-4628-94b6-d81193f883c6/entries")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```