Downloads
This content is not available in your language yet.
Everything on this page is generated from the same curated examples as the reference pages and checked against the live API schema before it is published, so the files and the pages always agree.
| File | What it is |
|---|---|
wetel.postman_collection.json | Postman collection (v2.1): one request per operation, grouped by capability, with example responses |
wetel.postman_environment.json | Postman environment for the sandbox: baseUrl, apiKey, jwt, platform and the ids the requests share |
wetel-graphql.openapi.json | OpenAPI 3.1 description of the same operations, for Insomnia, reference viewers and code generators |
| Code samples | Every operation in curl, TypeScript, PHP, C# and Python, plus the Hello ticket program |
Postman
Section titled “Postman”- In Postman choose Import and drop in both JSON files.
- Select the Wetel sandbox environment (top right) and fill in
apiKey. Fill injwttoo if you will call the dashboard operations (API keys, approvals,session), and setagentIdto one of your agents. - Run Sessions and messages / sdkStart. Its test script saves
sessionIdandavatarTokeninto the environment, sosdkSendMessage,sessionsByExternalCustomerIdandsdkEndSessionwork straight after it. Every request that creates something saves its id the same way (agentId,workflowId,knowledgeBaseId,documentId,connectorId,customActionId,namedApiKeyId,approvalId,taskSessionId), so the requests of each folder can run top to bottom.
Each request already sends x-huat-platform: {{platform}} and the right credential for its operation. The requests use Postman’s GraphQL body mode, so the query and the variables are edited in two separate panes. For production, duplicate the environment, set baseUrl to the production base URL you are issued when you go live (the environment keeps an empty productionBaseUrl as a reminder) and use a production key.
OpenAPI
Section titled “OpenAPI”The API is GraphQL, so every operation is a POST to one URL. To describe it in OpenAPI, each operation gets its own path, written /graphql#<operationName> (for example /graphql#sdkStart). The part after # is a URL fragment that HTTP clients never send, so every request still goes to /graphql. The only server listed is the sandbox (https://api.wetel.dev); your production base URL is issued when you go live.
For each operation the file has the credential (apiKey, dashboardJwt or sessionToken security scheme), the required x-huat-platform header, the GraphQL document and variables as the request example, the JSON schema of the variables with every allowed enum value, the shape of the response and the typical error responses. Insomnia and most reference viewers import it directly. To browse it without installing anything, open the Interactive API reference, which renders this file.
Code samples
Section titled “Code samples”The samples read their settings from environment variables: WETEL_API_URL (defaults to the sandbox), WETEL_API_KEY, WETEL_JWT and WETEL_AVATAR_TOKEN, depending on the operation’s credential. Open one in the browser and save it, or copy it from its reference page.
- Hello ticket, the full program of the Quickstart: curl, TypeScript, PHP, C#, Python
- One file per operation and language:
/dev-portal/samples/<operation>/<operation>.<sh|ts|php|cs|py>, for example/dev-portal/samples/sdkStart/sdkStart.py.
The interactive reference uses the open-source Scalar API reference (MIT).