---
title: "Bulk Translation Rules Operations"
method: POST
path: "/activedirectories/{activedirectory_id}/translation-rules/bulk"
tags: ["Translation Rules", "Active Directory"]
---

# Bulk Translation Rules Operations

`POST /activedirectories/{activedirectory_id}/translation-rules/bulk`

## Request

- Base URL: `https://console.jumpcloud.com/api/v2`
- URL: `https://console.jumpcloud.com/api/v2/activedirectories/{activedirectory_id}/translation-rules/bulk`
- Auth: API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/jumpcloud/apis/jumpcloud-api-2/docs/activedirectories/:activedirectory_id/translation-rules/bulk/post.ts> (a function with typed inputs; its response is checked against the schema)

This endpoint allows performing multiple translation rule operations (insert, update, delete) in a single request.

#### Sample Request
```
curl -X POST '[https://console.jumpcloud.com/api/v2/activedirectories/](https://console.jumpcloud.com/api/v2/activedirectories/){activedirectory_id}/translationrules/bulk' \
  -H 'accept: application/json' \
  -H 'content-type: application/json' \
  -H 'x-api-key: {API_KEY}' \
  -H 'x-org-id: {ORG_ID}' \
  -d '{
    "insertTranslationRule": [
      {
        "source": "title",
        "destination": "jobTitle",
        "sourceType": "PATH",
        "direction": "EXPORT",
        "appliedOn": [
          "CREATE",
          "UPDATE"
        ]
      }
    ],
    "updateTranslationRule": [
      {
        "objectId": "{RULE_ID_BASE64_1}",
        "source": "department",
        "destination": "customDepartmentV3",
        "sourceType": "GOLANG_TEMPLATE",
        "appliedOn": [
          "UPDATE"
        ]
      }
    ],
    "deleteTranslationRuleObjectIds": [
      "{RULE_ID_BASE64_2}",
      "{RULE_ID_BASE64_3}"
    ]
  }'
```

## Headers

- `x-org-id` string

## Request body

- ActiveDirectoriesTranslationRulesBulkRequest
  - `insertTranslationRules` JumpcloudIdmIdmTranslationRulesInsertRequest[]
    - `appliedOn` JumpcloudIdmAppliedOn[]: Operations when this translation rule is applied (CREATE, UPDATE)
    - `destination` string: Destination field path where translated value will be stored
    - `direction` 'UNSPECIFIED' | 'EXPORT' | 'IMPORT': Direction defines the direction of the attribute mapping.
    - `source` string: Source field path or expression to be translated
    - `sourceType` 'PATH' | 'GOLANG_TEMPLATE' | 'CONSTANT' | 'EXPR' | 'ENUMERATION': SourceType defines the type of the source field in attribute mapping.
  - `updateTranslationRules` ActiveDirectoriesBulkTranslationRulesUpdateRequest[]
    - `objectId` string, required: The objectId.
    - `source` string: Source field path or expression to be translated
    - `destination` string: Destination field path where translated value will be stored
    - `direction` 'UNSPECIFIED' | 'EXPORT' | 'IMPORT': Direction defines the direction of the attribute mapping.
    - `sourceType` 'PATH' | 'GOLANG_TEMPLATE' | 'CONSTANT' | 'EXPR' | 'ENUMERATION': SourceType defines the type of the source field in attribute mapping.
    - `appliedOn` JumpcloudIdmAppliedOn[]: Operations when this translation rule is applied (CREATE, UPDATE)
  - `deleteTranslationRuleObjectIds` string[]

## Response `200`

Result of the bulk operation.

- JumpcloudIdmTranslationRulesBulkResponse
  - `deletedTranslationRuleObjectIds` string[]: IDs of translation rules deleted
  - `insertedTranslationRules` JumpcloudIdmTranslationRule[]: The inserted translation rule
    - `appliedOn` JumpcloudIdmAppliedOn[]: Operations when this translation rule is applied (CREATE, UPDATE)
    - `default` boolean: Indicates if this is a default translation rule created by jumpcloud
    - `destination` string: Destination field path where translated value will be stored
    - `direction` 'UNSPECIFIED' | 'EXPORT' | 'IMPORT': Direction defines the direction of the attribute mapping.
    - `editable` boolean: Indicates if this translation rule can be modified
    - `id` string, byte: Unique identifier for the translation rule
    - `required` boolean: Indicates if this translation is required
    - `source` string: Source field path or expression to be translated
    - `sourceType` 'PATH' | 'GOLANG_TEMPLATE' | 'CONSTANT' | 'EXPR' | 'ENUMERATION': SourceType defines the type of the source field in attribute mapping.

## Other responses

- `default`: Error response

---

[API](https://skmtc.dev/jumpcloud/apis/jumpcloud-api-2.md) - [All operations](https://skmtc.dev/jumpcloud/apis/jumpcloud-api-2/llms.txt) - [OpenAPI document](https://skmtc.dev/jumpcloud/apis/jumpcloud-api-2/revisions/3f09fe63caaa?raw)
