# Retrieve segment

> GET /segments/:id — fetch a single segment.

`GET /segments/:id`

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `segment_id` | string | Yes | The segment ID. |

**Node.js**

```js
import { SendDart } from 'senddart';

const mb = new SendDart('mb_xxxxxxxxx');

const { data, error } = await mb.segments.get('4c1f8b2e-9a2f-4d71-8f0c-2b5d7e6a1c93');
console.log({ data, error });
```

**Ruby**

```ruby
require "senddart"

SendDart.api_key = "mb_xxxxxxxxx"

SendDart::Segments.get("4c1f8b2e-9a2f-4d71-8f0c-2b5d7e6a1c93")
```

**PHP**

```php
<?php
require 'vendor/autoload.php';

use SendDart\SendDart;

$senddart = SendDart::client('mb_xxxxxxxxx');

$senddart->segments->get('4c1f8b2e-9a2f-4d71-8f0c-2b5d7e6a1c93');
```

**Python**

```python
import senddart

senddart.api_key = "mb_xxxxxxxxx"

senddart.Segments.get("4c1f8b2e-9a2f-4d71-8f0c-2b5d7e6a1c93")
```

**Go**

```go
import "github.com/shekhu10/senddart-sdks/senddart-go"

client := senddart.NewClient("mb_xxxxxxxxx")

segment, err := client.Segments.Get("4c1f8b2e-9a2f-4d71-8f0c-2b5d7e6a1c93")
```

**Rust**

```rust
use senddart::SendDart;

let mb = SendDart::new("mb_xxxxxxxxx");

let _segment = mb.segments.get("4c1f8b2e-9a2f-4d71-8f0c-2b5d7e6a1c93").await?;
```

**Java**

```java
import com.senddart.SendDart;
import com.senddart.SendDartResponse;

SendDart senddart = new SendDart("mb_xxxxxxxxx");

SendDartResponse response = senddart.segments().get("4c1f8b2e-9a2f-4d71-8f0c-2b5d7e6a1c93");
```

**.NET**

```csharp
using SendDart;

ISendDart senddart = SendDartClient.Create("mb_xxxxxxxxx");

var resp = await senddart.SegmentRetrieveAsync("4c1f8b2e-9a2f-4d71-8f0c-2b5d7e6a1c93");
```

**cURL**

```bash
curl -X GET 'https://www.senddart.com/api/segments/4c1f8b2e-9a2f-4d71-8f0c-2b5d7e6a1c93' \
  -H 'Authorization: Bearer mb_xxxxxxxxx'
```

**CLI**

```bash
senddart segments get 4c1f8b2e-9a2f-4d71-8f0c-2b5d7e6a1c93
```

### Response

```json
{
  "object": "segment",
  "id": "4c1f8b2e-9a2f-4d71-8f0c-2b5d7e6a1c93",
  "audience_id": "78261eea-8f8b-4381-83c6-79fa7120f1cf",
  "name": "Gmail subscribers",
  "filter": { "status": "subscribed", "email_contains": "@gmail.com", "property_filters": [], "engagement": null },
  "created_at": "2026-06-23T10:00:00.000Z",
  "updated_at": "2026-06-23T10:00:00.000Z"
}
```
