Property Reference • Switchboard Canvas Developers

Property Reference This reference guide gives you a list of each property available on each element overridable via the API. Properties are specified in the `elements` object, either at the template level, or at a size-specific level. This gives you the flexibility to override values from your template on all sizes that you specify in the request, or at specific sizes, or a combination of both. Request Property Type Description Example format text Example text quality number When format is set to jpg, sets the quality of the resulting image. 0.7 template string The API name of the template. quote sizes array url string A URL of a blog post or page. https://www.cnn.com batchUrl string A URL of a resource containing an array of element overwrites. webhook string A URL of a webhook that will receive a POST notification when batch processing (either from Google Sheets, the API, or Airtable) is complete. airtableApiKey string An API key generated within Airtable used to access data. tweet string A URL to a tweet on twitter.com. updateTwitterHeader boolean Once the user has authenticated to Twitter, the profile's header can update with an image from the given template. true false googleSheetsDocumentId string The ID of a Google Sheets document to use for batch processing. 1pJTOSbnQDy...nFskuhjxfg googleSheetsSheetName string The name of the Sheet within the Google Sheets document. Sheet1 useAws boolean Determines whether Switchboard Canvas should attempt to move the created image to a custom AWS S3 bucket. true Text Property Type Description Example angle number The angle of the text within its bounding box. 0 - 360 fillTextBox boolean If true, the text resizes automatically to fix the bounding box. true false fontFamily text Example text opacity number The opacity of the text. 0.0 - 1.0 horizontalAlignment enum The horizontal alignment of the text with it's bounding box. left right center maximumFontSize number The maximum font size to use when fillTextBox is true. 100 text text The non-empty text to use in the element. Example text textColor string The color of the text. #FFFFFF translateTo enum The language code specific if this text should be translated. fr Image Property Type Description Example angle number The angle of the image within its bounding box. 0 - 360 backgroundColor string The background color when `contain` is true. #FF0000 backgroundOpacity number The opacity of the background color. 0.0 - 1.0 contain boolean Whether the image is fully contained within it's bounding box. true false cornerRadius number The size of the corner radius of the image. 0 - 50 horizontalAlignment enum The horizontal alignment of the image within it's bounding box. left right center opacity number The opacity of the image element. 0.0 - 1.0 removeBackground number Uses machine learning to remove the background from the primary subject in an image. true url string https://via.placeholder.com/1920x180 qrCode string https://www.google.com verticalAlignment enum The vertical alignment of the image within it's bounding box. top middle bottom Rectangle Property Type Description Example angle number The angle of rectangle within it's bounding box. 0 - 360 fillColor string The color of the rectangle. #FF0000 opacity number The opacity of the rectangle element. 0.0 - 1.0 Examples { "template": "my-template", "sizes": [ { "width": 1920, "height": 1080 }, { "width": 1080, "height": 1080 } ], "elements": { "text1": { "text": "Both sizes will have this text!" } } } { "template": "my-template", "sizes": [ { "width": 1920, "height": 1080, "elements": { "text1": { "text": "This image will be 1920x1080" } } }, { "width": 1080, "height": 1080, "elements": { "text1": { "text": "And this image will be 1080x1080" } } } ] }
Was this article helpful?

Still puzzling over something?

The agent has read this article — and everything around it. Ask a follow-up and it answers in seconds.