---
title: "Create script"
method: POST
path: "/api/v3/meta/bases/{baseId}/scripts"
tags: ["Scripts"]
---

# Create script

`POST /api/v3/meta/bases/{baseId}/scripts`

## Request

- Base URL: `https://app.nocodb.com`
- URL: `https://app.nocodb.com/api/v3/meta/bases/{baseId}/scripts`
- Auth: one of:
  - API key in header `xc-token`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/nocodb/apis/nocodb-v3/docs/api/v3/meta/bases/:baseId/scripts/post.ts> (a function with typed inputs; its response is checked against the schema)

Create a new script within the specified base by providing the required script details in the request body.

**Note**: Script APIs are available on cloud-hosted **Enterprise** plans, and on licensed self-hosted deployments (**Business** plan and above).

## Path parameters

- `baseId` string, required

## Request body

- ScriptCreateReq: Script create request body
  - `title` string, required: Title of the script.
  - `description` string, nullable: Description of the script.
  - `script` string: Script content.
  - `config` object: Configuration for the script.
  - `meta` object: Metadata for the script.

## Response `201`

Script created.

- ScriptGetResponse: Script with additional info
  - `id` string, required: Unique identifier for the script
  - `title` string, required: Title of the script.
  - `description` string, nullable: Description of the script.
  - `script` string, required: Script content.
  - `config` object: Configuration for the script.
  - `meta` object: Metadata of the script.
  - `base_id` string, required: Unique identifier for the base
  - `workspace_id` string, required: Unique identifier for the workspace
  - `created_at` string, date-time, required: Timestamp when the script was created
  - `updated_at` string, date-time, required: Timestamp when the script was last updated

## Other responses

- `400`: The request body or a query parameter failed validation.
- `403`: Authenticated, but not allowed: the role is too low, the token scope does not cover the operation, or the plan does not include the feature or allows no more of this resource.
- `500`: Unexpected server error. The body carries `message` only — no `error` code.

---

[API](https://skmtc.dev/nocodb/apis/nocodb-v3.md) - [All operations](https://skmtc.dev/nocodb/apis/nocodb-v3/llms.txt) - [OpenAPI document](https://skmtc.dev/nocodb/apis/nocodb-v3/revisions/62a735aaf849?raw)
