Skip to content

Downloads

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.

FileWhat it is
wetel.postman_collection.jsonPostman collection (v2.1): one request per operation, grouped by capability, with example responses
wetel.postman_environment.jsonPostman environment for the sandbox: baseUrl, apiKey, jwt, platform and the ids the requests share
wetel-graphql.openapi.jsonOpenAPI 3.1 description of the same operations, for Insomnia, reference viewers and code generators
Code samplesEvery operation in curl, TypeScript, PHP, C# and Python, plus the Hello ticket program
  1. In Postman choose Import and drop in both JSON files.
  2. Select the Wetel sandbox environment (top right) and fill in apiKey. Fill in jwt too if you will call the dashboard operations (API keys, approvals, session), and set agentId to one of your agents.
  3. Run Sessions and messages / sdkStart. Its test script saves sessionId and avatarToken into the environment, so sdkSendMessage, sessionsByExternalCustomerId and sdkEndSession work 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.

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.

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.

The interactive reference uses the open-source Scalar API reference (MIT).