---
title: "Creates or updates a Script2API creator (promotion)"
method: POST
path: "/apiops/projects/{projectName}/script2apis/{script2ApiName}/"
tags: ["Script2API"]
---

# Creates or updates a Script2API creator (promotion)

`POST /apiops/projects/{projectName}/script2apis/{script2ApiName}/`

## Request

- Base URL: `http://167.86.118.166:32080`
- URL: `http://167.86.118.166:32080/apiops/projects/{projectName}/script2apis/{script2ApiName}/`
- Auth: none declared
- TypeScript: <https://skmtc.dev/apinizer/apis/apinizer-management-apis/docs/apiops/projects/:projectName/script2apis/:script2ApiName/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates or updates a Script2API (ScriptToApi) creator for promotion purposes.

## Path parameters

- `projectName` string, required
- `script2ApiName` string, required

## Request body

- ScriptToApi
  - `id` string
  - `name` string
  - `description` string
  - `projectId` string
  - `methodDefList` ScriptToApiMethod[]
    - `id` string
    - `name` string
    - `description` string
    - `httpMethod` 'GET' | 'POST' | 'PUT' | 'HEAD' | 'OPTIONS' | 'DELETE' | 'PATCH' | 'TRACE' | 'ALL' | 'QUERY'
    - `scriptType` 'GROOVY' | 'JAVASCRIPT'
    - `script` string
  - `specApi` SpecApi
    - `id` string
    - `projectId` string
    - `apiProxyId` string
    - `apiProxyRevision` integer
    - `openapi` string
    - `info` SpecInfo
      - `title` string
      - `description` string
      - `termsOfService` string
      - `contact` SpecContact
        - `name` string
        - `url` string
        - `email` string
        - `extensions` object
      - `license` SpecLicense
        - `name` string
        - `url` string
        - `extensions` object
      - `version` string
      - `extensions` object
    - `advanced` boolean
    - `specFromProxy` boolean
    - `specCreationType` 'OPEN_API' | 'SWAGGER' | 'WSDL' | 'WADL'
    - `externalDocs` SpecExternalDocumentation
      - `description` string
      - `url` string
      - `extensions` object
    - `servers` SpecServer[]
      - `url` string
      - `description` string
      - `variables` object
        - `extensions` object
        - `empty` boolean
      - `extensions` object
      - `soapType` 'SOAP11' | 'SOAP12' | 'HTTP'
    - `security` SpecSecurityRequirement[]
      - `empty` boolean
    - `tags` SpecTag[]
      - `name` string
      - `description` string
      - `externalDocs` SpecExternalDocumentation
        - `description` string
        - `url` string
        - `extensions` object
      - `extensions` object
    - `paths` object
      - `extensions` object
      - `empty` boolean
    - `components` SpecComponents
      - `schemas` object
      - `responses` object
      - `parameters` object
      - `examples` object
      - `requestBodies` object
      - `headers` object
      - `securitySchemes` object
      - `links` object
      - `callbacks` object
      - `extensions` object
    - `extensions` object
    - `importedContentOfBackendApi` string
    - `soapSchemaList` SoapSchema[]
      - `schemaNo` integer
      - `schemaBody` string
      - `originalLocation` string
      - `schemaNamespace` string
    - `createdDate` string, date-time
    - `updatedDate` string, date-time

## Response `200`

successful operation!

- ApiOpsResponseSuccess
  - `status` 'SUCCESS' | 'FAILURE'
  - `resultMessage` string
  - `resultList` string[]
  - `resultCount` integer
  - `deploymentResult` DeploymentResult
    - `envName` string
    - `podName` string
    - `podIp` string
    - `success` boolean
    - `detail` string
    - `responseTime` integer
    - `detailList` unknown[]
      - unknown
    - `firstFromApiResultList` unknown
  - `unresolvedReferences` string[]
  - `advisories` ApiOpsAdvisoryDTO[]
    - `level` string
    - `key` string
    - `params` object

## Other responses

- `401`: not authorized for this operation!
- `500`: internal error!

## Changes

- **2026-08-11** `9ae232e55479`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/apinizer/apis/apinizer-management-apis/changes/apiops/projects/:projectName/script2apis/:script2ApiName/post.md)

---

[API](https://skmtc.dev/apinizer/apis/apinizer-management-apis.md) - [All operations](https://skmtc.dev/apinizer/apis/apinizer-management-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/apinizer/apis/apinizer-management-apis/revisions/e083046b24cd?raw)
