---
search:
  tags:
    - V1
    - POST
seo:
  description: >-
    Create an attribute mapper config in a project. Requires the… Reference for
    the POST /v1/projects/{projectId}/attribute-mappers endpoint in the Judgeval
    API.
sidebar:
  label: Create attribute mapper
  badge: POST
title: Create attribute mapper
type: openapi-operation
---
Create an attribute mapper config in a project. Requires the developer role.

`POST /v1/projects/{projectId}/attribute-mappers`

**Request body** (`application/json`, required)

- `name` (string, required) — A descriptive name for the mapper
- `rules` (object[], required) — The source-to-target attribute mapping rules
- `enabled` (boolean)
- `override` (boolean)
- `remove_source` (boolean)

Request body example:

```json
{
  "name": "string",
  "rules": [
    {
      "source_key": "string",
      "target_key": "string"
    }
  ],
  "enabled": true,
  "override": true,
  "remove_source": true
}
```

**Responses**

- `200` — Response for status 200

Response example, 200:

```json
{
  "mapper": {
    "id": "string",
    "organization_id": "string",
    "project_id": "string",
    "name": "string",
    "enabled": true,
    "override": true,
    "remove_source": true,
    "rules": [
      {
        "source_key": "string",
        "target_key": "string"
      }
    ],
    "created_at": "string",
    "updated_at": "string"
  }
}
```
