### Install from git Source: https://github.com/zavudev/sdk-typescript/blob/main/CONTRIBUTING.md Installs the SDK directly from the git repository. ```sh $ npm install git+ssh://git@github.com:zavudev/sdk-typescript.git ``` -------------------------------- ### Run example file Source: https://github.com/zavudev/sdk-typescript/blob/main/CONTRIBUTING.md Makes the example executable and runs it against your API. ```sh $ chmod +x examples/.ts # run the example against your api $ pnpm tsn -T examples/.ts ``` -------------------------------- ### Install @zavudev/sdk with npm Source: https://github.com/zavudev/sdk-typescript/blob/main/README.md Install the Zavudev SDK for TypeScript/JavaScript projects. ```sh npm install @zavudev/sdk ``` -------------------------------- ### Add example file Source: https://github.com/zavudev/sdk-typescript/blob/main/CONTRIBUTING.md Template for adding an example file in the examples/ directory. ```ts // add an example to examples/.ts #!/usr/bin/env -S npm run tsn -T … ``` -------------------------------- ### Set up repository with pnpm Source: https://github.com/zavudev/sdk-typescript/blob/main/CONTRIBUTING.md Installs dependencies and builds the SDK output to dist/. ```sh $ pnpm install $ pnpm build ``` -------------------------------- ### GET /v1/10dlc/brands/use-cases Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Lists all available use cases for brands. ```APIDOC ## GET /v1/10dlc/brands/use-cases ### Description Lists all available use cases for brands. ### Method GET ### Endpoint /v1/10dlc/brands/use-cases ### Parameters No parameters required. ### Request Example No request body required. ### Response #### Success Response (200) - BrandListUseCasesResponse - List of use cases #### Response Example { "use_cases": [ "Marketing", "Customer Service" ] } ``` -------------------------------- ### GET /v1/invitations Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Lists invitations. Returns an InvitationsCursor. ```APIDOC ## GET /v1/invitations ### Description Lists invitations. ### Method GET ### Endpoint /v1/invitations ### Parameters #### Query Parameters - params (object) - Optional - List parameters. ### Response #### Success Response (200) - InvitationsCursor - A cursor of invitations. ``` -------------------------------- ### startContactsSync Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Starts a WhatsApp contacts sync for a given sender. Returns a WhatsappSyncStartContactsSyncResponse. ```APIDOC ## POST /v1/senders/{senderId}/whatsapp-sync/contacts ### Description Starts a WhatsApp contacts sync for a given sender. ### Method POST ### Endpoint /v1/senders/{senderId}/whatsapp-sync/contacts ### Parameters #### Path Parameters - **senderId** (string) - Required - The ID of the sender. ### Response #### Success Response (200) - **WhatsappSyncStartContactsSyncResponse** - The result of starting the contacts sync. ``` -------------------------------- ### startHistorySync Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Starts a WhatsApp history sync for a given sender. Returns a WhatsappSyncStartHistorySyncResponse. ```APIDOC ## POST /v1/senders/{senderId}/whatsapp-sync/history ### Description Starts a WhatsApp history sync for a given sender. ### Method POST ### Endpoint /v1/senders/{senderId}/whatsapp-sync/history ### Parameters #### Path Parameters - **senderId** (string) - Required - The ID of the sender. ### Response #### Success Response (200) - **WhatsappSyncStartHistorySyncResponse** - The result of starting the history sync. ``` -------------------------------- ### GET /v1/urls Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Lists verified URLs. Returns a VerifiedURLsCursor. ```APIDOC ## GET /v1/urls ### Description Lists verified URLs. ### Method GET ### Endpoint /v1/urls ### Parameters #### Query Parameters - params (object) - Optional - List parameters. ### Response #### Success Response (200) - VerifiedURLsCursor - A cursor of verified URLs. ``` -------------------------------- ### GET /v1/invitations/{invitationId} Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Retrieves an invitation by its ID. Returns an InvitationRetrieveResponse. ```APIDOC ## GET /v1/invitations/{invitationId} ### Description Retrieves an invitation by its ID. ### Method GET ### Endpoint /v1/invitations/{invitationId} ### Parameters #### Path Parameters - invitationId (string) - Required - The ID of the invitation to retrieve. ### Response #### Success Response (200) - InvitationRetrieveResponse - The retrieved invitation. ``` -------------------------------- ### GET /v1/agent-templates Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Lists agent templates. This method is available on the client as client.agentTemplates.list and returns an AgentTemplateListResponse. ```APIDOC ## GET /v1/agent-templates ### Description Lists agent templates. ### Method GET ### Endpoint /v1/agent-templates ### Response #### Success Response (200) - AgentTemplateListResponse - A list of agent templates. #### Response Example { "data": [] } ``` -------------------------------- ### GET /v1/senders/{senderId}/agent/tools Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Lists all agent tools for a sender. Returns an AgentToolsCursor. ```APIDOC ## GET /v1/senders/{senderId}/agent/tools ### Description Lists all agent tools for a sender. ### Method GET ### Endpoint /v1/senders/{senderId}/agent/tools ### Parameters #### Path Parameters - **senderId** (string) - Required - The ID of the sender. ### Response #### Success Response (200) - **AgentToolsCursor** (object) - A cursor for paginating through tools. ``` -------------------------------- ### Run MCP server directly via npx Source: https://github.com/zavudev/sdk-typescript/blob/main/packages/mcp-server/README.md Sets the ZAVUDEV_API_KEY environment variable and launches the MCP server using npx. This is the quickest way to start the server locally. ```sh export ZAVUDEV_API_KEY="My API Key" npx -y @zavudev/sdk-mcp@latest ``` -------------------------------- ### GET /v1/senders/{senderId}/agent/knowledge-bases Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Lists all knowledge bases for a sender. Returns an AgentKnowledgeBasesCursor. ```APIDOC ## GET /v1/senders/{senderId}/agent/knowledge-bases ### Description Lists all knowledge bases for a sender. ### Method GET ### Endpoint /v1/senders/{senderId}/agent/knowledge-bases ### Parameters #### Path Parameters - **senderId** (string) - Required - The ID of the sender. ### Response #### Success Response (200) - **AgentKnowledgeBasesCursor** (object) - A cursor for paginating through knowledge bases. ``` -------------------------------- ### GET /v1/addresses - List Addresses Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Lists addresses with optional parameters. Returns an AddressesCursor. ```APIDOC ## GET /v1/addresses ### Description Lists addresses. ### Method GET ### Endpoint /v1/addresses ### Parameters #### Query Parameters - params (object) - Optional - List parameters. ### Response #### Success Response (200) - AddressesCursor - A cursor for paginating through addresses. #### Response Example { "data": [], "has_more": false } ``` -------------------------------- ### MCP client configuration JSON Source: https://github.com/zavudev/sdk-typescript/blob/main/packages/mcp-server/README.md Example configuration for MCP clients that use a JSON config file. It specifies the npx command, arguments, and the ZAVUDEV_API_KEY environment variable. ```json { "mcpServers": { "zavudev_sdk_api": { "command": "npx", "args": ["-y", "@zavudev/sdk-mcp"], "env": { "ZAVUDEV_API_KEY": "My API Key" } } } } ``` -------------------------------- ### GET /v1/10dlc/brands Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Lists all brands with optional filtering parameters. ```APIDOC ## GET /v1/10dlc/brands ### Description Lists all brands with optional filtering parameters. ### Method GET ### Endpoint /v1/10dlc/brands ### Parameters #### Query Parameters - params (object) - Optional - List filters (e.g., pagination, status) ### Request Example No request body required. ### Response #### Success Response (200) - TenDlcBrandsCursor - A cursor for paginated brand results #### Response Example { "data": [ { "id": "brand_123", "name": "Example Brand" } ], "has_more": false } ``` -------------------------------- ### GET /v1/senders/{senderId}/agent/knowledge-bases/{kbId}/documents Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Lists all documents in a knowledge base. Returns an AgentDocumentsCursor. ```APIDOC ## GET /v1/senders/{senderId}/agent/knowledge-bases/{kbId}/documents ### Description Lists all documents in a knowledge base. ### Method GET ### Endpoint /v1/senders/{senderId}/agent/knowledge-bases/{kbId}/documents ### Parameters #### Path Parameters - **senderId** (string) - Required - The ID of the sender. - **kbId** (string) - Required - The ID of the knowledge base. ### Response #### Success Response (200) - **AgentDocumentsCursor** (object) - A cursor for paginating through documents. ``` -------------------------------- ### GET /v1/broadcasts Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Lists broadcasts. Returns a paginated list of broadcasts. ```APIDOC ## GET /v1/broadcasts ### Description Lists broadcasts. ### Method GET ### Endpoint /v1/broadcasts ### Parameters #### Query Parameters - params (object) - Optional - List parameters for pagination and filtering. ### Response #### Success Response (200) - BroadcastsCursor - A cursor for paginating through broadcasts. ``` -------------------------------- ### list Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Lists agents. This method corresponds to the GET /v1/agents endpoint and returns an AgentsCursor. ```APIDOC ## GET /v1/agents ### Description Lists agents. ### Method GET ### Endpoint /v1/agents ### Parameters #### Query Parameters - params (object) - Optional - The list parameters. ### Response #### Success Response (200) - AgentsCursor - A cursor for paginating through agents. #### Response Example { "data": [], "has_more": false } ``` -------------------------------- ### GET /v1/calls Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Lists calls. This method is available on the client as client.calls.list and returns a CallListResponsesCursor. ```APIDOC ## GET /v1/calls ### Description Lists calls. ### Method GET ### Endpoint /v1/calls ### Parameters #### Query Parameters - params (object) - Optional - Query parameters for filtering or pagination. ### Response #### Success Response (200) - CallListResponsesCursor - A cursor for paginating through the list of calls. #### Response Example { "data": [] } ``` -------------------------------- ### GET /v1/contacts/{contactId} Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Retrieves a contact by its ID. Returns the Contact object. ```APIDOC ## GET /v1/contacts/{contactId} ### Description Retrieves a contact by its ID. ### Method GET ### Endpoint /v1/contacts/{contactId} ### Parameters #### Path Parameters - contactId (string) - Required - The ID of the contact to retrieve ### Response #### Success Response (200) - Contact object #### Response Example {} ``` -------------------------------- ### GET /v1/functions/{functionId}/git-link Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Retrieves the Git link configuration for a specific function. ```APIDOC ## GET /v1/functions/{functionId}/git-link ### Description Retrieves the Git link configuration for a specific function. ### Method GET ### Endpoint /v1/functions/{functionId}/git-link ### Parameters #### Path Parameters - **functionId** (string) - Required - The ID of the function. ### Response #### Success Response (200) - **GitLinkRetrieveResponse** - The Git link configuration details. ``` -------------------------------- ### GET /v1/contacts/phone/{phoneNumber} Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Retrieves a contact by phone number. Returns the Contact object. ```APIDOC ## GET /v1/contacts/phone/{phoneNumber} ### Description Retrieves a contact by phone number. ### Method GET ### Endpoint /v1/contacts/phone/{phoneNumber} ### Parameters #### Path Parameters - phoneNumber (string) - Required - The phone number to search for ### Response #### Success Response (200) - Contact object #### Response Example {} ``` -------------------------------- ### GET /v1/me Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Retrieves the current user's information. This method is called as client.me.retrieve() and returns a MeRetrieveResponse. ```APIDOC ## GET /v1/me ### Description Retrieves the current user's information. ### Method GET ### Endpoint /v1/me ### Response #### Success Response (200) - MeRetrieveResponse #### Response Example (No example provided) ``` -------------------------------- ### GET /v1/senders/{senderId}/agent/flows Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Lists agent flows for a sender. Returns AgentFlowsCursor. ```APIDOC ## GET /v1/senders/{senderId}/agent/flows ### Description Lists agent flows for a sender. ### Method GET ### Endpoint /v1/senders/{senderId}/agent/flows ### Parameters #### Path Parameters - **senderId** (string) - Required - The ID of the sender. #### Query Parameters - **params** (object) - Optional - Pagination or filter parameters. ### Response #### Success Response (200) - **AgentFlowsCursor** - A cursor for iterating over flows. ``` -------------------------------- ### GET /v1/senders/{senderId}/agent/knowledge-bases/{kbId} Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Retrieves a specific knowledge base by its ID. Returns a KnowledgeBaseRetrieveResponse. ```APIDOC ## GET /v1/senders/{senderId}/agent/knowledge-bases/{kbId} ### Description Retrieves a specific knowledge base by its ID. ### Method GET ### Endpoint /v1/senders/{senderId}/agent/knowledge-bases/{kbId} ### Parameters #### Path Parameters - **senderId** (string) - Required - The ID of the sender. - **kbId** (string) - Required - The ID of the knowledge base. ### Response #### Success Response (200) - **KnowledgeBaseRetrieveResponse** (object) - The retrieved knowledge base. ``` -------------------------------- ### GET /v1/addresses/{addressId} - Retrieve Address Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Retrieves an address by its ID. Returns an AddressRetrieveResponse. ```APIDOC ## GET /v1/addresses/{addressId} ### Description Retrieves an address by its ID. ### Method GET ### Endpoint /v1/addresses/{addressId} ### Parameters #### Path Parameters - addressId (string) - Required - The ID of the address to retrieve. ### Response #### Success Response (200) - AddressRetrieveResponse - The retrieved address. #### Response Example { "id": "addr_123", "status": "active" } ``` -------------------------------- ### GET /v1/senders/{senderId}/agent/executions Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Lists agent executions for a sender. Returns AgentExecutionsCursor. ```APIDOC ## GET /v1/senders/{senderId}/agent/executions ### Description Lists agent executions for a sender. ### Method GET ### Endpoint /v1/senders/{senderId}/agent/executions ### Parameters #### Path Parameters - **senderId** (string) - Required - The ID of the sender. #### Query Parameters - **params** (object) - Optional - Pagination or filter parameters. ### Response #### Success Response (200) - **AgentExecutionsCursor** - A cursor for iterating over executions. ``` -------------------------------- ### GET /v1/templates Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Lists templates with optional parameters. This method is called as client.templates.list({ ...params }) and returns a TemplatesCursor. ```APIDOC ## GET /v1/templates ### Description Lists templates with optional parameters. ### Method GET ### Endpoint /v1/templates ### Parameters #### Query Parameters - params (object) - Optional - List parameters (e.g., pagination). ### Request Example GET /v1/templates?limit=10 ### Response #### Success Response (200) - TemplatesCursor object #### Response Example { "data": [] } ``` -------------------------------- ### GET /v1/sub-accounts/{id}/api-keys Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Lists API keys for a sub-account. This method is called via client.subAccounts.apiKeys.list(id) and returns an APIKeyListResponse. ```APIDOC ## GET /v1/sub-accounts/{id}/api-keys ### Description Lists API keys for a sub-account. ### Method GET ### Endpoint /v1/sub-accounts/{id}/api-keys ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the sub-account. ### Response #### Success Response (200) - **APIKeyListResponse** - A list of API keys. #### Response Example ```json { "data": [ { "id": "key_123", "name": "API Key Name" } ] } ``` ``` -------------------------------- ### GET /v1/balance Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Retrieves the balance for the main account. This method is called via client.balance.retrieve() and returns a BalanceRetrieveResponse. ```APIDOC ## GET /v1/balance ### Description Retrieves the balance for the main account. ### Method GET ### Endpoint /v1/balance ### Response #### Success Response (200) - **BalanceRetrieveResponse** - The balance details. #### Response Example ```json { "balance": 100.00 } ``` ``` -------------------------------- ### GET /v1/documents - List Regulatory Documents Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Lists regulatory documents with optional parameters. Returns a RegulatoryDocumentsCursor. ```APIDOC ## GET /v1/documents ### Description Lists regulatory documents. ### Method GET ### Endpoint /v1/documents ### Parameters #### Query Parameters - params (object) - Optional - List parameters. ### Response #### Success Response (200) - RegulatoryDocumentsCursor - A cursor for paginating through documents. #### Response Example { "data": [], "has_more": false } ``` -------------------------------- ### GET /v1/senders/{senderId}/agent/tools/{toolId}/test-runs Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Lists test runs for a specific tool. Returns a ToolListTestRunsResponse. ```APIDOC ## GET /v1/senders/{senderId}/agent/tools/{toolId}/test-runs ### Description Lists test runs for a specific tool. ### Method GET ### Endpoint /v1/senders/{senderId}/agent/tools/{toolId}/test-runs ### Parameters #### Path Parameters - **senderId** (string) - Required - The ID of the sender. - **toolId** (string) - Required - The ID of the tool. ### Response #### Success Response (200) - **ToolListTestRunsResponse** (object) - The list of test runs. ``` -------------------------------- ### GET /v1/functions/{functionId}/deployments Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Lists deployments for a function. This method is called as client.functions.listDeployments(functionID, { ...params }) and returns a FunctionListDeploymentsResponse. ```APIDOC ## GET /v1/functions/{functionId}/deployments ### Description Lists deployments for a function. ### Method GET ### Endpoint /v1/functions/{functionId}/deployments ### Parameters #### Path Parameters - functionId (string) - Required - The ID of the function. #### Query Parameters - params (object) - Optional - Query parameters for listing deployments. ### Response #### Success Response (200) - FunctionListDeploymentsResponse #### Response Example (No example provided) ``` -------------------------------- ### Configure proxy in Deno with Deno.createHttpClient Source: https://github.com/zavudev/sdk-typescript/blob/main/README.md Configure a proxy in Deno using Deno.createHttpClient and the client fetch option. ```ts import Zavudev from 'npm:@zavudev/sdk'; const httpClient = Deno.createHttpClient({ proxy: { url: 'http://localhost:8888' } }); const client = new Zavudev({ fetchOptions: { client: httpClient, }, }); ``` -------------------------------- ### GET /v1/senders/{senderId}/agent/tools/{toolId} Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Retrieves a specific agent tool by its ID. Returns a ToolRetrieveResponse. ```APIDOC ## GET /v1/senders/{senderId}/agent/tools/{toolId} ### Description Retrieves a specific agent tool by its ID. ### Method GET ### Endpoint /v1/senders/{senderId}/agent/tools/{toolId} ### Parameters #### Path Parameters - **senderId** (string) - Required - The ID of the sender. - **toolId** (string) - Required - The ID of the tool to retrieve. ### Response #### Success Response (200) - **ToolRetrieveResponse** (object) - The retrieved tool. ``` -------------------------------- ### GET /v1/senders/{senderId}/agent/knowledge-bases/{kbId}/documents/{docId} Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Retrieves a specific document from a knowledge base. Returns a DocumentRetrieveDocumentResponse. ```APIDOC ## GET /v1/senders/{senderId}/agent/knowledge-bases/{kbId}/documents/{docId} ### Description Retrieves a specific document from a knowledge base. ### Method GET ### Endpoint /v1/senders/{senderId}/agent/knowledge-bases/{kbId}/documents/{docId} ### Parameters #### Path Parameters - **senderId** (string) - Required - The ID of the sender. - **kbId** (string) - Required - The ID of the knowledge base. - **docId** (string) - Required - The ID of the document. ### Response #### Success Response (200) - **DocumentRetrieveDocumentResponse** (object) - The retrieved document. ``` -------------------------------- ### GET /v1/conversations Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Lists conversations with optional filtering parameters. ```APIDOC ## GET /v1/conversations ### Description Lists conversations with optional filtering parameters. ### Method GET ### Endpoint /v1/conversations ### Parameters #### Query Parameters - **params** (object) - Optional - List parameters. ### Response #### Success Response (200) - **ConversationListResponsesCursor** - A cursor for paginated conversation list. ``` -------------------------------- ### GET /v1/conversations/{conversationId} Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Retrieves a specific conversation by its ID. ```APIDOC ## GET /v1/conversations/{conversationId} ### Description Retrieves a specific conversation by its ID. ### Method GET ### Endpoint /v1/conversations/{conversationId} ### Parameters #### Path Parameters - **conversationId** (string) - Required - The ID of the conversation. ### Response #### Success Response (200) - **ConversationRetrieveResponse** - The conversation details. ``` -------------------------------- ### Claude Code MCP server installation command Source: https://github.com/zavudev/sdk-typescript/blob/main/packages/mcp-server/README.md Command to add the Zavudev MCP server to Claude Code using the `claude mcp add` command. It sets the API key header and uses HTTP transport. ```bash claude mcp add zavudev_sdk_mcp_api --header "x-zavudev-api-key: My API Key" --transport http https://zavudev.stlmcp.com ``` -------------------------------- ### Configure proxy in Bun with fetchOptions.proxy Source: https://github.com/zavudev/sdk-typescript/blob/main/README.md Configure a proxy in Bun using the proxy fetch option. ```ts import Zavudev from '@zavudev/sdk'; const client = new Zavudev({ fetchOptions: { proxy: 'http://localhost:8888', }, }); ``` -------------------------------- ### GET /v1/agent-templates/{templateId} Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Retrieves a specific agent template by its ID. This method is available on the client as client.agentTemplates.retrieve and returns an AgentTemplateRetrieveResponse. ```APIDOC ## GET /v1/agent-templates/{templateId} ### Description Retrieves a specific agent template by its ID. ### Method GET ### Endpoint /v1/agent-templates/{templateId} ### Parameters #### Path Parameters - templateId (string) - Required - The ID of the agent template to retrieve. ### Response #### Success Response (200) - AgentTemplateRetrieveResponse - The retrieved agent template. #### Response Example { "id": "string" } ``` -------------------------------- ### create Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Creates a new 10DLC campaign. Returns a CampaignCreateResponse. ```APIDOC ## POST /v1/10dlc/campaigns ### Description Creates a new 10DLC campaign. ### Method POST ### Endpoint /v1/10dlc/campaigns ### Parameters #### Request Body - params (object) - Required - Campaign creation parameters ### Request Example { "params": {} } ### Response #### Success Response (200) - CampaignCreateResponse - The created campaign #### Response Example { "id": "campaign_id" } ``` -------------------------------- ### Send a message with Zavudev client Source: https://github.com/zavudev/sdk-typescript/blob/main/README.md Initialize the client and send a message. The apiKey defaults to the ZAVUDEV_API_KEY environment variable and can be omitted. ```js import Zavudev from '@zavudev/sdk'; const client = new Zavudev({ apiKey: process.env['ZAVUDEV_API_KEY'], // This is the default and can be omitted }); const messageResponse = await client.messages.send({ to: '+14155551234', text: 'Hello from Zavu!', }); console.log(messageResponse.message); ``` -------------------------------- ### GET /v1/10dlc/brands/{brandId} Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Retrieves a specific brand by its ID. ```APIDOC ## GET /v1/10dlc/brands/{brandId} ### Description Retrieves a specific brand by its ID. ### Method GET ### Endpoint /v1/10dlc/brands/{brandId} ### Parameters #### Path Parameters - brandID (string) - Required - The unique identifier of the brand ### Request Example No request body required. ### Response #### Success Response (200) - BrandRetrieveResponse - The brand details #### Response Example { "id": "brand_123", "name": "Example Brand" } ``` -------------------------------- ### Run tests Source: https://github.com/zavudev/sdk-typescript/blob/main/CONTRIBUTING.md Runs the test suite. ```sh $ pnpm run test ``` -------------------------------- ### GET /v1/functions/{functionId}/logs Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Tails logs for a function. This method is called as client.functions.tailLogs(functionID, { ...params }) and returns a FunctionTailLogsResponse. ```APIDOC ## GET /v1/functions/{functionId}/logs ### Description Tails logs for a function. ### Method GET ### Endpoint /v1/functions/{functionId}/logs ### Parameters #### Path Parameters - functionId (string) - Required - The ID of the function. #### Query Parameters - params (object) - Optional - Query parameters for tailing logs. ### Response #### Success Response (200) - FunctionTailLogsResponse #### Response Example (No example provided) ``` -------------------------------- ### GET /v1/contacts Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Lists contacts. Returns a cursor for pagination. ```APIDOC ## GET /v1/contacts ### Description Lists contacts. ### Method GET ### Endpoint /v1/contacts ### Parameters #### Query Parameters - params (object) - Optional - List parameters ### Response #### Success Response (200) - ContactsCursor object #### Response Example {} ``` -------------------------------- ### Link local repository Source: https://github.com/zavudev/sdk-typescript/blob/main/CONTRIBUTING.md Links a local clone of the repository for development, with instructions for both yarn and pnpm. ```sh # Clone $ git clone https://www.github.com/zavudev/sdk-typescript $ cd sdk-typescript # With yarn $ yarn link $ cd ../my-package $ yarn link @zavudev/sdk # With pnpm $ pnpm link --global $ cd ../my-package $ pnpm link --global @zavudev/sdk ``` -------------------------------- ### GET /v1/broadcasts/{broadcastId} Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Retrieves a broadcast by its ID. Returns a BroadcastRetrieveResponse. ```APIDOC ## GET /v1/broadcasts/{broadcastId} ### Description Retrieves a broadcast by its ID. ### Method GET ### Endpoint /v1/broadcasts/{broadcastId} ### Parameters #### Path Parameters - broadcastId (string) - Required - The ID of the broadcast to retrieve. ### Response #### Success Response (200) - BroadcastRetrieveResponse - The retrieved broadcast. ``` -------------------------------- ### GET /v1/conversations/{conversationId}/messages Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Lists messages within a specific conversation. ```APIDOC ## GET /v1/conversations/{conversationId}/messages ### Description Lists messages within a specific conversation. ### Method GET ### Endpoint /v1/conversations/{conversationId}/messages ### Parameters #### Path Parameters - **conversationId** (string) - Required - The ID of the conversation. #### Query Parameters - **params** (object) - Optional - List parameters. ### Response #### Success Response (200) - **MessagesCursor** - A cursor for paginated messages. ``` -------------------------------- ### list Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Lists all 10DLC campaigns. Returns a TenDlcCampaignsCursor. ```APIDOC ## GET /v1/10dlc/campaigns ### Description Lists all 10DLC campaigns. ### Method GET ### Endpoint /v1/10dlc/campaigns ### Parameters #### Query Parameters - params (object) - Optional - List parameters ### Response #### Success Response (200) - TenDlcCampaignsCursor - A cursor of campaigns #### Response Example { "data": [] } ``` -------------------------------- ### GET /v1/urls/{urlId} Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Retrieves details of a URL by its ID. Returns a URLRetrieveDetailsResponse. ```APIDOC ## GET /v1/urls/{urlId} ### Description Retrieves details of a URL by its ID. ### Method GET ### Endpoint /v1/urls/{urlId} ### Parameters #### Path Parameters - urlId (string) - Required - The ID of the URL to retrieve details for. ### Response #### Success Response (200) - URLRetrieveDetailsResponse - The URL details. ``` -------------------------------- ### POST /v1/senders/{senderId}/agent/knowledge-bases/{kbId}/documents Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Creates a new document in the specified knowledge base. Returns a DocumentCreateResponse. ```APIDOC ## POST /v1/senders/{senderId}/agent/knowledge-bases/{kbId}/documents ### Description Creates a new document in the specified knowledge base. ### Method POST ### Endpoint /v1/senders/{senderId}/agent/knowledge-bases/{kbId}/documents ### Parameters #### Path Parameters - **senderId** (string) - Required - The ID of the sender. - **kbId** (string) - Required - The ID of the knowledge base. #### Request Body - **params** (object) - Required - The document creation parameters. ### Response #### Success Response (200) - **DocumentCreateResponse** (object) - The created document. ``` -------------------------------- ### POST /v1/senders/{senderId}/agent/knowledge-bases Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Creates a new knowledge base for the specified sender. Returns a KnowledgeBaseCreateResponse. ```APIDOC ## POST /v1/senders/{senderId}/agent/knowledge-bases ### Description Creates a new knowledge base for the specified sender. ### Method POST ### Endpoint /v1/senders/{senderId}/agent/knowledge-bases ### Parameters #### Path Parameters - **senderId** (string) - Required - The ID of the sender. #### Request Body - **params** (object) - Required - The knowledge base creation parameters. ### Response #### Success Response (200) - **KnowledgeBaseCreateResponse** (object) - The created knowledge base. ``` -------------------------------- ### POST /v1/addresses - Create Address Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Creates a new address. Returns an AddressCreateResponse. ```APIDOC ## POST /v1/addresses ### Description Creates a new address. ### Method POST ### Endpoint /v1/addresses ### Parameters #### Request Body - params (object) - Required - Address creation parameters. ### Request Example { "params": {} } ### Response #### Success Response (200) - AddressCreateResponse - The created address. #### Response Example { "id": "addr_123", "status": "active" } ``` -------------------------------- ### POST /v1/templates Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Creates a new template. This method is called as client.templates.create({ ...params }) and returns a Template object. ```APIDOC ## POST /v1/templates ### Description Creates a new template. ### Method POST ### Endpoint /v1/templates ### Parameters #### Request Body - params (object) - Required - Template creation parameters. ### Request Example { "params": {} } ### Response #### Success Response (200) - Template object #### Response Example { "id": "template_id" } ``` -------------------------------- ### create Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Creates a new agent. This method corresponds to the POST /v1/agents endpoint and returns an AgentCreateResponse. ```APIDOC ## POST /v1/agents ### Description Creates a new agent. ### Method POST ### Endpoint /v1/agents ### Parameters #### Request Body - params (object) - Required - The agent creation parameters. ### Request Example { "params": {} } ### Response #### Success Response (200) - AgentCreateResponse - The created agent. #### Response Example { "id": "string", "name": "string" } ``` -------------------------------- ### POST /v1/invitations Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Creates a new invitation. Returns an InvitationCreateResponse. ```APIDOC ## POST /v1/invitations ### Description Creates a new invitation. ### Method POST ### Endpoint /v1/invitations ### Parameters #### Request Body - params (object) - Required - Invitation creation parameters. ### Response #### Success Response (200) - InvitationCreateResponse - The created invitation. ``` -------------------------------- ### GET /v1/broadcasts/{broadcastId}/progress Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Retrieves the progress of a broadcast. Returns a BroadcastProgress object. ```APIDOC ## GET /v1/broadcasts/{broadcastId}/progress ### Description Retrieves the progress of a broadcast. ### Method GET ### Endpoint /v1/broadcasts/{broadcastId}/progress ### Parameters #### Path Parameters - broadcastId (string) - Required - The ID of the broadcast. ### Response #### Success Response (200) - BroadcastProgress - The progress information. ``` -------------------------------- ### Configure proxy in Node with undici ProxyAgent Source: https://github.com/zavudev/sdk-typescript/blob/main/README.md Configure a proxy in Node.js using undici's ProxyAgent and the dispatcher fetch option. ```ts import Zavudev from '@zavudev/sdk'; import * as undici from 'undici'; const proxyAgent = new undici.ProxyAgent('http://localhost:8888'); const client = new Zavudev({ fetchOptions: { dispatcher: proxyAgent, }, }); ``` -------------------------------- ### POST /v1/functions/{functionId}/git-link/deploy Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Triggers a deployment for the Git-linked function. ```APIDOC ## POST /v1/functions/{functionId}/git-link/deploy ### Description Triggers a deployment for the Git-linked function. ### Method POST ### Endpoint /v1/functions/{functionId}/git-link/deploy ### Parameters #### Path Parameters - **functionId** (string) - Required - The ID of the function. ### Response #### Success Response (200) - **GitLinkDeployNowResponse** - The deployment trigger response. ``` -------------------------------- ### POST /v1/senders/{senderId}/agent/tools Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Creates a new agent tool for the specified sender. Returns a ToolCreateResponse. ```APIDOC ## POST /v1/senders/{senderId}/agent/tools ### Description Creates a new agent tool for the specified sender. ### Method POST ### Endpoint /v1/senders/{senderId}/agent/tools ### Parameters #### Path Parameters - **senderId** (string) - Required - The ID of the sender. #### Request Body - **params** (object) - Required - Tool creation parameters. ### Response #### Success Response (200) - **ToolCreateResponse** (object) - The created tool. ``` -------------------------------- ### GET /v1/senders/{senderId}/agent/stats Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Retrieves statistics for the agent of a sender. Returns AgentStats. ```APIDOC ## GET /v1/senders/{senderId}/agent/stats ### Description Retrieves statistics for the agent of a sender. ### Method GET ### Endpoint /v1/senders/{senderId}/agent/stats ### Parameters #### Path Parameters - **senderId** (string) - Required - The ID of the sender. ### Response #### Success Response (200) - **AgentStats** - The agent statistics. ``` -------------------------------- ### POST /v1/sub-accounts/{id}/api-keys Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Creates an API key for a sub-account. This method is called via client.subAccounts.apiKeys.create(id, params) and returns an APIKeyCreateResponse. ```APIDOC ## POST /v1/sub-accounts/{id}/api-keys ### Description Creates an API key for a sub-account. ### Method POST ### Endpoint /v1/sub-accounts/{id}/api-keys ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the sub-account. #### Request Body - **params** (object) - Required - Parameters for creating the API key. ### Request Example ```json { "name": "API Key Name" } ``` ### Response #### Success Response (200) - **APIKeyCreateResponse** - The created API key details. #### Response Example ```json { "id": "key_123", "name": "API Key Name" } ``` ``` -------------------------------- ### GET /v1/senders/{senderId}/agent Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Retrieves the agent associated with a sender. Returns an AgentResponse. ```APIDOC ## GET /v1/senders/{senderId}/agent ### Description Retrieves the agent for a sender. ### Method GET ### Endpoint /v1/senders/{senderId}/agent ### Parameters #### Path Parameters - **senderId** (string) - Required - The ID of the sender. ### Response #### Success Response (200) - **AgentResponse** - The agent response. ``` -------------------------------- ### Manually paginate with hasNextPage and getNextPage Source: https://github.com/zavudev/sdk-typescript/blob/main/README.md Request a single page at a time and manually paginate using the `hasNextPage()` and `getNextPage()` convenience methods. This gives you control over when to fetch the next page. ```ts let page = await client.messages.list(); for (const message of page.items) { console.log(message); } // Convenience methods are provided for manually paginating: while (page.hasNextPage()) { page = await page.getNextPage(); // ... } ``` -------------------------------- ### Iterate all pages with for await Source: https://github.com/zavudev/sdk-typescript/blob/main/README.md Use the `for await ... of` syntax to iterate through all pages of a paginated list method. The client automatically fetches subsequent pages as needed, so you can collect items without manual pagination. ```ts async function fetchAllMessages(params) { const allMessages = []; // Automatically fetches more pages as needed. for await (const message of client.messages.list()) { allMessages.push(message); } return allMessages; } ``` -------------------------------- ### GET /v1/messages/{messageId}/attachments Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Lists attachments for a specific message. Returns a MessageListAttachmentsResponse. ```APIDOC ## GET /v1/messages/{messageId}/attachments ### Description Retrieves the list of attachments associated with a message. ### Method GET ### Endpoint /v1/messages/{messageId}/attachments ### Parameters #### Path Parameters - **messageId** (string) - Required - The unique identifier of the message. ### Response #### Success Response (200) - **MessageListAttachmentsResponse** - The list of attachments. #### Response Example ```json { "attachments": [ { "id": "att_1", "url": "https://example.com/file.pdf" } ] } ``` ``` -------------------------------- ### GET /v1/messages/{messageId} Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Retrieves a single message by its ID. Returns a MessageResponse object. ```APIDOC ## GET /v1/messages/{messageId} ### Description Retrieves a single message by its unique identifier. ### Method GET ### Endpoint /v1/messages/{messageId} ### Parameters #### Path Parameters - **messageId** (string) - Required - The unique identifier of the message to retrieve. ### Response #### Success Response (200) - **MessageResponse** - The message details. #### Response Example ```json { "id": "msg_123", "type": "text", "content": "Hello world" } ``` ``` -------------------------------- ### POST /v1/functions/{functionId}/deploy Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Deploys a function. This method is called as client.functions.deploy(functionID, { ...params }) and returns a FunctionDeployResponse. ```APIDOC ## POST /v1/functions/{functionId}/deploy ### Description Deploys a function. ### Method POST ### Endpoint /v1/functions/{functionId}/deploy ### Parameters #### Path Parameters - functionId (string) - Required - The ID of the function to deploy. #### Request Body - params (object) - Required - Parameters for deploying the function. ### Request Example (No example provided) ### Response #### Success Response (200) - FunctionDeployResponse #### Response Example (No example provided) ``` -------------------------------- ### GET /v1/email-domains Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Lists email domains. This method is available on the client as client.emailDomains.list and returns an EmailDomainListResponse. ```APIDOC ## GET /v1/email-domains ### Description Lists email domains. ### Method GET ### Endpoint /v1/email-domains ### Response #### Success Response (200) - EmailDomainListResponse - A list of email domains. #### Response Example { "data": [] } ``` -------------------------------- ### POST /v1/urls Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Submits a URL for verification. Returns a URLSubmitForVerificationResponse. ```APIDOC ## POST /v1/urls ### Description Submits a URL for verification. ### Method POST ### Endpoint /v1/urls ### Parameters #### Request Body - params (object) - Required - URL submission parameters. ### Response #### Success Response (200) - URLSubmitForVerificationResponse - The submission result. ``` -------------------------------- ### POST /v1/templates/sync Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Syncs templates with an external system. This method is called as client.templates.sync({ ...params }) and returns a TemplateSyncResponse. ```APIDOC ## POST /v1/templates/sync ### Description Syncs templates with an external system. ### Method POST ### Endpoint /v1/templates/sync ### Parameters #### Request Body - params (object) - Required - Sync parameters. ### Request Example { "params": {} } ### Response #### Success Response (200) - TemplateSyncResponse object #### Response Example { "synced": true } ``` -------------------------------- ### GET /v1/sub-accounts Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Lists all sub-accounts. This method is called via client.subAccounts.list(params) and returns a SubAccountsCursor. ```APIDOC ## GET /v1/sub-accounts ### Description Lists all sub-accounts. ### Method GET ### Endpoint /v1/sub-accounts ### Parameters #### Query Parameters - **params** (object) - Optional - Query parameters for filtering or pagination. ### Response #### Success Response (200) - **SubAccountsCursor** - A cursor for paginating through sub-accounts. #### Response Example ```json { "data": [ { "id": "sub_123", "name": "Sub Account Name" } ] } ``` ``` -------------------------------- ### client.phoneNumbers.searchAvailable Source: https://github.com/zavudev/sdk-typescript/blob/main/api.md Searches for available phone numbers using the GET /v1/phone-numbers/available endpoint. Returns a PhoneNumberSearchAvailableResponse. ```APIDOC ## GET /v1/phone-numbers/available ### Description Searches for available phone numbers. ### Method GET ### Endpoint /v1/phone-numbers/available ### Parameters #### Query Parameters - params (object) - Optional - Query parameters for searching available numbers. ### Response #### Success Response (200) - PhoneNumberSearchAvailableResponse - The search results. ```