> ## 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.

# Create a StoredAction

> Create Stored Action

Creates a new stored action entry that can then be executed from a simpler call to
/stored-actions with just the stored action `id`.

This will not execute a StoredAction.

This is an async process and will only respond with the id of the stored action and other meta data,
and it is the callers responsibility to poll
GET /stored-actions/{stored_action_id}/runs/{run_id} with the run id returned from
POST /stored-actions/{stored_action_id}/run to fetch the results after executing a stored action.

The triple (selected_api, action_type, action_key) is required to create a stored action.
Only core actions are supported; external and custom (App Extension) actions cannot be
created as stored actions via this endpoint.

**Note on `connection_id`:** Other Zapier APIs may expose the same
identifier under the field name `authentication_id`. The value is the
same UUID — pass it here under the `connection_id` key.



## OpenAPI

````yaml white-label/actions-openapi.yaml post /actions/v1/stored-actions
openapi: 3.1.0
info:
  title: Actions API
  description: >
    API for creating, executing, and fetching results for an Action.


    A Stored Action is a single, repeatable configuration that can been called

    repeatedly to execute the same action.


    As an example, you could create a StoredAction that sends a message to a

    specific channel in Slack. Every time that action is executed, a message
    will

    be sent to the pre-configured channel in Slack.


    An External Action is an action registered by an external provider (e.g.,
    Custom Actions,

    Code Actions, Agents) in the Action Registry. External actions can be
    created, updated,

    published, shared, and controlled through the registry endpoints.


    An Action Run is a one-off execution of an action — no record is persisted
    for reuse.

    Submit the action configuration and inputs in a single POST /runs call, then
    poll

    GET /runs/{run_id} for the result.


    **Authentication:** Service and User JWTs

    # Key Terminology

    - `stored_action`: A pre-configured action connected to a SelectedAPI and
    executable
      action that can be called repeatedly.
    - `external_action`: An action registered by an external provider in the
    Action Registry.

    - `action_run`: A one-off execution of an action that is not persisted as a
    stored action.
  version: v1
  contact:
    url: https://docs.zapier.com
servers:
  - url: https://api.zapier.com
    description: Production
security:
  - OAuth: []
tags:
  - name: Stored Actions
    description: Operations related to a Stored Action
paths:
  /actions/v1/stored-actions:
    post:
      tags:
        - Stored Actions
      summary: Create a StoredAction
      description: >-
        Create Stored Action


        Creates a new stored action entry that can then be executed from a
        simpler call to

        /stored-actions with just the stored action `id`.


        This will not execute a StoredAction.


        This is an async process and will only respond with the id of the stored
        action and other meta data,

        and it is the callers responsibility to poll

        GET /stored-actions/{stored_action_id}/runs/{run_id} with the run id
        returned from

        POST /stored-actions/{stored_action_id}/run to fetch the results after
        executing a stored action.


        The triple (selected_api, action_type, action_key) is required to create
        a stored action.

        Only core actions are supported; external and custom (App Extension)
        actions cannot be

        created as stored actions via this endpoint.


        **Note on `connection_id`:** Other Zapier APIs may expose the same

        identifier under the field name `authentication_id`. The value is the

        same UUID — pass it here under the `connection_id` key.
      operationId: createStoredAction
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StoredActionsCreateRequest'
            examples:
              ExamplePOSTRequest:
                value:
                  data:
                    connection_id: 019320ab-0000-7000-8000-abcdef012345
                    selected_api: SplitwiseCLIAPI@1.0.0
                    action_key: new_contact
                    action_type: read
                    inputs:
                      first_name: John
                      last_name: Doe
                summary: Example POST Request
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StoredActionsCreateResponse'
              examples:
                Success:
                  value:
                    type: stored_action
                    id: 123e4567-e89b-12d3-a456-426614174000
          description: A StoredAction record was successfully created.
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: >-
                Effective request cap per 300-second window. Default: 200.
                Maximum via limit_override: 1000.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: Requests remaining in the current window.
            X-RateLimit-Reset:
              schema:
                type: string
                format: date-time
              description: Unix timestamp when the current 300-second window resets.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionsErrorResponse'
              examples:
                BadRequest:
                  value:
                    errors:
                      - status: 400
                        code: bad_request
                        title: Bad Request
                        detail: Improperly formatted or incompleted request
                        source: null
                        meta: {}
                  summary: Bad Request
          description: Indicates an error creating a StoredAction record.
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: >-
                Effective request cap per 300-second window. Default: 200.
                Maximum via limit_override: 1000.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: Requests remaining in the current window.
            X-RateLimit-Reset:
              schema:
                type: string
                format: date-time
              description: Unix timestamp when the current 300-second window resets.
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionsErrorResponse'
              examples:
                PermissionDenied:
                  value:
                    errors:
                      - status: 403
                        code: permission_denied
                        detail: >-
                          User does not have enough permissions to perform
                          action
                  summary: Permission Denied
          description: Permission denied. Unauthorized request.
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionsErrorResponse'
              examples:
                TooManyRequests:
                  value:
                    errors:
                      - status: 429
                        code: too_many_requests
                        detail: Rate limit exceeded. Too many requests.
                  summary: Too Many Requests
          description: Too many requests.
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: >-
                Effective request cap per 300-second window. Default: 200.
                Maximum via limit_override: 1000.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: Requests remaining in the current window.
            X-RateLimit-Reset:
              schema:
                type: string
                format: date-time
              description: Unix timestamp when the current 300-second window resets.
            Retry-After:
              schema:
                type: integer
              description: Seconds to wait before retrying.
              required: true
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionsErrorResponse'
              examples:
                UnhandledOrExternalServiceError:
                  value:
                    errors:
                      - status: 500
                        code: external_service_error
                        detail: An error occurred with an external service.
                  summary: Unhandled or External Service Error
          description: Internal Server Error
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: >-
                Effective request cap per 300-second window. Default: 200.
                Maximum via limit_override: 1000.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: Requests remaining in the current window.
            X-RateLimit-Reset:
              schema:
                type: string
                format: date-time
              description: Unix timestamp when the current 300-second window resets.
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionsErrorResponse'
              examples:
                ServiceUnavailableError:
                  value:
                    errors:
                      - status: 503
                        code: service_unavaiable
                        detail: Service is temporarily unavailable
                  summary: Service Unavailable Error
          description: Service Unavailable
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: >-
                Effective request cap per 300-second window. Default: 200.
                Maximum via limit_override: 1000.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: Requests remaining in the current window.
            X-RateLimit-Reset:
              schema:
                type: string
                format: date-time
              description: Unix timestamp when the current 300-second window resets.
            Retry-After:
              schema:
                type: integer
              description: Seconds to wait before retrying.
              required: true
      security:
        - OAuth:
            - external
components:
  schemas:
    StoredActionsCreateRequest:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/StoredActionsCreateRequestParams'
      required:
        - data
    StoredActionsCreateResponse:
      type: object
      description: The response returned from creating a Stored Action record.
      properties:
        type:
          type: string
          default: stored_action
          description: >-
            Specifies the resource type, as required by the JSON:API
            specification.
        id:
          type: string
          format: uuid
          description: >-
            The UUID id that identifies this stored action and can be used to
            execute the stored procedure by calling the POST
            /stored-actions/{stored_action_id}/run endpoint.
      required:
        - id
    ActionsErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ActionsError'
          description: An array of error objects.
      required:
        - errors
    StoredActionsCreateRequestParams:
      type: object
      description: |-
        The shape of the payload that must be sent to create a Stored Action.

        Only the triple (selected_api, action_type, action_key) is accepted —
        `action_id` is intentionally not exposed on this endpoint.
      properties:
        connection_id:
          type: string
          format: uuid
          description: >-
            UUID of the connection to use when executing the Stored Action. Can
            be any connection visible to the user (including shared).
        selected_api:
          type: string
          description: >-
            Something like `SlackAPI` (for Python apps) or
            `SplitwiseCLIAPI@1.0.0` (for CLI apps). Non-public apps are fine as
            long as the authed user can access them. If a version is included we
            attempt to use that version of the integration.  If no version is
            provided we attempt to use the latest version of the integration
        action_key:
          type: string
          description: Name of the action in the integration. Such as `new_contact`.
        action_type:
          allOf:
            - $ref: '#/components/schemas/ActionTypeEnum'
          description: >-
            Specifies the type of action in the integration since some
            integrations could have similarly named actions with different
            actions types


            * `read` - Read

            * `read_bulk` - Read Bulk

            * `write` - Write

            * `run` - Run

            * `search` - Search

            * `search_or_write` - Search Or Write

            * `search_and_write` - Search And Write

            * `filter` - Filter
        inputs:
          default: {}
          description: >-
            Object that matches the input the action would normally get. Has all
            the same keys/types as the `input` of the action. (Formerly known as
            "needs" in some documentation)
      required:
        - action_key
        - action_type
        - selected_api
    ActionsError:
      type: object
      description: Base Error definition
      properties:
        status:
          type: integer
          description: The HTTP status code applicable to this problem.
        code:
          type: string
          description: A unique identifier for this particular occurrence of the problem.
        title:
          type: string
          description: A short summary of the problem.
        detail:
          type: string
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
        source:
          oneOf:
            - $ref: '#/components/schemas/ActionsErrorSource'
            - type: 'null'
          description: An object containing references to the primary source of the error.
        meta:
          type:
            - object
            - 'null'
          additionalProperties: {}
          description: Any additional metadata about the error.
    ActionTypeEnum:
      enum:
        - read
        - read_bulk
        - write
        - run
        - search
        - search_or_write
        - search_and_write
        - filter
      type: string
      description: |-
        * `read` - Read
        * `read_bulk` - Read Bulk
        * `write` - Write
        * `run` - Run
        * `search` - Search
        * `search_or_write` - Search Or Write
        * `search_and_write` - Search And Write
        * `filter` - Filter
    ActionsErrorSource:
      type: object
      description: Populates the `source` object inside our error responses.
      properties:
        pointer:
          type: string
          description: >-
            Pointer to the value in the request document that caused the error
            e.g. `/actions`.
        parameter:
          type: string
          description: A string indicating which URI query parameter caused the error.
        header:
          type: string
          description: >-
            A string indicating the name of a single request header which caused
            the error.
  securitySchemes:
    OAuth:
      type: oauth2
      description: OAuth 2.0 authentication.
      flows:
        authorizationCode:
          authorizationUrl: https://zapier.com/oauth/authorize
          tokenUrl: https://zapier.com/oauth/token
          scopes:
            external: Scope that gives access to all Public APIs
        clientCredentials:
          tokenUrl: https://zapier.com/oauth/token
          scopes:
            external: Scope that gives access to all Public APIs

````