## Documentation Index

Fetch the complete documentation index at: [/llms.txt](https://docs.terminal3.io/llms.txt)

Use this file to discover all available pages before exploring further.

### cURL Example

```bash
curl --request GET \
  --url https://staging.terminal3.io/v1/did \
  --header 'x-api-token: <x-api-token>'
```

### Python Example

```python
import requests

url = "https://staging.terminal3.io/v1/did"

headers = {"x-api-token": "<x-api-token>"}

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

print(response.text)
```

### JavaScript Example

```javascript
const options = {method: 'GET', headers: {'x-api-token': '<x-api-token>'}};

fetch('https://staging.terminal3.io/v1/did', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

### PHP Example

```php
<?php
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://staging.terminal3.io/v1/did",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "x-api-token: <x-api-token>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
```

### Go Example

```go
package main

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

func main() {
	url := "https://staging.terminal3.io/v1/did"

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

req.Header.Add("x-api-token", "<x-api-token>")

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

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

fmt.Println(string(body))
}
```

### Unirest (Java)

```java
HttpResponse<String> response = Unirest.get("https://staging.terminal3.io/v1/did")
  .header("x-api-token", "<x-api-token>")
  .asString();
```

### Ruby Example

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

url = URI("https://staging.terminal3.io/v1/did")

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

request = Net::HTTP::Get.new(url)
request["x-api-token"] = '<x-api-token>'

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

### Expected Responses

- **200**: 
```json
{
  "data": {
    "did": "<string>"
  }
}
```

- **Error Responses**:
```json
{
  "errors": [
    {
      "code": "<string>",
      "message": "<string>"
    }
  ]
}
```

### Headers

- **x-api-token**: string, required
- **x-api-subclient-id**: string, optional

### Response

- **200**: application/json, Success

- **data**: object, required
