> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.heyreach.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.heyreach.io/_mcp/server.

# RefreshElevenLabsLibrary

POST https://api//api/public/voice/RefreshElevenLabsLibrary

Re-sync the imported library with the workspace's ElevenLabs account: voices new in ElevenLabs are added, changed ones updated (including a new `availableUntil` date), removed ones dropped (an assigned one is kept and marked unavailable) and returned ones restored. No body. Answers the connection, in the shape **GetElevenLabsConnection** returns, and what the sync did.

### Errors

- **403** `NO_ACTIVE_SUBSCRIPTION`, `VOICE_NOTES_NOT_ENABLED` or `ELEVENLABS_NOT_ENABLED`.
- **409** `ELEVENLABS_NOT_CONNECTED`.
- **424** `ELEVENLABS_KEY_INVALID`, `ELEVENLABS_MISSING_PERMISSION` or `ELEVENLABS_ACCESS_BLOCKED`: the ElevenLabs account refused the request; fix the key in the app.
- **429** `ELEVENLABS_VALIDATION_RATE_LIMITED`: too many ElevenLabs key operations for the workspace in an hour. This is not the API rate limit.
- **502** `ELEVENLABS_UNAVAILABLE`: ElevenLabs is not reachable right now; nothing was changed. Retry later.

Reference: https://docs.heyreach.io/hey-reach-api/voice/refresh-eleven-labs-library

## Request

### Headers

- `X-API-KEY` (string, optional) — API key header using this scheme. Example: "X-API-KEY: \{API\_KEY}"

## Response

### 200

OK

- `connection` (map from string to any, required) — The connection after the sync, in the shape GetElevenLabsConnection returns.
- `sync` (RefreshElevenLabsLibraryVoiceResponseSync, required)

## Errors

### 403 Refresh Eleven Labs Library Voice Request Forbidden Error

Forbidden. `NO_ACTIVE_SUBSCRIPTION`: the workspace has no active subscription. `VOICE_NOTES_NOT_ENABLED`: voice notes are not enabled for the workspace. `ELEVENLABS_NOT_ENABLED`: ElevenLabs voices are not enabled for the workspace.

- `errorMessage` (string, required)
- `errorCode` (enum, optional)
  - Allowed values: `NO_ACTIVE_SUBSCRIPTION`, `VOICE_NOTES_NOT_ENABLED`, `ELEVENLABS_NOT_ENABLED`

### 409 Refresh Eleven Labs Library Voice Request Conflict Error

Conflict. `ELEVENLABS_NOT_CONNECTED`: the workspace has no ElevenLabs key connected. Keys are connected in the app.

- `errorMessage` (string, required)
- `errorCode` (enum, optional)
  - Allowed values: `ELEVENLABS_NOT_CONNECTED`

### 424 Refresh Eleven Labs Library Voice Request Failed Dependency Error

Failed Dependency. `ELEVENLABS_KEY_INVALID`: ElevenLabs did not accept the workspace's key. `ELEVENLABS_MISSING_PERMISSION`: the key is missing a permission ElevenLabs needs to list the voices or to generate speech; the connection's status turns to `MISSING_PERMISSION` and nothing is synced. `ELEVENLABS_ACCESS_BLOCKED`: ElevenLabs refused requests from our servers, for example because of an IP allowlist on the key.

- `errorMessage` (string, required)
- `errorCode` (enum, optional)
  - Allowed values: `ELEVENLABS_KEY_INVALID`, `ELEVENLABS_MISSING_PERMISSION`, `ELEVENLABS_ACCESS_BLOCKED`

### 429 Refresh Eleven Labs Library Voice Request Too Many Requests Error

Too Many Requests. `ELEVENLABS_VALIDATION_RATE_LIMITED`: too many ElevenLabs key operations for the workspace in an hour. The API rate limit answers 429 without an `errorCode`.

- `errorMessage` (string, required)
- `errorCode` (enum, optional)
  - Allowed values: `ELEVENLABS_VALIDATION_RATE_LIMITED`

### 502 Refresh Eleven Labs Library Voice Request Bad Gateway Error

Bad Gateway. `ELEVENLABS_UNAVAILABLE`: ElevenLabs is not reachable right now; nothing was changed. Retry later.

- `errorMessage` (string, required)
- `errorCode` (enum, optional)
  - Allowed values: `ELEVENLABS_UNAVAILABLE`

## Types

### RefreshElevenLabsLibraryVoiceResponseSync

- `importedCount` (integer, required)
- `addedCount` (integer, required)
- `updatedCount` (integer, required)
- `unavailableCount` (integer, required) — Voices gone from ElevenLabs that a sender still uses (kept, marked unavailable).
- `removedCount` (integer, required) — Voices gone from ElevenLabs that no sender used (removed).
- `restoredCount` (integer, required)
- `truncated` (boolean, required)

## Examples

**Response**

```json
{
  "connection": {
    "isConnected": true,
    "keyLast4": "a1b2",
    "lastSyncedAt": "2026-11-06T08:30:00Z",
    "status": "VALID",
    "voiceCount": 12
  },
  "sync": {
    "importedCount": 12,
    "addedCount": 1,
    "updatedCount": 2,
    "unavailableCount": 0,
    "removedCount": 0,
    "restoredCount": 0,
    "truncated": false
  }
}
```

**SDK Code**

```python
import requests

url = "https://api//api/public/voice/RefreshElevenLabsLibrary"

headers = {"X-API-KEY": "<string>"}

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

print(response.json())
```

```javascript
const url = 'https://api//api/public/voice/RefreshElevenLabsLibrary';
const options = {method: 'POST', headers: {'X-API-KEY': '<string>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

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

func main() {

	url := "https://api//api/public/voice/RefreshElevenLabsLibrary"

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

	req.Header.Add("X-API-KEY", "<string>")

	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//api/public/voice/RefreshElevenLabsLibrary")

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

request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<string>'

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.post("https://api//api/public/voice/RefreshElevenLabsLibrary")
  .header("X-API-KEY", "<string>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api//api/public/voice/RefreshElevenLabsLibrary', [
  'headers' => [
    'X-API-KEY' => '<string>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api//api/public/voice/RefreshElevenLabsLibrary");
var request = new RestRequest(Method.POST);
request.AddHeader("X-API-KEY", "<string>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["X-API-KEY": "<string>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api//api/public/voice/RefreshElevenLabsLibrary")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
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()
```