---
title: "Update Attribute Transform"
method: PUT
path: "/attribute_transforms/{attribute_transform_id}"
tags: ["Transforms"]
---

# Update Attribute Transform

`PUT /attribute_transforms/{attribute_transform_id}`

## Request

- Base URL: `https://dataops.nexla.io/nexla-api`
- URL: `https://dataops.nexla.io/nexla-api/attribute_transforms/{attribute_transform_id}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/nexla/apis/nexla-rest-api/docs/attribute_transforms/:attribute_transform_id/put.ts> (a function with typed inputs; its response is checked against the schema)

Updates an attribute transform in the authenticated user's account.

## Path parameters

- `attribute_transform_id` integer, required

## Headers

- `Accept` 'application/vnd.nexla.api.v1+json' | 'application/json': Setting to `application/vnd.nexla.api.v1+json` is recommended.

## Request body

- AttributeTransformMutable
  - `name` string, required
  - `description` string
  - `output_type` 'attribute', required: Type of code container. This must be set to `attribute` to signify that this code container is to be used for generating the value of an output attribute.
  - `reusable` boolean, required: Whether or not this transform can be referenced by multiple Nexsets. This should always be `true` for reusable transforms.
  - `code_type` 'python' | 'python3' | 'javascript', required: Type of code in the code block.
  - `code_encoding` 'base64', required: Whether or not the code in the `code` block is encoded. Set this to `base64` for reusable attribute transforms.
  - `code` string, required: Code to be executed for transforming records. If you wish to execute a Python or Javascript code snippet during transformation, you'll need to `base64`-encode that code snippet. For example, if you want to execute this Python code as a reusable record transform ```python def transformAttribute(input, metadata, args): return input.get(args[0]) ``` the corresponding `code` value would be ``` ZGVmIHRyYW5zZm9ybUF0dHJpYnV0ZShpbnB1dCwgbWV0YWRhdGEsIGFyZ3MpOgogIHJldHVybiBpbnB1dC5nZXQoYXJnc1swXSk= ```
  - `custom_config` object: Configuration block useful for converting code into Nexla UI's Nexset Designer Rule blocks. This should not be sent in the payload unless the transform is being created using the Nexla UI's Nexset Designer screen.
  - `tags` string[]

## Response `200`

Success

- AttributeTransform
  - `id` integer
  - `name` string
  - `resource_type` 'transform'
  - `reusable` boolean
  - `owner` UserSimplified
    - `id` integer
    - `full_name` string
    - `email` string
    - `email_verified_at` string, date-time
  - `org` OrgSimplified
    - `id` integer
    - `name` string
    - `email_domain` string
    - `email` string
    - `client_identifier` string
    - `org_webhook_host` string
  - `access_roles` string[]: This property reflects all the permissions the user/team/organization has to this resource. 1. `collaborator`: The user/team/organization can view the resource but not make any modifications to it. 2. `operator`: The user/team/organization can view the resource and can activate/pause it, but not make any other modifications to it. 3. `administrator`: The user/team/organization has complete administrative rights to this resource. 4. `owner`: This user created the resource and so has complete administrative rights to it.
  - `data_credentials` object
    - `id` integer
    - `name` string
    - `description` string
    - `updated_at` string, date-time
    - `created_at` string, date-time
  - `runtime_data_credentials` object
    - `id` integer
    - `name` string
    - `description` string
    - `updated_at` string, date-time
    - `created_at` string, date-time
  - `description` string
  - `code_type` 'python' | 'javascript'
  - `output_type` 'attribute'
  - `code_config` object
  - `custom_config` object
  - `code_encoding` string
  - `code` string
  - `managed` boolean
  - `data_sets` integer[]
  - `copied_from_id` integer
  - `updated_at` string, date-time
  - `created_at` string, date-time
  - `tags` string[]

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not found

---

[API](https://skmtc.dev/nexla/apis/nexla-rest-api.md) - [All operations](https://skmtc.dev/nexla/apis/nexla-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nexla/apis/nexla-rest-api/revisions/ef02be92fe7b?raw)
