API referenceMappings
Update mapping
Update a mapping's name, description, field_mappings, or transformations.
Update mapping
Updates one or more fields of an existing mapping. Unset fields in the request body are left unchanged.
Signature
PUT /api/v1/mappings/{mapping_id}Content-Type: application/json
Permissions
API key scope: write or higher. Caller must own the mapping.
Path parameters
| Name | Type | Description |
|---|---|---|
mapping_id | integer | Mapping ID. |
Request body
All fields are optional. Send only what you want to change.
| Field | Type | Description |
|---|---|---|
name | string | New display name. |
description | string | New description. |
field_mappings | object | Replaces the entire field_mappings dictionary. |
transformations | object | Replaces the entire transformations dictionary. |
is_template | boolean | Publish or unpublish as a reusable mapping template. |
template_category | string | New category (only meaningful when is_template is true). |
template_description | string | New short description for the template library. |
Example
curl -X PUT https://api.simplyfill.app/v1/mappings/456 \
-H "Authorization: Bearer $SIMPLYFILL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Invoice — billing system (v2)",
"field_mappings": {
"invoice_number": "invoiceId",
"customer_name": "clientName",
"total_amount": "amount",
"due_date": "dueDate"
}
}'await client.mappings.update(456, {
name: 'Invoice — billing system (v2)',
fieldMappings: {
invoice_number: 'invoiceId',
customer_name: 'clientName',
total_amount: 'amount',
due_date: 'dueDate'
}
})client.mappings.update(
456,
name="Invoice — billing system (v2)",
field_mappings={
"invoice_number": "invoiceId",
"customer_name": "clientName",
"total_amount": "amount",
"due_date": "dueDate",
},
)Response
200 OK with the updated mapping (same shape as Get mapping).
Errors
| Status | error code | Cause |
|---|---|---|
400 | validation_error | Body failed validation (unknown field, type mismatch). |
403 | not_mapping_owner | Caller is not the mapping owner. |
404 | mapping_not_found | No mapping with the given ID. |
`field_mappings` replaces, it does not merge
Sending a partial field_mappings object overwrites the entire stored dictionary. To add a single field, GET the mapping, merge client-side, and PUT the full result.