# Write Email Button Look

Updates email button appearance: colours, hover state, typography, borders, corners and inner padding. For words or link use update-email-editor-button; for outer spacing use update-email-editor-block-style. Revision-bound, atomic edit; drafts only; publishing is publish-newsletter-email-content.

## Input schema:

```json
{
  "type": "object",
  "properties": {
    "editorUrl": {
      "type": "string",
      "description": "Editor URL of the email, as the read returned it",
      "minLength": 12,
      "maxLength": 500
    },
    "contentRevision": {
      "type": "string",
      "description": "The contentRevision of the read this change is based on",
      "minLength": 7,
      "maxLength": 100
    },
    "uuids": {
      "type": "array",
      "description": "The uuids of the blocks to write; the same values land on each",
      "items": {
        "type": "string"
      },
      "minItems": 1,
      "maxItems": 60
    },
    "backgroundColor": {
      "type": [
        "null",
        "string"
      ],
      "description": "Colour behind the label, \"#RRGGBB\" or \"transparent\"",
      "default": null,
      "pattern": "^(#[0-9a-fA-F]{6}|#[0-9a-fA-F]{3}|transparent)$"
    },
    "textColor": {
      "type": [
        "null",
        "string"
      ],
      "description": "Colour of the label",
      "default": null,
      "pattern": "^(#[0-9a-fA-F]{6}|#[0-9a-fA-F]{3}|transparent)$"
    },
    "borderRadius": {
      "type": [
        "null",
        "integer"
      ],
      "description": "How round the corners are, in pixels; 0 is a rectangle",
      "default": null,
      "minimum": 0,
      "maximum": 400
    },
    "borderTop": {
      "type": [
        "null",
        "string"
      ],
      "description": "Border above, as \"2px solid #000000\"",
      "default": null,
      "pattern": "^(0|[1-9][0-9]{0,2})px (solid|dashed|dotted|none) (#[0-9a-fA-F]{6}|#[0-9a-fA-F]{3}|transparent)$"
    },
    "borderRight": {
      "type": [
        "null",
        "string"
      ],
      "description": "Border right, same shape",
      "default": null,
      "pattern": "^(0|[1-9][0-9]{0,2})px (solid|dashed|dotted|none) (#[0-9a-fA-F]{6}|#[0-9a-fA-F]{3}|transparent)$"
    },
    "borderBottom": {
      "type": [
        "null",
        "string"
      ],
      "description": "Border below, same shape",
      "default": null,
      "pattern": "^(0|[1-9][0-9]{0,2})px (solid|dashed|dotted|none) (#[0-9a-fA-F]{6}|#[0-9a-fA-F]{3}|transparent)$"
    },
    "borderLeft": {
      "type": [
        "null",
        "string"
      ],
      "description": "Border left, same shape",
      "default": null,
      "pattern": "^(0|[1-9][0-9]{0,2})px (solid|dashed|dotted|none) (#[0-9a-fA-F]{6}|#[0-9a-fA-F]{3}|transparent)$"
    },
    "paddingTop": {
      "type": [
        "null",
        "integer"
      ],
      "description": "Space above the label, in pixels",
      "default": null,
      "minimum": 0,
      "maximum": 400
    },
    "paddingRight": {
      "type": [
        "null",
        "integer"
      ],
      "description": "Space right of the label",
      "default": null,
      "minimum": 0,
      "maximum": 400
    },
    "paddingBottom": {
      "type": [
        "null",
        "integer"
      ],
      "description": "Space below the label",
      "default": null,
      "minimum": 0,
      "maximum": 400
    },
    "paddingLeft": {
      "type": [
        "null",
        "integer"
      ],
      "description": "Space left of the label",
      "default": null,
      "minimum": 0,
      "maximum": 400
    },
    "fontFamily": {
      "type": [
        "null",
        "string"
      ],
      "description": "Font of the label by name, or \"inherit\" for the email's font",
      "default": null,
      "enum": [
        "inherit",
        "Arial",
        "Courier",
        "Georgia",
        "Helvetica Neue",
        "Lucida Sans",
        "Tahoma",
        "Times New Roman",
        "Trebuchet MS",
        "Verdana",
        "ヒラギノ角ゴ Pro W3",
        "メイリオ"
      ]
    },
    "fontSize": {
      "type": [
        "null",
        "integer"
      ],
      "description": "Size of the label in pixels",
      "default": null,
      "minimum": 8,
      "maximum": 120
    },
    "fontWeight": {
      "type": [
        "null",
        "string"
      ],
      "description": "Weight of the label, \"400\" regular to \"700\" bold",
      "default": null,
      "enum": [
        "100",
        "200",
        "300",
        "400",
        "500",
        "600",
        "700",
        "800",
        "900"
      ]
    },
    "lineHeight": {
      "type": [
        "null",
        "string"
      ],
      "description": "Line height of the label as a percentage, \"200%\"",
      "default": null,
      "pattern": "^[0-9]{2,3}%$"
    },
    "hoverBackgroundColor": {
      "type": [
        "null",
        "string"
      ],
      "description": "Colour behind the label under the pointer",
      "default": null,
      "pattern": "^(#[0-9a-fA-F]{6}|#[0-9a-fA-F]{3}|transparent)$"
    },
    "hoverTextColor": {
      "type": [
        "null",
        "string"
      ],
      "description": "Colour of the label under the pointer",
      "default": null,
      "pattern": "^(#[0-9a-fA-F]{6}|#[0-9a-fA-F]{3}|transparent)$"
    },
    "mobileFontSize": {
      "type": [
        "null",
        "integer"
      ],
      "description": "Size of the label on a phone, in pixels",
      "default": null,
      "minimum": 8,
      "maximum": 120
    },
    "accountId": {
      "type": [
        "null",
        "integer"
      ],
      "description": "User ID of the account; omit for the account the access token works in",
      "default": null,
      "minimum": 1
    }
  },
  "required": [
    "editorUrl",
    "contentRevision",
    "uuids"
  ],
  "additionalProperties": false
}
```

## Output schema:

```json
{
  "type": "object",
  "oneOf": [
    {
      "type": "object",
      "required": [
        "operation",
        "previousContentStatus",
        "contentStatus",
        "emailId",
        "contentRevision",
        "warnings",
        "editorUrl",
        "nextAction",
        "created"
      ],
      "properties": {
        "operation": {
          "type": "string",
          "enum": [
            "replaced",
            "unchanged"
          ],
          "description": "\"replaced\": the stored document is a new one; \"unchanged\": nothing was persisted."
        },
        "previousContentStatus": {
          "type": "string",
          "enum": [
            "draft",
            "published",
            "unpublished_changes"
          ]
        },
        "contentStatus": {
          "type": "string",
          "enum": [
            "draft",
            "published",
            "unpublished_changes"
          ]
        },
        "emailId": {
          "type": "integer"
        },
        "contentRevision": {
          "type": "string"
        },
        "warnings": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "editorUrl": {
          "type": "string"
        },
        "created": {
          "type": "array",
          "description": "What this write created, with uuids: after \"addRow\" the row and its columns, after \"addModule\" the block, plus the contentRevision the next write needs. Empty when nothing was created.",
          "items": {
            "type": "object",
            "required": [
              "operation",
              "type",
              "uuid"
            ],
            "properties": {
              "operation": {
                "type": "integer",
                "description": "Position of the creating operation in the request, counted from one."
              },
              "type": {
                "type": "string",
                "enum": [
                  "row",
                  "module"
                ]
              },
              "uuid": {
                "type": "string"
              },
              "kind": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The block kind, for a module."
              },
              "columns": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Uuids of the columns of a new row, in order; an \"addModule\" addresses one of these."
              }
            }
          }
        },
        "nextAction": {
          "type": "string",
          "enum": [
            "review_and_publish_content",
            "none"
          ],
          "description": "The content action still open: \"review_and_publish_content\" while the stored draft is not the dispatch content."
        }
      }
    },
    {
      "type": "object",
      "required": [
        "error"
      ],
      "properties": {
        "error": {
          "type": "object",
          "required": [
            "code",
            "message",
            "remediation",
            "details"
          ],
          "properties": {
            "code": {
              "type": "string",
              "description": "The machine-readable KlickTipp error code."
            },
            "message": {
              "type": "string"
            },
            "remediation": {
              "type": "string",
              "description": "Who has to act: for example get_again, use_klicktipp_editor, change_document, change_html, retry_later or ask_user_before_retry."
            },
            "details": {
              "type": "object"
            }
          }
        }
      }
    }
  ]
}
```

