{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/motaword/json-schema/motaword-user-update-content-schema.json",
  "title": "UserUpdateContent",
  "x-generated": "2026-10-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/motaword-api-openapi.yml#/components/schemas/UserUpdateContent",
  "allOf": [
    {
      "$ref": "#/$defs/Address"
    },
    {
      "type": "object",
      "properties": {
        "id": {
          "description": "Optional. ID of the user being updated.",
          "type": "integer",
          "format": "int64"
        },
        "first_name": {
          "description": "Optional. User first name.",
          "type": "string"
        },
        "last_name": {
          "description": "Optional. User last name.",
          "type": "string"
        },
        "email": {
          "description": "Optional. User e-mail.",
          "type": "string"
        },
        "current_password": {
          "description": "Required with `email` when you change your own e-mail address and your account has a password. Not needed for privileged callers updating another user.",
          "type": "string",
          "format": "password"
        },
        "paypal_email": {
          "description": "Optional. Vendor paypal e-mail",
          "type": "string"
        },
        "birthday": {
          "type": "string",
          "format": "date"
        },
        "require_1099": {
          "description": "Optional. Whether this vendor requires 1099 form in US for their earnings.",
          "type": "boolean"
        },
        "notifications": {
          "description": "Notification settings",
          "type": "object",
          "properties": {
            "phone_number": {
              "description": "User phone number",
              "type": "string"
            },
            "sms_enabled": {
              "description": "User sms notification setting",
              "type": "boolean"
            }
          }
        },
        "social_media": {
          "description": "Optional. Vendor social profile URLs (Facebook, Twitter/X, LinkedIn). Stored per-URL on the user model.",
          "$ref": "#/$defs/SocialMedia"
        },
        "native_language": {
          "description": "Optional. Vendor's native language code. Only accepted for unconfirmed vendors; ignored otherwise.",
          "type": "string"
        },
        "source_languages": {
          "description": "Optional. Vendor's source language codes (languages they translate FROM). Only accepted for unconfirmed vendors; ignored otherwise. Replaces the vendor's existing language-pair set when provided together with native_language.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "profile_survey": {
          "description": "Optional. Free-form map where each key is a survey question slug (e.g. `sdl_trados`, `specialization`, `working_timezone`) and the value is the answer — a string for single/text/number/radio questions, an array of strings for multi-select/checkbox questions. Unknown slugs are ignored.",
          "type": "object",
          "additionalProperties": true
        },
        "w9": {
          "description": "Optional. US tax form (W-9) payload. Only persisted when the vendor is w9-eligible; forwarded to the Accounting service and tags the vendor as having completed the form.",
          "type": "object",
          "properties": {
            "business_name": {
              "type": "string"
            },
            "tax_classification": {
              "type": "string",
              "description": "Sole proprietor, C corp, S corp, Partnership, Trust/Estate, LLC, or Other. If \"other\", tax_classification_other is used instead."
            },
            "tax_classification_other": {
              "type": "string",
              "description": "Free-form classification used when tax_classification is \"other\" or omitted."
            },
            "llc_code": {
              "type": "string",
              "description": "C, S, or P — only applicable when tax_classification is LLC."
            },
            "exempt_payee_code": {
              "type": "string"
            },
            "exemption_fatca_code": {
              "type": "string"
            },
            "soc_sec_num": {
              "type": "string",
              "description": "Social Security Number (US individual vendors)."
            },
            "emp_ide_num": {
              "type": "string",
              "description": "Employer Identification Number (US business vendors)."
            },
            "signature": {
              "type": "string",
              "description": "Electronic signature (full legal name)."
            }
          }
        },
        "user_groups": {
          "description": "A list of user group IDs",
          "type": "array",
          "items": {
            "type": "integer",
            "format": "int64"
          }
        },
        "notify": {
          "description": "Notify new user account creation with login information and MotaWord introduction.",
          "type": "boolean"
        }
      }
    }
  ],
  "$defs": {
    "Address": {
      "type": "object",
      "properties": {
        "street": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "state": {
          "type": "string"
        },
        "zip": {
          "type": "string"
        },
        "country": {
          "type": "string"
        },
        "phone": {
          "type": "string"
        },
        "latitude": {
          "description": "Optional. Mailing-address latitude (WGS84). When supplied alongside\nlongitude (e.g. from a Places autocomplete pick on the client), the\nserver stores them verbatim and skips its own Geocoding API call.\nDesign: 2026-05-22-vendor-proximity-search-design.md.\n",
          "type": "number"
        },
        "longitude": {
          "description": "Optional. Mailing-address longitude (WGS84). Paired with latitude.",
          "type": "number"
        }
      }
    },
    "SocialMedia": {
      "type": "object",
      "properties": {
        "facebook_url": {
          "type": "string"
        },
        "twitter_url": {
          "type": "string"
        },
        "linkedIn_url": {
          "type": "string"
        }
      }
    }
  }
}