{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"Update the source mapping with the given ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`\n\n**Scopes:**\n`custom-objects:write`\n\n[OpenAPI Spec](https://raw.githubusercontent.com/klaviyo/openapi/main/openapi/stable/apis/update_source_mapping.json)","properties":{"path":{"type":"object","properties":{"id":{"description":"The ULID ID of the source mapping","type":"string","examples":["01K5HQC66PGHV35SYJC5ZV3DZA"]}},"required":["id"],"additionalProperties":false},"query":{"type":"object","properties":{"fields[source-mapping]":{"type":"array","items":{"type":"string","enum":["id","property_mappings","relationship_mappings"]},"description":"For more information please visit https://developers.klaviyo.com/en/v2026-10-15/reference/api-overview#sparse-fieldsets"}},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{"revision":{"type":"string","default":"2026-10-15","enum":["2026-10-15"],"description":"API endpoint revision (format: YYYY-MM-DD[.suffix])"}},"required":["revision"],"additionalProperties":false},"body":{"$ref":"#/definitions/SourceMappingPartialUpdateQuery"}},"required":["path","headers","body"],"additionalProperties":false,"definitions":{"SourceMappingPartialUpdateQuery":{"type":"object","properties":{"data":{"$ref":"#/definitions/SourceMappingPartialUpdateQueryResourceObject"}},"required":["data"]},"SourceMappingPartialUpdateQueryResourceObject":{"type":"object","properties":{"type":{"$ref":"#/definitions/SourceMappingEnum"},"id":{"description":"The ULID ID of the source mapping","type":"string","examples":["01K5HQC66PGHV35SYJC5ZV3DZA"]},"attributes":{"type":"object","properties":{"property_mappings":{"description":"A mapping of source property IDs to source mappings","type":["array","null"],"items":{"oneOf":[{"$ref":"#/definitions/ConstantPropertyMapping"},{"$ref":"#/definitions/SimplePropertyMapping"}]}},"relationship_mappings":{"description":"A mapping of source relationship IDs to source mappings","type":["array","null"],"items":{"$ref":"#/definitions/SimpleRelationshipMapping"}}}}},"required":["type","id","attributes"]},"SourceMappingEnum":{"type":"string","enum":["source-mapping"]},"ConstantPropertyMapping":{"type":"object","properties":{"id":{"description":"Property ID. Must be a positive integer.","type":"integer","examples":[1]},"type":{"description":"String literal for serialization","type":"string","enum":["constant"]},"value":{"description":"Constant value assigned to every record","oneOf":[{"type":"integer"},{"type":"number"},{"type":"string"},{"type":"boolean"}],"examples":["active"]}},"required":["id","type","value"]},"SimplePropertyMapping":{"type":"object","properties":{"id":{"description":"Property ID","type":"integer","examples":[1]},"type":{"description":"String literal for serialization","type":"string","enum":["simple"]},"source":{"$ref":"#/definitions/PropertySource"}},"required":["id","type","source"]},"SimpleRelationshipMapping":{"type":"object","properties":{"relationship_id":{"description":"Object schema relationship ULID ID","type":"string","examples":["01K97SE7GH4TE57FVNQY310QAK"]},"type":{"description":"String literal for serialization","type":"string","enum":["simple"],"examples":["simple"]},"source":{"description":"Data source mapping","oneOf":[{"$ref":"#/definitions/CustomObjectRelationshipSource"},{"$ref":"#/definitions/ProfileRelationshipSource"}]}},"required":["relationship_id","type","source"]},"PropertySource":{"type":"object","properties":{"source_id":{"description":"Data source ULID ID","type":"string","examples":["01JXKX2HM7NV4QPTR5WE8BF6GY"]},"id_path":{"description":"JSONPath ID selector","type":"string","examples":["$['object_record']['subscription_id']"]},"data_path":{"description":"JSONPath data selector","type":"string","examples":["$['object_record']['service_plan']"]}},"required":["source_id","id_path","data_path"]},"CustomObjectRelationshipSource":{"type":"object","properties":{"source_id":{"description":"Data source ULID ID","type":"string","examples":["01JXKX2HM7NV4QPTR5WE8BF6GY"]},"type":{"description":"String literal for serialization","type":"string","enum":["custom-object"]},"id_path":{"description":"JSONPath data selector to owning ID","type":"string","examples":["$['object_record']['subscription_id']"]},"related_id_path":{"description":"JSONPath data selector to related ID","type":"string","examples":["$['object_record']['pet_id']"]},"update_strategy":{"description":"Strategy for updating relationships with each new RawDataRecord ingestion","type":["string","null"],"default":"replace_from_origin","enum":["additive","replace_from_origin"],"examples":["replace_from_origin"]}},"required":["source_id","type","id_path","related_id_path"]},"ProfileRelationshipSource":{"type":"object","properties":{"source_id":{"description":"Data source ULID ID","type":"string","examples":["01JXKX2HM7NV4QPTR5WE8BF6GY"]},"type":{"description":"String literal for serialization","type":"string","enum":["profile"]},"id_path":{"description":"JSONPath data selector to owning ID","type":"string","examples":["$['relationships']['owners'][*]['id']"]},"related_id_paths":{"description":"List of profile identifier mappings to JSONPath data selectors","type":"array","items":{"$ref":"#/definitions/RelatedIdPath"},"examples":[[{"identifier_type":"email","path":"$['relationships']['owners'][*]['email']"},{"identifier_type":"phone","path":"$['relationships']['owners'][*]['phone']"}]]},"update_strategy":{"description":"Strategy for updating relationships with each new RawDataRecord ingestion","type":["string","null"],"default":"replace_from_origin","enum":["additive","replace_from_origin"],"examples":["replace_from_origin"]}},"required":["source_id","type","id_path","related_id_paths"]},"RelatedIdPath":{"type":"object","properties":{"identifier_type":{"description":"Profile identifier type","type":"string","enum":["anonymous","email","external-id","klaviyo-id","phone"]},"path":{"description":"JSONPath data selector to related ID","type":"string","examples":["$['relationships']['owners'][*]['email']"]}},"required":["identifier_type","path"]}}},"name":"Update Source Mapping","id":"klaviyo.update_source_mapping","example":{"path":{"id":"01K5HQC66PGHV35SYJC5ZV3DZA"},"headers":{"revision":"2026-10-15"},"body":{"data":{"type":"source-mapping","id":"01K5HQC66PGHV35SYJC5ZV3DZA","attributes":{}}}},"maxRequests":1,"summary":false}}