These sample requests are autogenerated by the OpenAPI spec. This endpoint requires one or more parameters in the URL: those are offset in curly-braces.
import requestsurl = "https://api.buttondown.com/v1/newsletters/{id}"payload = {"username": "sheinhardt","name": "Sheinhardt Wig Company","description": "Stay up to date with the latest trends in wigs and hairpieces"}headers = {"accept": "application/json","authorization": "Token $BUTTONDOWN_API_KEY","content-type": "application/json"}response = requests.patch(url, json=payload, headers=headers)print(response.text)
Sample responses
The IDs and values referenced in these responses are fake; please only rely on these responses for overall structure.
{"api_key": "7f819f8f-8220-4dcd-b7e3-37c81ead8b7a","creation_date": "2019-08-24T14:15:22Z","description": "I write about corgis and Python and lifting and all sorts of stuff!","id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","name": "Justin's neat newsletter","username": "jmduke","footer": "Thanks, as always, for reading!","header": "Howdy, gang!","tint_color": "#0069FF","from_name": "Justin Duke"}
Body parameters
All parameters are optional unless explicitly specified.
username
Type
string
Example
"sheinhardt"
name
Type
string
Example
"Sheinhardt Wig Company"
description
Type
string
Example
"Stay up to date with the latest trends in wigs and hairpieces"