Text case convert
Try it interactively →POST /api/text-caseConvert text between case styles: camelCase, snake_case, kebab-case, PascalCase, Title Case, CONSTANT_CASE, and more. Handles mixed inputs gracefully.
Inputs
| Name | Type | Default | Description |
|---|---|---|---|
| input* | string | — | Text to re-case. |
| target* | enum (camel | pascal | snake | kebab | constant | dot | path | sentence | title | header | no) | — | Target case convention. |
Response
Modes: json, text. Cache: yes (24h TTL).
Code samples
Built from the pascal-from-snake example.
curl -X POST https://api.xtract.bot/api/text-case \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-Account-Id: $XTRACT_ACCOUNT_ID" \
-H "X-Api-Key: $XTRACT_API_KEY" \
-d '{
"input": "my_example_app",
"target": "pascal"
}'