---
title: "Create Web3 Action"
method: POST
path: "/v1/account/{accountSlug}/project/{projectSlug}/actions/publishFile"
tags: ["Actions"]
---

# Create Web3 Action

`POST /v1/account/{accountSlug}/project/{projectSlug}/actions/publishFile`

Create a new Web3 Action. You can also set the Web3 Action to be deployed once it's been created.

## Validation

When the payload fails validation, the endpoint responds with `400` and the error slug
`found_validation_errors` without per-field detail. Common causes:

- `action.name` doesn't match `^[a-zA-Z][a-zA-Z0-9_-]*$` (it must start with a letter and may contain only letters, digits, dashes, and underscores; spaces are not allowed). Put human-readable text in `action.description` instead.
- `trigger.periodic.cron` is not a standard five-field cron expression (minute, hour, day of month, month, day of week). Seconds fields and `@hourly`-style shortcuts are not supported.
- The function referenced in `action.function` is not present in `action.source`.
- `action.trigger` is missing for a non-`ALERT` trigger type, or the trigger object doesn't match `triggerType`.
- `action.invocationType` is not one of `SYNC` or `ASYNC`.

## Path parameters

- `accountSlug` string, required
- `projectSlug` string, required

## Request body

- CreateWeb3ActionPayload
  - `action` Web3ActionPayload, required — A Web3 Action creation payload.
    - `name` string, required — Web3 Action name. Must start with a letter and contain only letters, digits, dashes, and underscores; spaces are not allowed. Names that don't match the pattern are rejected with `found_validation_errors`. Use the `description` field for a human-readable label.
    - `description` string — Web3 Action description.
    - `source` string, required — Web3 Action version source code.
    - `triggerType` 'ALERT' | 'BLOCK' | 'PERIODIC' | 'TRANSACTION' | 'WEBHOOK' | 'TRANSACTIONSIMPLE', required — Web3 Action version trigger type.
    - `runtime` string, required — Web3 Action version runtime.
    - `function` string, required — Web3 Action function which will be called on every execution.
    - `invocationType` 'SYNC' | 'ASYNC', required — Shows Web3 Action version invocation type.
    - `trigger` object, required — Web3 Action version trigger object. The shape depends on `triggerType`. For `PERIODIC` triggers, `periodic.cron` is a standard five-field cron expression (minute, hour, day of month, month, day of week; no seconds field and no `@hourly`-style shortcuts) and is what schedules execution; `periodic.interval` is optional display-only metadata shown in the dashboard and is not used in execution.
  - `deploy` boolean, required — Should Web3 Action be immediately deployed.

## Response `200`

A successful response.

- union
  - BlockCreateWeb3ActionPostResponse — An object with details about created Web3 Action of Block type.
  - PeriodicCreateWeb3ActionPostResponse — An object with details about created Web3 Action of Periodic type.
  - WebhookCreateWeb3ActionPostResponse — An object with details about created Web3 Action of Webhook type.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — The resource was not found.
- `429` — The request was rate limited. See the [rate limits](#section/Introduction/Rate-limits) section for the current limits and how request counts expire.
- `500` — Server error.

---

[API](https://skmtc.net/tenderly/apis/tenderly-api.md) · [All operations](https://skmtc.net/tenderly/apis/tenderly-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tenderly/tenderly-api/revisions/d4e07f17832e/schema)
