The echo
endpoint lets you test Segment Public API connectivity, responses, versioning, and error handling.
Public Echo endpoint.
OK
Resource not found
Validation failure
Too many requests
import { configureApis, unwrap } from '@segment/public-api-sdk-typescript' const api = configureApis('/* Insert your Public API token here */') try { const result = await unwrap(api.testing.echo('Hello, World!')) console.log(JSON.stringify(result)) } catch (e) { console.log('ERROR:', e) }
{- "data": {
- "method": "get",
- "message": "Hello, World!",
- "headers": {
- "<omitted>": "<omitted>"
}
}
}