Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.zapier.com/llms.txt

Use this file to discover all available pages before exploring further.

This page documents all available methods in the Zapier SDK.

Installation

npm install @zapier/zapier-sdk
npm install -D @zapier/zapier-sdk-cli @types/node typescript

Initialization

Option 1: Browser-based auth Running npx zapier-sdk login authenticates through your browser and stores a token on your local machine. As long as you have the CLI package installed as a development dependency, the SDK will automatically use it.
import { createZapierSdk } from "@zapier/zapier-sdk";

const zapier = createZapierSdk();
Option 2: Client credentials Provide a client ID and client secret. You can get these by running npx zapier-sdk create-client-credentials. This allows you to run the SDK in a server/serverless environment.
import { createZapierSdk } from "@zapier/zapier-sdk";

const zapier = createZapierSdk({
  credentials: {
    clientId: "your_client_id",
    clientSecret: "your_client_secret",
  },
});
Option 3: Direct token Provide a valid Zapier token. This is for partner OAuth or internal Zapier use.
import { createZapierSdk } from "@zapier/zapier-sdk";

const zapier = createZapierSdk({
  credentials: "your_zapier_token_here",
});

Accounts

getProfile

Get current user’s profile information Parameters:
NameTypeRequiredDescription
optionsobjectNo
Returns: Promise<ProfileItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYes
​ ↳ first_namestringYes
​ ↳ last_namestringYes
​ ↳ full_namestringYes
​ ↳ emailstringYes
​ ↳ email_confirmedbooleanYes
​ ↳ timezonestringYes
Example:
const { data: profile } = await zapier.getProfile();

Actions

getAction

Get detailed information about a specific action Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ appstringYesApp slug (e.g., ‘github’), implementation name (e.g., ‘SlackCLIAPI’), or versioned ID (e.g., ‘github@1.2.3’)
​ ↳ actionTypestringYesAction type that matches the action’s defined type
​ ↳ actionstringYesAction key (e.g., ‘send_message’ or ‘find_row’)
Returns: Promise<ActionItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringNo
​ ↳ keystringYes
​ ↳ descriptionstringYes
​ ↳ is_importantbooleanNo
​ ↳ is_hiddenbooleanNo
​ ↳ app_keystringYes
​ ↳ app_versionstringNo
​ ↳ action_typestringYes
​ ↳ titlestringYes
​ ↳ typestringYes
Example:
const { data: action } = await zapier.getAction({
  app: "example-app",
  actionType: "read",
  action: "example-action",
});

getActionInputFieldsSchema

Get the JSON Schema representation of input fields for an action. Returns a JSON Schema object describing the structure, types, and validation rules for the action’s input parameters. Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ appstringYesApp key (e.g., ‘SlackCLIAPI’ or slug like ‘github’) to get the input schema for
​ ↳ actionTypestringYesAction type that matches the action’s defined type
​ ↳ actionstringYesAction key to get the input schema for
​ ↳ connectionstring, numberNoConnection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. Mutually exclusive with connectionId.
​ ↳ inputsobjectNoCurrent input values that may affect the schema (e.g., when fields depend on other field values)
Returns: Promise<InputSchemaItem> Example:
const { data: inputSchema } = await zapier.getActionInputFieldsSchema({
  app: "example-app",
  actionType: "read",
  action: "example-action",
});

listActionInputFieldChoices

Get the available choices for a dynamic dropdown input field Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ appstringYesApp slug (e.g., ‘github’), implementation name (e.g., ‘SlackCLIAPI’), or versioned ID (e.g., ‘github@1.2.3’)
​ ↳ actionTypestringYesAction type that matches the action’s defined type
​ ↳ actionstringYesAction key (e.g., ‘send_message’ or ‘find_row’)
​ ↳ inputFieldstringYesInput field key to get choices for
​ ↳ connectionstring, numberNoConnection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. Mutually exclusive with connectionId.
​ ↳ inputsobjectNoCurrent input values that may affect available choices
​ ↳ pagenumberNoPage number for paginated results
​ ↳ pageSizenumberNoNumber of choices per page
​ ↳ maxItemsnumberNoMaximum total items to return across all pages
​ ↳ cursorstringNoCursor to start from
Returns: Promise<PaginatedResult<InputFieldChoiceItem>>
NameTypeRequiredDescription
data[]object[]Yes
​ ↳ keystringNo
​ ↳ labelstringNo
​ ↳ samplestringNo
​ ↳ valuestringNo
nextCursorstringNoCursor for the next page; omitted when there are no more pages
Example:
// Get first page and a cursor for the second page
const { data: inputFieldChoices, nextCursor } =
  await zapier.listActionInputFieldChoices({
    app: "example-app",
    actionType: "read",
    action: "example-action",
    inputField: "example-input-field",
  });

// Or iterate over all pages
for await (const page of zapier.listActionInputFieldChoices({
  app: "example-app",
  actionType: "read",
  action: "example-action",
  inputField: "example-input-field",
})) {
  // Do something with each page
}

// Or iterate over individual items across all pages
for await (const inputFieldChoice of zapier
  .listActionInputFieldChoices({
    app: "example-app",
    actionType: "read",
    action: "example-action",
    inputField: "example-input-field",
  })
  .items()) {
  // Do something with each inputFieldChoice
}

listActionInputFields

Get the input fields required for a specific action Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ appstringYesApp slug (e.g., ‘github’), implementation name (e.g., ‘SlackCLIAPI’), or versioned ID (e.g., ‘github@1.2.3’)
​ ↳ actionTypestringYesAction type that matches the action’s defined type
​ ↳ actionstringYesAction key (e.g., ‘send_message’ or ‘find_row’)
​ ↳ connectionstring, numberNoConnection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. Mutually exclusive with connectionId.
​ ↳ inputsobjectNoCurrent input values that may affect available fields
​ ↳ pageSizenumberNoNumber of input fields per page
​ ↳ maxItemsnumberNoMaximum total items to return across all pages
​ ↳ cursorstringNoCursor to start from
Returns: Promise<PaginatedResult<RootFieldItem>>
NameTypeRequiredDescription
data[]object[]YesOne of the variants below, distinguished by type
nextCursorstringNoCursor for the next page; omitted when there are no more pages
When type is "input_field":
NameTypeRequiredDescription
typestringYes
keystringYes
default_valuestringYes
depends_onarrayYes
descriptionstringYes
invalidates_input_fieldsbooleanYes
is_requiredbooleanYes
placeholderstringYes
titlestringYes
value_typestringYes
formatstringNo
itemsobjectNo
​ ↳ typestringYes
When type is "info_field":
NameTypeRequiredDescription
typestringYes
keystringYes
descriptionstringYes
titlestringNo
When type is "fieldset":
NameTypeRequiredDescription
typestringYes
keystringYes
titlestringYes
fieldsarrayYes
Example:
// Get first page and a cursor for the second page
const { data: rootFields, nextCursor } = await zapier.listActionInputFields({
  app: "example-app",
  actionType: "read",
  action: "example-action",
});

// Or iterate over all pages
for await (const page of zapier.listActionInputFields({
  app: "example-app",
  actionType: "read",
  action: "example-action",
})) {
  // Do something with each page
}

// Or iterate over individual items across all pages
for await (const rootField of zapier
  .listActionInputFields({
    app: "example-app",
    actionType: "read",
    action: "example-action",
  })
  .items()) {
  // Do something with each rootField
}

listActions

List all actions for a specific app Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ appstringYesApp key of actions to list (e.g., ‘SlackCLIAPI’ or slug like ‘github’)
​ ↳ actionTypestringNoFilter actions by type
​ ↳ pageSizenumberNoNumber of actions per page
​ ↳ maxItemsnumberNoMaximum total items to return across all pages
​ ↳ cursorstringNoCursor to start from
Returns: Promise<PaginatedResult<ActionItem>>
NameTypeRequiredDescription
data[]object[]Yes
​ ↳ idstringNo
​ ↳ keystringYes
​ ↳ descriptionstringYes
​ ↳ is_importantbooleanNo
​ ↳ is_hiddenbooleanNo
​ ↳ app_keystringYes
​ ↳ app_versionstringNo
​ ↳ action_typestringYes
​ ↳ titlestringYes
​ ↳ typestringYes
nextCursorstringNoCursor for the next page; omitted when there are no more pages
Example:
// Get first page and a cursor for the second page
const { data: actions, nextCursor } = await zapier.listActions({
  app: "example-app",
});

// Or iterate over all pages
for await (const page of zapier.listActions({
  app: "example-app",
})) {
  // Do something with each page
}

// Or iterate over individual items across all pages
for await (const action of zapier
  .listActions({
    app: "example-app",
  })
  .items()) {
  // Do something with each action
}

runAction

Execute an action with the given inputs Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ appstringYesApp slug (e.g., ‘github’), implementation name (e.g., ‘SlackCLIAPI’), or versioned ID (e.g., ‘github@1.2.3’)
​ ↳ actionTypestringYesAction type that matches the action’s defined type
​ ↳ actionstringYesAction key (e.g., ‘send_message’ or ‘find_row’)
​ ↳ connectionstring, numberNoConnection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. Mutually exclusive with connectionId.
​ ↳ inputsobjectNoInput parameters for the action
​ ↳ timeoutMsnumberNoMaximum time to wait for action completion in milliseconds (default: 180000)
​ ↳ pageSizenumberNoNumber of results per page
​ ↳ maxItemsnumberNoMaximum total items to return across all pages
​ ↳ cursorstringNoCursor to start from
Returns: Promise<PaginatedResult<ActionResultItem>> Example:
// Get first page and a cursor for the second page
const { data: actionResults, nextCursor } = await zapier.runAction({
  app: "example-app",
  actionType: "read",
  action: "example-action",
});

// Or iterate over all pages
for await (const page of zapier.runAction({
  app: "example-app",
  actionType: "read",
  action: "example-action",
})) {
  // Do something with each page
}

// Or iterate over individual items across all pages
for await (const actionResult of zapier
  .runAction({
    app: "example-app",
    actionType: "read",
    action: "example-action",
  })
  .items()) {
  // Do something with each actionResult
}

Apps

apps.{appKey}

Bind a connection alias or numeric connectionId to an app Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ connectionstring, numberNoConnection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly.
Returns: Promise<AppProxy> Example:
const result = await zapier.apps.appKey();

apps.{appKey}.{actionType}.{actionKey}

Execute an action with the given inputs for the bound app, as an alternative to runAction Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ inputsobjectNo
​ ↳ connectionstring, numberNoConnection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly.
​ ↳ timeoutMsnumberNoMaximum time to wait for action completion in milliseconds (default: 180000)
Returns: Promise<PaginatedResult<ActionResultItem>> Example:
// Get first page and a cursor for the second page
const { data: actionResults, nextCursor } =
  await zapier.apps.appKey.actionType.actionKey();

// Or iterate over all pages
for await (const page of zapier.apps.appKey.actionType.actionKey()) {
  // Do something with each page
}

// Or iterate over individual items across all pages
for await (const actionResult of zapier.apps.appKey.actionType
  .actionKey()
  .items()) {
  // Do something with each actionResult
}

getApp

Get detailed information about a specific app Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ appstringYesApp slug (e.g., ‘github’), implementation name (e.g., ‘SlackCLIAPI’), or versioned ID (e.g., ‘github@1.2.3’)
Returns: Promise<AppItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ slugstringYesURL-friendly slug identifier
​ ↳ age_in_daysnumberNoNumber of days since the implementation was created
​ ↳ auth_typestringNoAuthentication type (e.g., oauth2, api_key)
​ ↳ bannerstringNoBanner message or status indicator
​ ↳ categories[]object[]NoCategories the implementation belongs to
​   ↳ idnumberYesUnique identifier for the category
​   ↳ namestringYesDisplay name of the category
​   ↳ slugstringYesURL-friendly slug for the category
​ ↳ imagesobjectNoIcon images at various sizes
​   ↳ url_16x16stringNo16x16 pixel icon URL
​   ↳ url_32x32stringNo32x32 pixel icon URL
​   ↳ url_64x64stringNo64x64 pixel icon URL
​   ↳ url_128x128stringNo128x128 pixel icon URL
​ ↳ popularitynumberNoPopularity score for ranking apps
​ ↳ has_filtersbooleanNoWhether the app has filter actions
​ ↳ has_readsbooleanNoWhether the app has read actions
​ ↳ has_searchesbooleanNoWhether the app has search actions
​ ↳ has_searches_or_writesbooleanNoWhether the app has search or write actions
​ ↳ has_upfront_fieldsbooleanNoWhether the app has upfront input fields
​ ↳ has_writesbooleanNoWhether the app has write actions
​ ↳ is_betabooleanNoWhether the app is in beta
​ ↳ is_built_inbooleanNoWhether the app is a built-in Zapier app
​ ↳ is_deprecatedbooleanNoWhether the app is deprecated
​ ↳ is_featuredbooleanNoWhether the app is featured
​ ↳ is_hiddenbooleanNoWhether the app is hidden from listings
​ ↳ is_invitebooleanNoWhether the app is invite-only
​ ↳ is_premiumbooleanNoWhether the app requires a premium plan
​ ↳ is_publicbooleanNoWhether the app is publicly available
​ ↳ is_upcomingbooleanNoWhether the app is upcoming/not yet released
​ ↳ versionstringNoApp version
​ ↳ visibilitystringNoVisibility status (e.g., public, private)
​ ↳ actionsobjectNoCount of available actions by type
​   ↳ readnumberNoNumber of read actions
​   ↳ read_bulknumberNoNumber of bulk read actions
​   ↳ writenumberNoNumber of write actions
​   ↳ searchnumberNoNumber of search actions
​   ↳ search_or_writenumberNoNumber of search-or-write actions
​   ↳ search_and_writenumberNoNumber of search-and-write actions
​   ↳ filternumberNoNumber of filter actions
​ ↳ descriptionstringNoDescription of the app
​ ↳ primary_colorstringNoPrimary brand color (hex)
​ ↳ secondary_colorstringNoSecondary brand color (hex)
​ ↳ classificationstringNoApp classification category
​ ↳ api_docs_urlstringNoURL to API documentation
​ ↳ imagestringNoDefault image URL for the app
​ ↳ titlestringYesDisplay name of the app
​ ↳ keystringYesApp key (versionless implementation name)
​ ↳ implementation_idstringYesFull implementation ID including version
Example:
const { data: app } = await zapier.getApp({
  app: "example-app",
});

listApps

List all available apps with optional filtering Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ searchstringNoSearch term to filter apps by name
​ ↳ pageSizenumberNoNumber of apps per page
​ ↳ appsarrayNoFilter apps by app keys (e.g., ‘SlackCLIAPI’ or slug like ‘github’)
​ ↳ maxItemsnumberNoMaximum total items to return across all pages
​ ↳ cursorstringNoCursor to start from
Returns: Promise<PaginatedResult<AppItem>>
NameTypeRequiredDescription
data[]object[]Yes
​ ↳ slugstringYesURL-friendly slug identifier
​ ↳ age_in_daysnumberNoNumber of days since the implementation was created
​ ↳ auth_typestringNoAuthentication type (e.g., oauth2, api_key)
​ ↳ bannerstringNoBanner message or status indicator
​ ↳ categories[]object[]NoCategories the implementation belongs to
​   ↳ idnumberYesUnique identifier for the category
​   ↳ namestringYesDisplay name of the category
​   ↳ slugstringYesURL-friendly slug for the category
​ ↳ imagesobjectNoIcon images at various sizes
​   ↳ url_16x16stringNo16x16 pixel icon URL
​   ↳ url_32x32stringNo32x32 pixel icon URL
​   ↳ url_64x64stringNo64x64 pixel icon URL
​   ↳ url_128x128stringNo128x128 pixel icon URL
​ ↳ popularitynumberNoPopularity score for ranking apps
​ ↳ has_filtersbooleanNoWhether the app has filter actions
​ ↳ has_readsbooleanNoWhether the app has read actions
​ ↳ has_searchesbooleanNoWhether the app has search actions
​ ↳ has_searches_or_writesbooleanNoWhether the app has search or write actions
​ ↳ has_upfront_fieldsbooleanNoWhether the app has upfront input fields
​ ↳ has_writesbooleanNoWhether the app has write actions
​ ↳ is_betabooleanNoWhether the app is in beta
​ ↳ is_built_inbooleanNoWhether the app is a built-in Zapier app
​ ↳ is_deprecatedbooleanNoWhether the app is deprecated
​ ↳ is_featuredbooleanNoWhether the app is featured
​ ↳ is_hiddenbooleanNoWhether the app is hidden from listings
​ ↳ is_invitebooleanNoWhether the app is invite-only
​ ↳ is_premiumbooleanNoWhether the app requires a premium plan
​ ↳ is_publicbooleanNoWhether the app is publicly available
​ ↳ is_upcomingbooleanNoWhether the app is upcoming/not yet released
​ ↳ versionstringNoApp version
​ ↳ visibilitystringNoVisibility status (e.g., public, private)
​ ↳ actionsobjectNoCount of available actions by type
​   ↳ readnumberNoNumber of read actions
​   ↳ read_bulknumberNoNumber of bulk read actions
​   ↳ writenumberNoNumber of write actions
​   ↳ searchnumberNoNumber of search actions
​   ↳ search_or_writenumberNoNumber of search-or-write actions
​   ↳ search_and_writenumberNoNumber of search-and-write actions
​   ↳ filternumberNoNumber of filter actions
​ ↳ descriptionstringNoDescription of the app
​ ↳ primary_colorstringNoPrimary brand color (hex)
​ ↳ secondary_colorstringNoSecondary brand color (hex)
​ ↳ classificationstringNoApp classification category
​ ↳ api_docs_urlstringNoURL to API documentation
​ ↳ imagestringNoDefault image URL for the app
​ ↳ titlestringYesDisplay name of the app
​ ↳ keystringYesApp key (versionless implementation name)
​ ↳ implementation_idstringYesFull implementation ID including version
nextCursorstringNoCursor for the next page; omitted when there are no more pages
Example:
// Get first page and a cursor for the second page
const { data: apps, nextCursor } = await zapier.listApps();

// Or iterate over all pages
for await (const page of zapier.listApps()) {
  // Do something with each page
}

// Or iterate over individual items across all pages
for await (const app of zapier.listApps().items()) {
  // Do something with each app
}

Client Credentials

createClientCredentials

Create new client credentials for the authenticated user Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ namestringYesHuman-readable name for the client credentials
​ ↳ allowedScopesarrayNoScopes to allow for these credentials
Returns: Promise<ClientCredentialsItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ client_idstringYesThe public identifier (Client ID) of the OAuth application
​ ↳ namestringYesHuman-readable name of the OAuth application
​ ↳ client_secretstringYesThe client secret (only shown once on creation)
Example:
const result = await zapier.createClientCredentials({
  name: "example-name",
});

deleteClientCredentials

Delete client credentials by client ID Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ clientIdstringYesThe client ID of the client credentials to delete
Returns: Promise<{ success: boolean }> Example:
const result = await zapier.deleteClientCredentials({
  clientId: "example-client-id",
});

listClientCredentials

List client credentials for the authenticated user Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ pageSizenumberNoNumber of credentials per page
​ ↳ maxItemsnumberNoMaximum total items to return across all pages
​ ↳ cursorstringNoCursor to start from
Returns: Promise<PaginatedResult<ClientCredentialsItem>>
NameTypeRequiredDescription
data[]object[]Yes
​ ↳ client_idstringYesThe public identifier (Client ID) of the OAuth application
​ ↳ namestringYesHuman-readable name of the OAuth application
​ ↳ allowed_scopesarrayYesList of OAuth scopes that this application is allowed to request
​ ↳ created_atstringNoWhen the application was created (ISO 8601)
​ ↳ updated_atstringNoWhen the application was last updated (ISO 8601)
nextCursorstringNoCursor for the next page; omitted when there are no more pages
Example:
// Get first page and a cursor for the second page
const { data: clientCredentials, nextCursor } =
  await zapier.listClientCredentials();

// Or iterate over all pages
for await (const page of zapier.listClientCredentials()) {
  // Do something with each page
}

// Or iterate over individual items across all pages
for await (const clientCredentials of zapier.listClientCredentials().items()) {
  // Do something with each clientCredentials
}

Connections

findFirstConnection

Find the first connection matching the criteria Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ searchstringNoSearch term to filter connections by title
​ ↳ titlestringNoFilter connections by exact title match (searches first, then filters locally)
​ ↳ ownerstringNoFilter by owner, ‘me’ for your own connections or a specific user ID
​ ↳ appstringNoApp key of connections to list (e.g., ‘SlackCLIAPI’ or slug like ‘github’)
​ ↳ accountstringNoAccount to filter by
​ ↳ includeSharedbooleanNoInclude connections shared with you. By default, only your own connections are returned (owner=me). Set to true to also include shared connections.
​ ↳ expiredbooleanNoShow only expired connections (default: only non-expired connections are returned)
Returns: Promise<ConnectionItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYesUnique identifier for the connection
​ ↳ datestringYesDate created
​ ↳ lastchangedstringNoDate last changed
​ ↳ account_idstringYesAccount ID associated with this connection
​ ↳ destination_selected_apistringNoDestination API key (if applicable)
​ ↳ is_invite_onlybooleanYesWhether the connection is invite-only
​ ↳ is_privatebooleanYesWhether the connection is private
​ ↳ shared_with_allbooleanYesWhether the connection is shared with all users
​ ↳ is_stalestringNoStale status string
​ ↳ is_sharedstringNoShared status string
​ ↳ marked_stale_atstringNoDate when marked stale
​ ↳ labelstringNoUser label for the connection
​ ↳ identifierstringNoIdentifier
​ ↳ titlestringNoTitle of the connection
​ ↳ urlstringNoURL to the connection resource
​ ↳ groupsarrayNoArray of groups associated with the connection
​ ↳ membersstringNoMembers associated with the connection
​ ↳ permissionsobjectNoPermissions for the connection
​ ↳ public_idstringNoPublic UUID for the connection
​ ↳ account_public_idstringNoPublic UUID for the associated account
​ ↳ customuser_public_idstringNoPublic UUID for the associated custom user
​ ↳ implementation_idstringNoImplementation ID (was selected_api)
​ ↳ profile_idstringNoProfile ID (was customuser_id)
​ ↳ is_expiredstringNoWhether the connection is expired (mapped from is_stale)
​ ↳ expired_atstringNoDate when connection expired (mapped from marked_stale_at)
​ ↳ app_keystringNoApp Key extracted from implementation_id
​ ↳ app_versionstringNoApp Version extracted from implementation_id
Example:
const { data: connection } = await zapier.findFirstConnection();

findUniqueConnection

Find a unique connection matching the criteria Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ searchstringNoSearch term to filter connections by title
​ ↳ titlestringNoFilter connections by exact title match (searches first, then filters locally)
​ ↳ ownerstringNoFilter by owner, ‘me’ for your own connections or a specific user ID
​ ↳ appstringNoApp key of connections to list (e.g., ‘SlackCLIAPI’ or slug like ‘github’)
​ ↳ accountstringNoAccount to filter by
​ ↳ includeSharedbooleanNoInclude connections shared with you. By default, only your own connections are returned (owner=me). Set to true to also include shared connections.
​ ↳ expiredbooleanNoShow only expired connections (default: only non-expired connections are returned)
Returns: Promise<ConnectionItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYesUnique identifier for the connection
​ ↳ datestringYesDate created
​ ↳ lastchangedstringNoDate last changed
​ ↳ account_idstringYesAccount ID associated with this connection
​ ↳ destination_selected_apistringNoDestination API key (if applicable)
​ ↳ is_invite_onlybooleanYesWhether the connection is invite-only
​ ↳ is_privatebooleanYesWhether the connection is private
​ ↳ shared_with_allbooleanYesWhether the connection is shared with all users
​ ↳ is_stalestringNoStale status string
​ ↳ is_sharedstringNoShared status string
​ ↳ marked_stale_atstringNoDate when marked stale
​ ↳ labelstringNoUser label for the connection
​ ↳ identifierstringNoIdentifier
​ ↳ titlestringNoTitle of the connection
​ ↳ urlstringNoURL to the connection resource
​ ↳ groupsarrayNoArray of groups associated with the connection
​ ↳ membersstringNoMembers associated with the connection
​ ↳ permissionsobjectNoPermissions for the connection
​ ↳ public_idstringNoPublic UUID for the connection
​ ↳ account_public_idstringNoPublic UUID for the associated account
​ ↳ customuser_public_idstringNoPublic UUID for the associated custom user
​ ↳ implementation_idstringNoImplementation ID (was selected_api)
​ ↳ profile_idstringNoProfile ID (was customuser_id)
​ ↳ is_expiredstringNoWhether the connection is expired (mapped from is_stale)
​ ↳ expired_atstringNoDate when connection expired (mapped from marked_stale_at)
​ ↳ app_keystringNoApp Key extracted from implementation_id
​ ↳ app_versionstringNoApp Version extracted from implementation_id
Example:
const { data: connection } = await zapier.findUniqueConnection();

getConnection

Execute getConnection Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ connectionstring, numberNoConnection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly.
Returns: Promise<ConnectionItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYesUnique identifier for the connection
​ ↳ datestringYesDate created
​ ↳ lastchangedstringNoDate last changed
​ ↳ account_idstringYesAccount ID associated with this connection
​ ↳ destination_selected_apistringNoDestination API key (if applicable)
​ ↳ is_invite_onlybooleanYesWhether the connection is invite-only
​ ↳ is_privatebooleanYesWhether the connection is private
​ ↳ shared_with_allbooleanYesWhether the connection is shared with all users
​ ↳ is_stalestringNoStale status string
​ ↳ is_sharedstringNoShared status string
​ ↳ marked_stale_atstringNoDate when marked stale
​ ↳ labelstringNoUser label for the connection
​ ↳ identifierstringNoIdentifier
​ ↳ titlestringNoTitle of the connection
​ ↳ urlstringNoURL to the connection resource
​ ↳ groupsarrayNoArray of groups associated with the connection
​ ↳ membersstringNoMembers associated with the connection
​ ↳ permissionsobjectNoPermissions for the connection
​ ↳ public_idstringNoPublic UUID for the connection
​ ↳ account_public_idstringNoPublic UUID for the associated account
​ ↳ customuser_public_idstringNoPublic UUID for the associated custom user
​ ↳ implementation_idstringNoImplementation ID (was selected_api)
​ ↳ profile_idstringNoProfile ID (was customuser_id)
​ ↳ is_expiredstringNoWhether the connection is expired (mapped from is_stale)
​ ↳ expired_atstringNoDate when connection expired (mapped from marked_stale_at)
​ ↳ app_keystringNoApp Key extracted from implementation_id
​ ↳ app_versionstringNoApp Version extracted from implementation_id
Example:
const { data: connection } = await zapier.getConnection();

listConnections

List available connections with optional filtering Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ searchstringNoSearch term to filter connections by title
​ ↳ titlestringNoFilter connections by exact title match (searches first, then filters locally)
​ ↳ ownerstringNoFilter by owner, ‘me’ for your own connections or a specific user ID
​ ↳ appstringNoApp key of connections to list (e.g., ‘SlackCLIAPI’ or slug like ‘github’)
​ ↳ connectionsarrayNoList of connection IDs to filter by
​ ↳ accountstringNoAccount to filter by
​ ↳ includeSharedbooleanNoInclude connections shared with you. By default, only your own connections are returned (owner=me). Set to true to also include shared connections.
​ ↳ expiredbooleanNoShow only expired connections (default: only non-expired connections are returned)
​ ↳ pageSizenumberNoNumber of connections per page
​ ↳ maxItemsnumberNoMaximum total items to return across all pages
​ ↳ cursorstringNoCursor to start from
Returns: Promise<PaginatedResult<ConnectionItem>>
NameTypeRequiredDescription
data[]object[]Yes
​ ↳ idstringYesUnique identifier for the connection
​ ↳ datestringYesDate created
​ ↳ lastchangedstringNoDate last changed
​ ↳ account_idstringYesAccount ID associated with this connection
​ ↳ destination_selected_apistringNoDestination API key (if applicable)
​ ↳ is_invite_onlybooleanYesWhether the connection is invite-only
​ ↳ is_privatebooleanYesWhether the connection is private
​ ↳ shared_with_allbooleanYesWhether the connection is shared with all users
​ ↳ is_stalestringNoStale status string
​ ↳ is_sharedstringNoShared status string
​ ↳ marked_stale_atstringNoDate when marked stale
​ ↳ labelstringNoUser label for the connection
​ ↳ identifierstringNoIdentifier
​ ↳ titlestringNoTitle of the connection
​ ↳ urlstringNoURL to the connection resource
​ ↳ groupsarrayNoArray of groups associated with the connection
​ ↳ membersstringNoMembers associated with the connection
​ ↳ permissionsobjectNoPermissions for the connection
​ ↳ public_idstringNoPublic UUID for the connection
​ ↳ account_public_idstringNoPublic UUID for the associated account
​ ↳ customuser_public_idstringNoPublic UUID for the associated custom user
​ ↳ implementation_idstringNoImplementation ID (was selected_api)
​ ↳ profile_idstringNoProfile ID (was customuser_id)
​ ↳ is_expiredstringNoWhether the connection is expired (mapped from is_stale)
​ ↳ expired_atstringNoDate when connection expired (mapped from marked_stale_at)
​ ↳ app_keystringNoApp Key extracted from implementation_id
​ ↳ app_versionstringNoApp Version extracted from implementation_id
nextCursorstringNoCursor for the next page; omitted when there are no more pages
Example:
// Get first page and a cursor for the second page
const { data: connections, nextCursor } = await zapier.listConnections();

// Or iterate over all pages
for await (const page of zapier.listConnections()) {
  // Do something with each page
}

// Or iterate over individual items across all pages
for await (const connection of zapier.listConnections().items()) {
  // Do something with each connection
}

HTTP Requests

fetch

Make authenticated HTTP requests to any API through Zapier. Pass a connectionId to automatically inject the user’s stored credentials (OAuth tokens, API keys, etc.) into the outgoing request. Mirrors the native fetch(url, init?) signature with additional Zapier-specific options. Parameters:
NameTypeRequiredDescription
urlstring, customYesThe full URL of the API endpoint to call (proxied through Zapier’s Relay service)
initobjectNoRequest options including method, headers, body, and authentication
​ ↳ methodstringNoHTTP method for the request (defaults to GET)
​ ↳ headersobjectNoHTTP headers to include in the request
​ ↳ bodystring, custom, recordNoRequest body — plain objects and JSON strings are auto-detected and Content-Type is set accordingly
​ ↳ connectionstring, numberNoConnection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly.
​ ↳ callbackUrlstringNoURL to send async response to (makes request async)
​ ↳ maxTimenumberNoMaximum seconds to wait for a response. Honored on a best-effort basis; the server may silently enforce a lower ceiling.
Returns: Promise<Response> Example:
const result = await zapier.fetch("https://example.com", {});

Tables

createTable

Create a new table Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ namestringYesThe name for the new table
​ ↳ descriptionstringNoAn optional description of the table
Returns: Promise<TableItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYes
​ ↳ namestringYes
​ ↳ descriptionstringNo
​ ↳ created_atstringYes
​ ↳ edited_atstringYes
​ ↳ kindstringYes
​ ↳ account_idstringYes
​ ↳ profile_idstringYes
​ ↳ parent_table_idstringNo
Example:
const result = await zapier.createTable({
  name: "example-name",
});

createTableFields

Create one or more fields in a table Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ tablestringYesThe unique identifier of the table
​ ↳ fields[]object[]YesArray of field definitions to create
​   ↳ typestringYesThe data type of the field
​   ↳ namestringYesThe display name of the field
​   ↳ optionsobjectNoData configuration options for the field
​   ↳ configobjectNoDisplay configuration for the field
Returns: Promise<FieldItem[]>
NameTypeRequiredDescription
data[]object[]Yes
​ ↳ idstringYes
​ ↳ typestringYes
​ ↳ namestringYes
​ ↳ created_atstringNo
​ ↳ edited_atstringNo
​ ↳ optionsobjectNo
​ ↳ configobjectNo
​ ↳ deleted_atstringNo
Example:
const result = await zapier.createTableFields({
  table: "example-table",
  fields: [
    {
      type: "string",
      name: "example-name",
    },
  ],
});

createTableRecords

Create one or more records in a table Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ tablestringYesThe unique identifier of the table
​ ↳ records[]object[]YesArray of records to create (max 100)
​   ↳ dataobjectYesThe field values for the record, keyed by field ID
​ ↳ keyModestringNoHow to interpret field keys in record data. “names” (default) uses human-readable field names, “ids” uses raw field IDs (f1, f2).
Returns: Promise<RecordItem[]>
NameTypeRequiredDescription
data[]object[]Yes
​ ↳ idstringYes
​ ↳ dataobjectYes
​ ↳ created_atstringYes
​ ↳ edited_atstringYes
​ ↳ deleted_atstringNo
Example:
const result = await zapier.createTableRecords({
  table: "example-table",
  records: [
    {
      data: {},
    },
  ],
});

deleteTable

Delete a table by its ID Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ tablestringYesThe unique identifier of the table
Returns: Promise<{ success: boolean }> Example:
const result = await zapier.deleteTable({
  table: "example-table",
});

deleteTableFields

Delete one or more fields from a table Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ tablestringYesThe unique identifier of the table
​ ↳ fieldsarrayYesFields to operate on. Accepts field names (e.g., “Email”) or IDs (e.g., “f6”, “6”, or 6).
Returns: Promise<{ success: boolean }> Example:
const result = await zapier.deleteTableFields({
  table: "example-table",
  fields: ["example-field"],
});

deleteTableRecords

Delete one or more records from a table Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ tablestringYesThe unique identifier of the table
​ ↳ recordsarrayYesRecord IDs to operate on
Returns: Promise<{ success: boolean }> Example:
const result = await zapier.deleteTableRecords({
  table: "example-table",
  records: ["example-record"],
});

getTable

Get detailed information about a specific table Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ tablestringYesThe unique identifier of the table
Returns: Promise<TableItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYes
​ ↳ namestringYes
​ ↳ descriptionstringNo
​ ↳ created_atstringYes
​ ↳ edited_atstringYes
​ ↳ kindstringYes
​ ↳ account_idstringYes
​ ↳ profile_idstringYes
​ ↳ parent_table_idstringNo
Example:
const { data: table } = await zapier.getTable({
  table: "example-table",
});

getTableRecord

Get a single record from a table by ID Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ tablestringYesThe unique identifier of the table
​ ↳ recordstringYesThe unique identifier of the record
​ ↳ keyModestringNoHow to interpret field keys in record data. “names” (default) uses human-readable field names, “ids” uses raw field IDs (f1, f2).
Returns: Promise<RecordItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYes
​ ↳ dataobjectYes
​ ↳ created_atstringYes
​ ↳ edited_atstringYes
​ ↳ deleted_atstringNo
Example:
const { data: record } = await zapier.getTableRecord({
  table: "example-table",
  record: "example-record",
});

listTableFields

List fields for a table Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ tablestringYesThe unique identifier of the table
​ ↳ fieldsarrayNoFields to operate on. Accepts field names (e.g., “Email”) or IDs (e.g., “f6”, “6”, or 6).
​ ↳ trashstringNoControl soft-deleted item visibility. “exclude” (default) returns active items only, “include” returns both active and soft-deleted, “only” returns soft-deleted items only.
Returns: Promise<PaginatedResult<FieldItem>>
NameTypeRequiredDescription
data[]object[]Yes
​ ↳ idstringYes
​ ↳ typestringYes
​ ↳ namestringYes
​ ↳ created_atstringNo
​ ↳ edited_atstringNo
​ ↳ optionsobjectNo
​ ↳ configobjectNo
​ ↳ deleted_atstringNo
nextCursorstringNoCursor for the next page; omitted when there are no more pages
Example:
// Get first page and a cursor for the second page
const { data: fields, nextCursor } = await zapier.listTableFields({
  table: "example-table",
});

// Or iterate over all pages
for await (const page of zapier.listTableFields({
  table: "example-table",
})) {
  // Do something with each page
}

// Or iterate over individual items across all pages
for await (const field of zapier
  .listTableFields({
    table: "example-table",
  })
  .items()) {
  // Do something with each field
}

listTableRecords

List records in a table with optional filtering and sorting Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ tablestringYesThe unique identifier of the table
​ ↳ filters[]object[]NoFilter conditions for the query
​   ↳ fieldKeystringYesThe field key to filter on (e.g. f1, f2)
​   ↳ operatorstringYesThe comparison operator
​   ↳ valuestringNoThe value to compare against
​ ↳ sortobjectNoSort records by a field
​   ↳ fieldKeystringYesThe field key to sort by
​   ↳ directionstringNoSort direction
​ ↳ pageSizenumberNoNumber of records per page (max 1000)
​ ↳ maxItemsnumberNoMaximum total items to return across all pages
​ ↳ cursorstringNoCursor to start from
​ ↳ keyModestringNoHow to interpret field keys in record data. “names” (default) uses human-readable field names, “ids” uses raw field IDs (f1, f2).
​ ↳ trashstringNoControl soft-deleted item visibility. “exclude” (default) returns active items only, “include” returns both active and soft-deleted, “only” returns soft-deleted items only.
Returns: Promise<PaginatedResult<RecordItem>>
NameTypeRequiredDescription
data[]object[]Yes
​ ↳ idstringYes
​ ↳ dataobjectYes
​ ↳ created_atstringYes
​ ↳ edited_atstringYes
​ ↳ deleted_atstringNo
nextCursorstringNoCursor for the next page; omitted when there are no more pages
Example:
// Get first page and a cursor for the second page
const { data: records, nextCursor } = await zapier.listTableRecords({
  table: "example-table",
});

// Or iterate over all pages
for await (const page of zapier.listTableRecords({
  table: "example-table",
})) {
  // Do something with each page
}

// Or iterate over individual items across all pages
for await (const record of zapier
  .listTableRecords({
    table: "example-table",
  })
  .items()) {
  // Do something with each record
}

listTables

List tables available to the authenticated user Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ tablesarrayNoFilter by specific table IDs
​ ↳ kindstringNoFilter by table type
​ ↳ searchstringNoSearch term to filter tables by name
​ ↳ ownerstringNoFilter by table owner. Use “me” for the current user, or a numeric user ID. Requires includeShared to be true.
​ ↳ includeSharedbooleanNoInclude tables shared with you. Without this, only your own tables are returned.
​ ↳ pageSizenumberNoNumber of tables per page
​ ↳ maxItemsnumberNoMaximum total items to return across all pages
​ ↳ cursorstringNoCursor to start from
Returns: Promise<PaginatedResult<TableItem>>
NameTypeRequiredDescription
data[]object[]Yes
​ ↳ idstringYes
​ ↳ namestringYes
​ ↳ descriptionstringNo
​ ↳ created_atstringYes
​ ↳ edited_atstringYes
​ ↳ kindstringYes
​ ↳ account_idstringYes
​ ↳ profile_idstringYes
​ ↳ parent_table_idstringNo
nextCursorstringNoCursor for the next page; omitted when there are no more pages
Example:
// Get first page and a cursor for the second page
const { data: tables, nextCursor } = await zapier.listTables();

// Or iterate over all pages
for await (const page of zapier.listTables()) {
  // Do something with each page
}

// Or iterate over individual items across all pages
for await (const table of zapier.listTables().items()) {
  // Do something with each table
}

updateTableRecords

Update one or more records in a table Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ tablestringYesThe unique identifier of the table
​ ↳ records[]object[]YesArray of records to update (max 100)
​   ↳ idstringYesThe record ID to update
​   ↳ dataobjectYesThe field values to update, keyed by field key
​ ↳ keyModestringNoHow to interpret field keys in record data. “names” (default) uses human-readable field names, “ids” uses raw field IDs (f1, f2).
Returns: Promise<RecordItem[]>
NameTypeRequiredDescription
data[]object[]Yes
​ ↳ idstringYes
​ ↳ dataobjectYes
​ ↳ created_atstringYes
​ ↳ edited_atstringYes
​ ↳ deleted_atstringNo
Example:
const result = await zapier.updateTableRecords({
  table: "example-table",
  records: [
    {
      id: "example-id",
      data: {},
    },
  ],
});

Code Workflows (Experimental)

ℹ️ Experimental. Import from "@zapier/zapier-sdk/experimental" to use these methods. Methods and behavior may change.

cancelDurableRun

Cancel a run-once durable run in initialized or started status. Returns 409 if the run is already terminal. Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ runstringYesDurable run ID
Returns: Promise<DurableRunItem> Example:
const result = await zapier.cancelDurableRun({
  run: "example-run",
});

createWorkflow

Create a durable workflow container. Starts disabled with no version; publish a version to add code. Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ namestringYesWorkflow name
​ ↳ descriptionstringNoOptional description for the workflow
Returns: Promise<WorkflowItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYesWorkflow ID (UUID)
​ ↳ namestringYesWorkflow name
​ ↳ descriptionstringYesWorkflow description (null if unset)
​ ↳ trigger_urlstringYesPublic webhook URL that fires this workflow when POSTed to. Embeds a secret trigger token in the path — treat as sensitive.
​ ↳ enabledbooleanYesWhether the workflow currently accepts triggers. Always false on a new workflow until enabled.
​ ↳ created_atstringYesWhen the workflow was created (ISO-8601)
Example:
const result = await zapier.createWorkflow({
  name: "example-name",
});

deleteWorkflow

Delete a durable workflow. Throws ZapierNotFoundError if the workflow doesn’t exist; callers wanting idempotency should catch that themselves. Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ workflowstringYesDurable workflow ID
Returns: Promise<{ success: boolean }> Example:
const result = await zapier.deleteWorkflow({
  workflow: "example-workflow",
});

disableWorkflow

Disable a durable workflow so it stops accepting triggers Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ workflowstringYesDurable workflow ID
Returns: Promise<WorkflowItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYesWorkflow ID (UUID)
​ ↳ enabledbooleanYesWorkflow’s enabled state after the operation. Typically false; mirrors the row’s true state in case a concurrent enable raced with this call.
Example:
const result = await zapier.disableWorkflow({
  workflow: "example-workflow",
});

enableWorkflow

Enable a durable workflow so it accepts triggers Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ workflowstringYesDurable workflow ID
Returns: Promise<WorkflowItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYesWorkflow ID (UUID)
​ ↳ enabledbooleanYesWorkflow’s enabled state after the operation (always true)
Example:
const result = await zapier.enableWorkflow({
  workflow: "example-workflow",
});

getDurableRun

Get the full state of a run-once durable run, including its operations journal Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ runstringYesDurable run ID
Returns: Promise<DurableRunItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYesRun ID (UUID)
​ ↳ statusstringYesRun lifecycle status. finished / failed / cancelled are terminal.
​ ↳ inputstringYesInput data passed to the run
​ ↳ outputstringYesReturn value, present when status is finished
​ ↳ errorobjectYesStructured error details when the run failed (null otherwise)
​ ↳ executionobjectYesLinked execution, including the operations journal. Null while the run is still in initialized state.
​ ↳ is_privatebooleanYesWhen true, the run is visible only to the creating user; otherwise visible across the account.
​ ↳ created_atstringYesWhen the run was created (ISO-8601)
​ ↳ updated_atstringYesWhen the run was last updated (ISO-8601)
Example:
const { data: durableRun } = await zapier.getDurableRun({
  run: "example-run",
});

getWorkflow

Get a durable workflow with its current version details and trigger claim status Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ workflowstringYesDurable workflow ID
Returns: Promise<WorkflowItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYesWorkflow ID (UUID)
​ ↳ namestringYesWorkflow name
​ ↳ descriptionstringYesOptional workflow description (null if unset)
​ ↳ trigger_urlstringYesPublic webhook URL that fires this workflow when POSTed to. Embeds a secret trigger token in the path — treat as sensitive.
​ ↳ enabledbooleanYesWhether the workflow currently accepts triggers
​ ↳ current_versionobjectNoThe currently published version, if any. Absent for workflows with no version published yet.
​   ↳ idstringYesWorkflow version ID (UUID)
​   ↳ workflow_idstringYesParent workflow ID
​   ↳ source_filesobjectYesSource files keyed by filename → contents
​   ↳ zapier_durable_versionstringYesPinned semver of @zapier/zapier-durable used by this version’s runs
​   ↳ dependenciesobjectYesAdditional npm dependencies pinned for this version (or null)
​   ↳ created_by_user_idstringYesID of the user who published this version
​   ↳ created_atstringYesWhen the version was published (ISO-8601)
​ ↳ created_atstringYesWhen the workflow was created (ISO-8601)
​ ↳ updated_atstringYesWhen the workflow was last modified (ISO-8601)
Example:
const { data: workflow } = await zapier.getWorkflow({
  workflow: "example-workflow",
});

listDurableRuns

List run-once durable runs for the authenticated account, newest first Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ pageSizenumberNoNumber of runs per page (max 100)
​ ↳ cursorstringNoPagination cursor
​ ↳ maxItemsnumberNoMaximum total items to return across all pages
Returns: Promise<PaginatedResult<DurableRunItem>>
NameTypeRequiredDescription
data[]object[]Yes
​ ↳ idstringYesRun ID (UUID)
​ ↳ statusstringYesRun lifecycle status. finished / failed / cancelled are terminal.
​ ↳ inputstringYesInput data passed to the run
​ ↳ outputstringYesReturn value, present when status is finished
​ ↳ errorobjectYesStructured error details when the run failed (null otherwise)
​ ↳ execution_idstringYesLinked execution ID. Null until the run leaves the initialized state.
​ ↳ is_privatebooleanYesWhen true, the run is visible only to the creating user; otherwise visible across the account.
​ ↳ created_atstringYesWhen the run was created (ISO-8601)
​ ↳ updated_atstringYesWhen the run was last updated (ISO-8601)
nextCursorstringNoCursor for the next page; omitted when there are no more pages
Example:
// Get first page and a cursor for the second page
const { data: durableRuns, nextCursor } = await zapier.listDurableRuns();

// Or iterate over all pages
for await (const page of zapier.listDurableRuns()) {
  // Do something with each page
}

// Or iterate over individual items across all pages
for await (const durableRun of zapier.listDurableRuns().items()) {
  // Do something with each durableRun
}

listWorkflows

List all active durable workflows for the authenticated account Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ pageSizenumberNoNumber of workflows per page (server-side pagination forthcoming; ignored until then)
​ ↳ maxItemsnumberNoMaximum total workflows to return across all pages
​ ↳ cursorstringNoCursor to start from for pagination (server-side pagination forthcoming; ignored until then)
Returns: Promise<PaginatedResult<WorkflowItem>>
NameTypeRequiredDescription
data[]object[]Yes
​ ↳ idstringYesWorkflow ID (UUID)
​ ↳ namestringYesWorkflow name
​ ↳ descriptionstringYesOptional workflow description (null if unset)
​ ↳ trigger_urlstringYesPublic webhook URL that fires this workflow when POSTed to. Embeds a secret trigger token in the path — treat as sensitive.
​ ↳ enabledbooleanYesWhether the workflow currently accepts triggers
​ ↳ current_version_idstringYesID of the workflow version that runs handle. Null until a version is published.
​ ↳ created_atstringYesWhen the workflow was created (ISO-8601)
​ ↳ updated_atstringYesWhen the workflow was last modified (ISO-8601)
nextCursorstringNoCursor for the next page; omitted when there are no more pages
Example:
// Get first page and a cursor for the second page
const { data: workflows, nextCursor } = await zapier.listWorkflows();

// Or iterate over all pages
for await (const page of zapier.listWorkflows()) {
  // Do something with each page
}

// Or iterate over individual items across all pages
for await (const workflow of zapier.listWorkflows().items()) {
  // Do something with each workflow
}

runDurable

Run a workflow source file as a run-once durable run on sdkdurableapi (no deployed workflow required). Returns the run ID immediately; poll via getDurableRun for terminal status. Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ source_filesobjectYesSource files keyed by filename → contents
​ ↳ inputstringNoInput data passed to the run
​ ↳ dependenciesobjectNoOptional npm package dependencies
​ ↳ zapier_durable_versionstringNoExact semver of @zapier/zapier-durable to use (e.g. “1.2.3”). Defaults to server-configured version if omitted.
​ ↳ connectionsobjectNoNamed connection aliases. Maps alias names to Zapier connection IDs.
​ ↳ app_versionsobjectNoPinned app versions. Maps app keys (slugs) to implementation names and versions.
​ ↳ privatebooleanNoOnly the creating user can see the run (default false)
Returns: Promise<DurableRunItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYesRun ID (UUID) — server-generated, time-sortable
​ ↳ statusstringYesAlways initialized on creation. Poll via getDurableRun to observe the run advancing to started / finished / failed / cancelled.
​ ↳ is_privatebooleanYesWhen true, the run is visible only to the creating user; otherwise visible across the account.
​ ↳ created_atstringYesWhen the run was created (ISO-8601)
Example:
const result = await zapier.runDurable({
  source_files: {},
});

updateWorkflow

Update a durable workflow’s name and/or description Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ workflowstringYesDurable workflow ID
​ ↳ namestringNoNew name for the workflow
​ ↳ descriptionstringNoNew description for the workflow (pass null to clear)
Returns: Promise<WorkflowItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYesWorkflow ID (UUID)
​ ↳ namestringYesWorkflow name (post-update)
​ ↳ descriptionstringYesWorkflow description, post-update (null if unset)
​ ↳ trigger_urlstringYesPublic webhook URL that fires this workflow when POSTed to. Embeds a secret trigger token in the path — treat as sensitive.
​ ↳ enabledbooleanYesWhether the workflow currently accepts triggers
​ ↳ created_atstringYesWhen the workflow was created (ISO-8601)
​ ↳ updated_atstringYesWhen this update was applied (ISO-8601)
Example:
const result = await zapier.updateWorkflow({
  workflow: "example-workflow",
});

Triggers (Experimental)

ℹ️ Experimental. Import from "@zapier/zapier-sdk/experimental" to use these methods. Methods and behavior may change.

ackTriggerInboxMessages

Acknowledge messages from a lease. Acked messages are removed from the inbox; unacked ones return to the available pool when the lease expires. Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ inboxstringYesTrigger inbox identifier — UUID or name. Non-UUID values are resolved by name via the inbox list endpoint.
​ ↳ leasestringYesLease ID returned from leaseTriggerInboxMessages
​ ↳ messagesarrayNoSpecific message IDs to ack. Omit to ack every message in the lease.
Returns: Promise<TriggerInboxAckItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ acked_idstringYes
​ ↳ results[]object[]Yes
​   ↳ idstringYes
​   ↳ created_atstringYes
​   ↳ statusstringYesMessage lifecycle status
​   ↳ message_attributesobjectYes
​     ↳ lease_countnumberYes
​     ↳ error_messagestringYes
​     ↳ possible_duplicate_databooleanYes
Example:
const result = await zapier.ackTriggerInboxMessages({
  inbox: "example-inbox",
  lease: "example-lease",
});

createTriggerInbox

Create a new trigger inbox subscription. Always creates a new inbox; use ensureTriggerInbox for get-or-create on a stable name. Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ namestringNoOptional inbox name. Auto-generated when omitted. Throws a conflict error if the name is already in use by another subscription.
​ ↳ appstringYesApp slug (e.g., ‘github’), implementation name (e.g., ‘SlackCLIAPI’), or versioned ID (e.g., ‘github@1.2.3’)
​ ↳ actionstringYesAction key (e.g., ‘send_message’ or ‘find_row’)
​ ↳ connectionstring, numberNoConnection alias or connection ID. Optional for triggers that don’t require auth.
​ ↳ inputsobjectNoInput parameters for the trigger subscription
​ ↳ notificationUrlstringNoWebhook URL to POST to when new messages arrive
Returns: Promise<TriggerInboxItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYes
​ ↳ created_atstringYes
​ ↳ namestringYes
​ ↳ statusstringYesInbox lifecycle status
​ ↳ paused_reasonstringYesWhy the inbox was paused, if applicable
​ ↳ notification_urlstringYes
​ ↳ subscriptionobjectYes
​   ↳ connection_idstring, numberYes
​   ↳ app_keystringYes
​   ↳ action_keystringYes
​   ↳ inputsobjectYes
Example:
const result = await zapier.createTriggerInbox({
  app: "example-app",
  action: "example-action",
});

deleteTriggerInbox

Mark a trigger inbox for deletion Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ inboxstringYesTrigger inbox identifier — UUID or name. Non-UUID values are resolved by name via the inbox list endpoint.
Returns: Promise<{ success: boolean }>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYes
​ ↳ created_atstringYes
​ ↳ namestringYes
​ ↳ statusstringYesInbox lifecycle status
​ ↳ paused_reasonstringYesWhy the inbox was paused, if applicable
​ ↳ notification_urlstringYes
​ ↳ subscriptionobjectYes
​   ↳ connection_idstring, numberYes
​   ↳ app_keystringYes
​   ↳ action_keystringYes
​   ↳ inputsobjectYes
Example:
const result = await zapier.deleteTriggerInbox({
  inbox: "example-inbox",
});

drainTriggerInbox

Drain an existing trigger inbox: lease currently-available messages, process each via onMessage, return when the inbox is empty, maxMessages is reached, or the abort signal fires. Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ inboxstringYesTrigger inbox identifier — UUID or name. Non-UUID values are resolved by name via the inbox list endpoint.
​ ↳ onMessagefunctionNoPer-message handler. Resolves to ack; rejects to release-or-leave per releaseOnError. Throw ZapierReleaseTriggerMessageSignal to release explicitly, or ZapierAbortDrainSignal to stop after the current batch.
​ ↳ concurrencynumberNoPer-message handler workers running in parallel. Defaults to leaseLimit, or 1 if neither is set.
​ ↳ leaseLimitnumberNoPer-lease HTTP batch size. Defaults to concurrency, or 1 if neither is set.
​ ↳ leaseSecondsnumberNoSeconds until the lease expires; messages return to available if not acked. API default is 300 (5 minutes).
​ ↳ releaseOnErrorbooleanNoIf true, errors release the message when the drain finishes. If false (default), errors leave it leased until the lease timeout. ZapierReleaseTriggerMessageSignal always releases regardless.
​ ↳ continueOnErrorbooleanNoIf false (default, fail-fast), the first handler error rejects and stops the drain. If true, handler errors are observed via onError and the drain continues. SDK-level errors (lease / ack / release) reject regardless.
​ ↳ onErrorfunctionNoPer-message error observer for continueOnError: true. Called with the failure and the message; control-flow signals are filtered out. Throws from onError are swallowed.
​ ↳ signalanyNoAbort signal. Aborting cancels in-flight HTTP, releases unprocessed messages, and resolves cleanly. Errors during shutdown still reject.
​ ↳ maxMessagesnumberNoCap total messages drained. Defaults to draining the inbox until empty.
Returns: Promise<void> Example:
const result = await zapier.drainTriggerInbox({
  inbox: "example-inbox",
  onMessage: async (message) => {
    /* process message */
  },
});

ensureTriggerInbox

Get-or-create a trigger inbox by name. Idempotent on (user, account, name): returns the existing inbox if a matching subscription is registered, creates a new one otherwise. Throws ZapierConflictError if the name exists with a different subscription. Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ namestringYesInbox name; serves as the idempotency key. Required for ensureTriggerInbox — without one, the API mints a fresh inbox each call (use createTriggerInbox for that path).
​ ↳ appstringYesApp slug (e.g., ‘github’), implementation name (e.g., ‘SlackCLIAPI’), or versioned ID (e.g., ‘github@1.2.3’)
​ ↳ actionstringYesAction key (e.g., ‘send_message’ or ‘find_row’)
​ ↳ connectionstring, numberNoConnection alias or connection ID. Optional for triggers that don’t require auth.
​ ↳ inputsobjectNoInput parameters for the trigger subscription
​ ↳ notificationUrlstringNoWebhook URL to POST to when new messages arrive
Returns: Promise<TriggerInboxItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYes
​ ↳ created_atstringYes
​ ↳ namestringYes
​ ↳ statusstringYesInbox lifecycle status
​ ↳ paused_reasonstringYesWhy the inbox was paused, if applicable
​ ↳ notification_urlstringYes
​ ↳ subscriptionobjectYes
​   ↳ connection_idstring, numberYes
​   ↳ app_keystringYes
​   ↳ action_keystringYes
​   ↳ inputsobjectYes
Example:
const result = await zapier.ensureTriggerInbox({
  name: "example-name",
  app: "example-app",
  action: "example-action",
});

getTriggerInbox

Get details of a trigger inbox by ID Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ inboxstringYesTrigger inbox identifier — UUID or name. Non-UUID values are resolved by name via the inbox list endpoint.
Returns: Promise<TriggerInboxItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYes
​ ↳ created_atstringYes
​ ↳ namestringYes
​ ↳ statusstringYesInbox lifecycle status
​ ↳ paused_reasonstringYesWhy the inbox was paused, if applicable
​ ↳ notification_urlstringYes
​ ↳ subscriptionobjectYes
​   ↳ connection_idstring, numberYes
​   ↳ app_keystringYes
​   ↳ action_keystringYes
​   ↳ inputsobjectYes
Example:
const { data: triggerInbox } = await zapier.getTriggerInbox({
  inbox: "example-inbox",
});

getTriggerInputFieldsSchema

Get the JSON Schema representation of input fields for a trigger. Returns a JSON Schema object describing the structure, types, and validation rules for the trigger’s input parameters. Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ appstringYesApp key (e.g., ‘SlackCLIAPI’ or slug like ‘github’) to get the input schema for
​ ↳ actionstringYesTrigger action key to get the input schema for
​ ↳ connectionstring, numberNoConnection alias or connection ID. Required if the trigger needs a connection to determine available fields.
​ ↳ inputsobjectNoCurrent input values that may affect the schema (e.g., when fields depend on other field values)
Returns: Promise<any> Example:
const result = await zapier.getTriggerInputFieldsSchema({
  app: "example-app",
  action: "example-action",
});

leaseTriggerInboxMessages

Lease up to N messages from a trigger inbox. Returns messages plus a lease ID; ack within the lease window to remove from the inbox. Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ inboxstringYesTrigger inbox identifier — UUID or name. Non-UUID values are resolved by name via the inbox list endpoint.
​ ↳ leaseLimitnumberNoMaximum messages to lease in a single batch (1-100)
​ ↳ leaseSecondsnumberNoSeconds until the lease expires; messages return to available if not acked. API default is 300 (5 minutes).
​ ↳ signalanyNoAbort signal forwarded to the lease HTTP request. Aborting causes the in-flight request to reject with AbortError.
Returns: Promise<TriggerInboxLeaseItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ lease_idstringYes
​ ↳ leased_untilstringYes
​ ↳ results[]object[]Yes
​   ↳ idstringYes
​   ↳ created_atstringYes
​   ↳ statusstringYesMessage lifecycle status
​   ↳ message_attributesobjectYes
​     ↳ lease_countnumberYes
​     ↳ error_messagestringYes
​     ↳ possible_duplicate_databooleanYes
​   ↳ payloadobjectYes
​ ↳ inbox_attributesobjectYes
​   ↳ statusstringYesInbox lifecycle status
​   ↳ paused_reasonstringYesWhy the inbox was paused, if applicable
Example:
const result = await zapier.leaseTriggerInboxMessages({
  inbox: "example-inbox",
});

listTriggerInboxMessages

List messages in a trigger inbox (no payload, status-only) Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ inboxstringYesTrigger inbox identifier — UUID or name. Non-UUID values are resolved by name via the inbox list endpoint.
​ ↳ pageSizenumberNoNumber of messages per page
​ ↳ maxItemsnumberNoMaximum total items to return across all pages
​ ↳ cursorstringNoPagination cursor
Returns: Promise<PaginatedResult<TriggerMessageItem>>
NameTypeRequiredDescription
data[]object[]Yes
​ ↳ idstringYes
​ ↳ created_atstringYes
​ ↳ statusstringYesMessage lifecycle status
​ ↳ message_attributesobjectYes
​   ↳ lease_countnumberYes
​   ↳ error_messagestringYes
​   ↳ possible_duplicate_databooleanYes
nextCursorstringNoCursor for the next page; omitted when there are no more pages
Example:
// Get first page and a cursor for the second page
const { data: triggerMessages, nextCursor } =
  await zapier.listTriggerInboxMessages({
    inbox: "example-inbox",
  });

// Or iterate over all pages
for await (const page of zapier.listTriggerInboxMessages({
  inbox: "example-inbox",
})) {
  // Do something with each page
}

// Or iterate over individual items across all pages
for await (const triggerMessage of zapier
  .listTriggerInboxMessages({
    inbox: "example-inbox",
  })
  .items()) {
  // Do something with each triggerMessage
}

listTriggerInboxes

List all trigger inboxes for the authenticated user Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ namestringNoFilter by inbox name (exact match). Names are unique per (user, account), so this returns at most one inbox.
​ ↳ statusstringNoFilter by inbox status
​ ↳ pageSizenumberNoNumber of inboxes per page
​ ↳ maxItemsnumberNoMaximum total items to return across all pages
​ ↳ cursorstringNoCursor (offset) to start from for pagination
Returns: Promise<PaginatedResult<TriggerInboxItem>>
NameTypeRequiredDescription
data[]object[]Yes
​ ↳ idstringYes
​ ↳ created_atstringYes
​ ↳ namestringYes
​ ↳ statusstringYesInbox lifecycle status
​ ↳ paused_reasonstringYesWhy the inbox was paused, if applicable
​ ↳ notification_urlstringYes
​ ↳ subscriptionobjectYes
​   ↳ connection_idstring, numberYes
​   ↳ app_keystringYes
​   ↳ action_keystringYes
​   ↳ inputsobjectYes
nextCursorstringNoCursor for the next page; omitted when there are no more pages
Example:
// Get first page and a cursor for the second page
const { data: triggerInboxs, nextCursor } = await zapier.listTriggerInboxes();

// Or iterate over all pages
for await (const page of zapier.listTriggerInboxes()) {
  // Do something with each page
}

// Or iterate over individual items across all pages
for await (const triggerInbox of zapier.listTriggerInboxes().items()) {
  // Do something with each triggerInbox
}

listTriggerInputFieldChoices

Get the available choices for a dynamic dropdown input field on a trigger Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ appstringYesApp slug (e.g., ‘github’), implementation name (e.g., ‘SlackCLIAPI’), or versioned ID (e.g., ‘github@1.2.3’)
​ ↳ actionstringYesAction key (e.g., ‘send_message’ or ‘find_row’)
​ ↳ inputFieldstringYesInput field key to get choices for
​ ↳ connectionstring, numberNoConnection alias or connection ID. Required if the trigger needs a connection to populate dynamic dropdown options.
​ ↳ inputsobjectNoCurrent input values that may affect available choices
​ ↳ pagenumberNoPage number for paginated results
​ ↳ pageSizenumberNoNumber of choices per page
​ ↳ maxItemsnumberNoMaximum total items to return across all pages
​ ↳ cursorstringNoCursor to start from
Returns: Promise<PaginatedResult<InputFieldChoiceItem>>
NameTypeRequiredDescription
data[]object[]Yes
​ ↳ keystringNo
​ ↳ labelstringNo
​ ↳ samplestringNo
​ ↳ valuestringNo
nextCursorstringNoCursor for the next page; omitted when there are no more pages
Example:
// Get first page and a cursor for the second page
const { data: inputFieldChoices, nextCursor } =
  await zapier.listTriggerInputFieldChoices({
    app: "example-app",
    action: "example-action",
    inputField: "example-input-field",
  });

// Or iterate over all pages
for await (const page of zapier.listTriggerInputFieldChoices({
  app: "example-app",
  action: "example-action",
  inputField: "example-input-field",
})) {
  // Do something with each page
}

// Or iterate over individual items across all pages
for await (const inputFieldChoice of zapier
  .listTriggerInputFieldChoices({
    app: "example-app",
    action: "example-action",
    inputField: "example-input-field",
  })
  .items()) {
  // Do something with each inputFieldChoice
}

listTriggerInputFields

Get the input fields required for a specific trigger Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ appstringYesApp slug (e.g., ‘github’), implementation name (e.g., ‘SlackCLIAPI’), or versioned ID (e.g., ‘github@1.2.3’)
​ ↳ actionstringYesAction key (e.g., ‘send_message’ or ‘find_row’)
​ ↳ connectionstring, numberNoConnection alias or connection ID. Required if the trigger needs a connection to determine available fields.
​ ↳ inputsobjectNoCurrent input values that may affect available fields
​ ↳ pageSizenumberNoNumber of input fields per page
​ ↳ maxItemsnumberNoMaximum total items to return across all pages
​ ↳ cursorstringNoCursor to start from
Returns: Promise<PaginatedResult<RootFieldItem>>
NameTypeRequiredDescription
data[]object[]YesOne of the variants below, distinguished by type
nextCursorstringNoCursor for the next page; omitted when there are no more pages
When type is "input_field":
NameTypeRequiredDescription
typestringYes
keystringYes
default_valuestringYes
depends_onarrayYes
descriptionstringYes
invalidates_input_fieldsbooleanYes
is_requiredbooleanYes
placeholderstringYes
titlestringYes
value_typestringYes
formatstringNo
itemsobjectNo
​ ↳ typestringYes
When type is "info_field":
NameTypeRequiredDescription
typestringYes
keystringYes
descriptionstringYes
titlestringNo
When type is "fieldset":
NameTypeRequiredDescription
typestringYes
keystringYes
titlestringYes
fieldsarrayYes
Example:
// Get first page and a cursor for the second page
const { data: rootFields, nextCursor } = await zapier.listTriggerInputFields({
  app: "example-app",
  action: "example-action",
});

// Or iterate over all pages
for await (const page of zapier.listTriggerInputFields({
  app: "example-app",
  action: "example-action",
})) {
  // Do something with each page
}

// Or iterate over individual items across all pages
for await (const rootField of zapier
  .listTriggerInputFields({
    app: "example-app",
    action: "example-action",
  })
  .items()) {
  // Do something with each rootField
}

listTriggers

List all triggers for a specific app Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ appstringYesApp key of triggers to list (e.g., ‘SlackCLIAPI’ or slug like ‘github’)
​ ↳ pageSizenumberNoNumber of triggers per page
​ ↳ maxItemsnumberNoMaximum total items to return across all pages
​ ↳ cursorstringNoCursor to start from
Returns: Promise<PaginatedResult<ActionItem>>
NameTypeRequiredDescription
data[]object[]Yes
​ ↳ idstringNo
​ ↳ keystringYes
​ ↳ descriptionstringYes
​ ↳ is_importantbooleanNo
​ ↳ is_hiddenbooleanNo
​ ↳ app_keystringYes
​ ↳ app_versionstringNo
​ ↳ action_typestringYes
​ ↳ titlestringYes
​ ↳ typestringYes
nextCursorstringNoCursor for the next page; omitted when there are no more pages
Example:
// Get first page and a cursor for the second page
const { data: actions, nextCursor } = await zapier.listTriggers({
  app: "example-app",
});

// Or iterate over all pages
for await (const page of zapier.listTriggers({
  app: "example-app",
})) {
  // Do something with each page
}

// Or iterate over individual items across all pages
for await (const action of zapier
  .listTriggers({
    app: "example-app",
  })
  .items()) {
  // Do something with each action
}

pauseTriggerInbox

Pause a trigger inbox; events stop being collected Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ inboxstringYesTrigger inbox identifier — UUID or name. Non-UUID values are resolved by name via the inbox list endpoint.
Returns: Promise<TriggerInboxItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYes
​ ↳ created_atstringYes
​ ↳ namestringYes
​ ↳ statusstringYesInbox lifecycle status
​ ↳ paused_reasonstringYesWhy the inbox was paused, if applicable
​ ↳ notification_urlstringYes
​ ↳ subscriptionobjectYes
​   ↳ connection_idstring, numberYes
​   ↳ app_keystringYes
​   ↳ action_keystringYes
​   ↳ inputsobjectYes
Example:
const result = await zapier.pauseTriggerInbox({
  inbox: "example-inbox",
});

releaseTriggerInboxMessages

Release messages from a lease back to the inbox without acknowledging them. Released messages become immediately available for re-leasing. The lease attempt still counts against the per-message lease limit; releasing does not refund the attempt. Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ inboxstringYesTrigger inbox identifier — UUID or name. Non-UUID values are resolved by name via the inbox list endpoint.
​ ↳ leasestringYesLease ID returned from leaseTriggerInboxMessages
​ ↳ messagesarrayNoSpecific message IDs to release. Omit to release every message in the lease.
Returns: Promise<TriggerInboxReleaseItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ released_idstringYes
​ ↳ results[]object[]Yes
​   ↳ idstringYes
​   ↳ created_atstringYes
​   ↳ statusstringYesMessage lifecycle status
​   ↳ message_attributesobjectYes
​     ↳ lease_countnumberYes
​     ↳ error_messagestringYes
​     ↳ possible_duplicate_databooleanYes
Example:
const result = await zapier.releaseTriggerInboxMessages({
  inbox: "example-inbox",
  lease: "example-lease",
});

resumeTriggerInbox

Resume a paused trigger inbox; events resume being collected Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ inboxstringYesTrigger inbox identifier — UUID or name. Non-UUID values are resolved by name via the inbox list endpoint.
Returns: Promise<TriggerInboxItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYes
​ ↳ created_atstringYes
​ ↳ namestringYes
​ ↳ statusstringYesInbox lifecycle status
​ ↳ paused_reasonstringYesWhy the inbox was paused, if applicable
​ ↳ notification_urlstringYes
​ ↳ subscriptionobjectYes
​   ↳ connection_idstring, numberYes
​   ↳ app_keystringYes
​   ↳ action_keystringYes
​   ↳ inputsobjectYes
Example:
const result = await zapier.resumeTriggerInbox({
  inbox: "example-inbox",
});

updateTriggerInbox

Update settings on an existing trigger inbox Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ inboxstringYesTrigger inbox identifier — UUID or name. Non-UUID values are resolved by name via the inbox list endpoint.
​ ↳ notificationUrlstringNoWebhook URL to POST to when new messages arrive. Pass null to clear.
Returns: Promise<TriggerInboxItem>
NameTypeRequiredDescription
dataobjectYes
​ ↳ idstringYes
​ ↳ created_atstringYes
​ ↳ namestringYes
​ ↳ statusstringYesInbox lifecycle status
​ ↳ paused_reasonstringYesWhy the inbox was paused, if applicable
​ ↳ notification_urlstringYes
​ ↳ subscriptionobjectYes
​   ↳ connection_idstring, numberYes
​   ↳ app_keystringYes
​   ↳ action_keystringYes
​   ↳ inputsobjectYes
Example:
const result = await zapier.updateTriggerInbox({
  inbox: "example-inbox",
});

watchTriggerInbox

Continuously consume a trigger inbox: drain currently-available messages via onMessage, then poll with backoff for new arrivals, until aborted. Resolves cleanly on signal abort or ZapierAbortDrainSignal from a handler; rejects on fatal SDK errors or fail-fast handler errors. Parameters:
NameTypeRequiredDescription
optionsobjectYes
​ ↳ inboxstringYesTrigger inbox identifier — UUID or name. Non-UUID values are resolved by name via the inbox list endpoint.
​ ↳ onMessagefunctionNoPer-message handler. Resolves to ack; rejects to release-or-leave per releaseOnError. Throw ZapierReleaseTriggerMessageSignal to release explicitly, or ZapierAbortDrainSignal to stop after the current batch.
​ ↳ concurrencynumberNoPer-message handler workers running in parallel. Defaults to leaseLimit, or 1 if neither is set.
​ ↳ leaseLimitnumberNoPer-lease HTTP batch size. Defaults to concurrency, or 1 if neither is set.
​ ↳ leaseSecondsnumberNoSeconds until the lease expires; messages return to available if not acked. API default is 300 (5 minutes).
​ ↳ releaseOnErrorbooleanNoIf true, errors release the message when the drain finishes. If false (default), errors leave it leased until the lease timeout. ZapierReleaseTriggerMessageSignal always releases regardless.
​ ↳ continueOnErrorbooleanNoIf false (default, fail-fast), the first handler error rejects and stops the drain. If true, handler errors are observed via onError and the drain continues. SDK-level errors (lease / ack / release) reject regardless.
​ ↳ onErrorfunctionNoPer-message error observer for continueOnError: true. Called with the failure and the message; control-flow signals are filtered out. Throws from onError are swallowed.
​ ↳ signalanyNoAbort signal. Aborting cancels in-flight HTTP, releases unprocessed messages, and resolves cleanly. Errors during shutdown still reject.
​ ↳ maxDrainIntervalSecondsnumberNoMaximum seconds between empty-inbox poll attempts (default: 60). Caps the back-off cadence.
Returns: Promise<void> Example:
const result = await zapier.watchTriggerInbox({
  inbox: "example-inbox",
  onMessage: async (message) => {
    /* process message */
  },
});