requests library. There is no Python-specific SDK package yet, the recommended pattern is a thin wrapper module in your own codebase that centralizes the base URL, authentication header, and error handling. The example below mirrors the operations published in /api-reference/openapi.json and is a good starting point for production worker code.
When to use this
- Backend workers that trigger outbound calls in response to CRM events, scheduled jobs, or upstream webhooks.
- Data pipelines that fetch DialNexa call logs and push them into a data warehouse.
- Internal tooling that automates campaign and workflow management for operations teams.
Triggering an outbound call
Recommended patterns
- Centralize the client. Wrap the snippet above in a single module (for example
dialnexa_client.py) and import it from every job. Avoid scatteringrequests.postcalls and headers across the codebase. - Use environment variables for the API key. Never hard-code keys. See Authentication for the format.
- Set explicit timeouts. A 30 second timeout works for
POST /callsbecause the response is small and returns as soon as DialNexa accepts the call. - Retry on transient failures only. Retry HTTP 502/503/504 and connection errors with exponential backoff. Do not retry 4xx responses, those indicate a payload that needs to be fixed, not a transient outage. See Errors.
- Handle webhook deliveries separately. For inbound events from DialNexa, build a dedicated handler that verifies the signing secret. See Webhook secrets.
Related pages
- API Introduction: base URLs, authentication, request and response shape.
- Trigger a Call: full OpenAPI schema for the operation above.
- Errors: error format and codes returned by every endpoint.
- Dynamic Variables: injecting context into agent prompts via
metadata. - Authentication: how API keys are sent and verified.