---
title: "Add new custom script"
method: POST
path: "/api/v1/configuration/scripts"
---

# Add new custom script

`POST /api/v1/configuration/scripts`

Add new custom script

## Request body

- CustomScript
  - `dn` string
  - `inum` string
  - `name` string
  - `aliases` string[]
  - `description` string
  - `script` string
  - `scriptType` 'person_authentication' | 'introspection' | 'resource_owner_password_credentials' | 'application_session' | 'cache_refresh' | 'update_user' | 'user_registration' | 'client_registration' | 'id_generator' | 'uma_rpt_policy' | 'uma_rpt_claims' | 'uma_claims_gathering' | 'consent_gathering' | 'dynamic_scope' | 'spontaneous_scope' | 'end_session' | 'post_authn' | 'scim' | 'ciba_end_user_notification' | 'revoke_token' | 'persistence_extension' | 'idp' | 'update_token'
  - `programmingLanguage` 'python' | 'javascript'
  - `moduleProperties` SimpleCustomProperty[]
    - `value1` string
    - `value2` string
    - `description` string
  - `configurationProperties` SimpleExtendedCustomProperty[]
    - `value1` string
    - `value2` string
    - `hide` boolean
    - `description` string
  - `privateProperties` SimpleExtendedCustomProperty[]
    - `value1` string
    - `value2` string
    - `hide` boolean
    - `description` string
  - `level` integer
  - `revision` integer
  - `enabled` boolean
  - `scriptError` ScriptError
    - `raisedAt` string, date-time
    - `stackTrace` string
  - `modified` boolean
  - `internal` boolean
  - `locationPath` string
  - `locationType` 'ldap' | 'file'
  - `baseDn` string

## Response `200`

Success

- CustomScript
  - `dn` string
  - `inum` string
  - `name` string
  - `aliases` string[]
  - `description` string
  - `script` string
  - `scriptType` 'person_authentication' | 'introspection' | 'resource_owner_password_credentials' | 'application_session' | 'cache_refresh' | 'update_user' | 'user_registration' | 'client_registration' | 'id_generator' | 'uma_rpt_policy' | 'uma_rpt_claims' | 'uma_claims_gathering' | 'consent_gathering' | 'dynamic_scope' | 'spontaneous_scope' | 'end_session' | 'post_authn' | 'scim' | 'ciba_end_user_notification' | 'revoke_token' | 'persistence_extension' | 'idp' | 'update_token'
  - `programmingLanguage` 'python' | 'javascript'
  - `moduleProperties` SimpleCustomProperty[]
    - `value1` string
    - `value2` string
    - `description` string
  - `configurationProperties` SimpleExtendedCustomProperty[]
    - `value1` string
    - `value2` string
    - `hide` boolean
    - `description` string
  - `privateProperties` SimpleExtendedCustomProperty[]
    - `value1` string
    - `value2` string
    - `hide` boolean
    - `description` string
  - `level` integer
  - `revision` integer
  - `enabled` boolean
  - `scriptError` ScriptError
    - `raisedAt` string, date-time
    - `stackTrace` string
  - `modified` boolean
  - `internal` boolean
  - `locationPath` string
  - `locationType` 'ldap' | 'file'
  - `baseDn` string

## Other responses

- `500` — Server error

---

[API](https://skmtc.net/gluufederation/apis/oxtrust-api.md) · [All operations](https://skmtc.net/gluufederation/apis/oxtrust-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gluufederation/oxtrust-api/versions/283dde2d4ad4/schema)
