Get a Terms of Service agreement by id
Retrieve a single ToS agreement record. Returns 404 if the agreement does not exist or does not belong to the authenticated user.
GET
/
terms_of_service
/
agreements
/
{agreement_id}
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const agreement = await client.termsOfService.agreements.retrieve(
'550e8400-e29b-41d4-a716-446655440000',
);
console.log(agreement.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
agreement = client.terms_of_service.agreements.retrieve(
"550e8400-e29b-41d4-a716-446655440000",
)
print(agreement.data)package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
agreement, err := client.TermsOfService.Agreements.Get(context.TODO(), "550e8400-e29b-41d4-a716-446655440000")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", agreement.Data)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.termsofservice.agreements.AgreementRetrieveParams;
import com.telnyx.sdk.models.termsofservice.agreements.AgreementRetrieveResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
AgreementRetrieveResponse agreement = client.termsOfService().agreements().retrieve("550e8400-e29b-41d4-a716-446655440000");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
agreement = telnyx.terms_of_service.agreements.retrieve("550e8400-e29b-41d4-a716-446655440000")
puts(agreement)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$agreement = $client->termsOfService->agreements->retrieve(
'550e8400-e29b-41d4-a716-446655440000'
);
var_dump($agreement);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx terms-of-service:agreements retrieve \
--api-key 'My API Key' \
--agreement-id 550e8400-e29b-41d4-a716-446655440000curl --request GET \
--url https://api.telnyx.com/v2/terms_of_service/agreements/{agreement_id} \
--header 'Authorization: Bearer <token>'{
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"terms_version": "v1.0.0",
"version": "v1.0.0",
"product_type": "branded_calling",
"agreed_at": "2025-07-10T10:30:00Z",
"created_at": "2025-07-10T10:30:00Z"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Unique identifier of the agreement.
Example:
"550e8400-e29b-41d4-a716-446655440000"
Response
Agreement.
A recorded user agreement to a product's Terms of Service. The user_id is intentionally NOT echoed back on this public surface - the caller already knows their own identity.
Show child attributes
Show child attributes
Was this page helpful?
⌘I
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const agreement = await client.termsOfService.agreements.retrieve(
'550e8400-e29b-41d4-a716-446655440000',
);
console.log(agreement.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
agreement = client.terms_of_service.agreements.retrieve(
"550e8400-e29b-41d4-a716-446655440000",
)
print(agreement.data)package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
agreement, err := client.TermsOfService.Agreements.Get(context.TODO(), "550e8400-e29b-41d4-a716-446655440000")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", agreement.Data)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.termsofservice.agreements.AgreementRetrieveParams;
import com.telnyx.sdk.models.termsofservice.agreements.AgreementRetrieveResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
AgreementRetrieveResponse agreement = client.termsOfService().agreements().retrieve("550e8400-e29b-41d4-a716-446655440000");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
agreement = telnyx.terms_of_service.agreements.retrieve("550e8400-e29b-41d4-a716-446655440000")
puts(agreement)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$agreement = $client->termsOfService->agreements->retrieve(
'550e8400-e29b-41d4-a716-446655440000'
);
var_dump($agreement);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx terms-of-service:agreements retrieve \
--api-key 'My API Key' \
--agreement-id 550e8400-e29b-41d4-a716-446655440000curl --request GET \
--url https://api.telnyx.com/v2/terms_of_service/agreements/{agreement_id} \
--header 'Authorization: Bearer <token>'{
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"terms_version": "v1.0.0",
"version": "v1.0.0",
"product_type": "branded_calling",
"agreed_at": "2025-07-10T10:30:00Z",
"created_at": "2025-07-10T10:30:00Z"
}
}