New customer setup
Dashboard handoff and API preflight sequence for a fresh Tyxter customer before an agent starts sending production WhatsApp traffic.
/v1/* calls continue to use API keys, not OAuth access tokens.Device bootstrap
curl https://api.tyxter.com/v1/agent-api-key-device-authorizations \
-H "content-type: application/json" \
-d '{"client_name":"Local setup agent","environment":"sandbox","scopes":["messages:write","templates:read"]}'Send the human to verification_uri_complete. The dashboard approval page requires an owner/admin session and a selected environment whose kind matches the requested sandbox or production kind.
curl https://api.tyxter.com/v1/agent-api-key-device-authorizations/token \
-H "content-type: application/json" \
-d '{"grant_type":"urn:ietf:params:oauth:grant-type:device_code","device_code":"$DEVICE_CODE"}'Treat HTTP 202 as pending. After approval, HTTP 200 returns a one-time kind=agent API key plus preflight checks.
Dashboard fallback
- Owner/admin signs in at
https://tyxter.com/login. - Owner/admin creates an agent-scoped API key for the selected sandbox or production environment.
- Owner/admin completes setup that requires elevated scopes, such as Meta connection, phone-number provisioning, billing, and payment-provider setup.
- The agent receives the API key as a secret and runs the preflight calls below before attempting sends.
Agent key limits
Agent-scoped keys are intended for day-to-day integration work. They cannot be granted api_keys:admin, billing:write, payments:write, agentic_payments:write, phone_numbers:write, or provider_connections:write. Use a standard dashboard-created key when the setup workflow must call provider or phone-number write APIs.
Preflight sequence
curl https://api.tyxter.com/v1/account \
-H "authorization: Bearer $TYXTER_API_KEY"Confirms the organization, project, environment, current key, scopes, and dashboard owner contact. Stop if the environment or owner does not match the human's instructions.
Confirms whether WhatsApp is connected for the key environment. Stop if channels.whatsapp.ready is false.
Find an active sender id before production sends. Do not fabricate phone-number ids or reuse examples from docs.
Before campaigns or template sends, confirm that the requested template name and language have an approved version. If not, send the owner to the template lifecycle instead of retrying the message.
Sandbox shortcut
Sandbox keys can use this single diagnostic to confirm default sender readiness, approved template readiness, webhook listening, and which scopes the key is missing. Its capabilities block reports whether a plain send and a template send can each succeed, so a first send never has to discover missing setup from a rejected request.