Loading...
Skip to main content

Update a brand

Replace an existing brand with the supplied values.

URL: https://api.courier.com/brands/:brand_id

Method: PUT

Path Parameters

brand_idstringrequired
A unique identifier associated with the brand you wish to update.

Body Parameters

namestringrequired
Brand name
settingsobjectrequired
+ Show Properties
snippetsobject
+ Show Properties

Responses

status: 200 Successfully replaced

creatednumber
The date/time of when the brand was created. Represented in milliseconds since Unix epoch.
idstring
Brand Identifier
namestring
Brand name
publishednumber
The date/time of when the brand was published. Represented in milliseconds since Unix epoch.
settingsobject
+ Show Properties
updatednumber
The date/time of when the brand was updated. Represented in milliseconds since Unix epoch.
snippetsobject
+ Show Properties
versionstring
The version identifier for the brand

status: 400 Bad Request

messagestring
A message describing the error that occurred.
typestring
[invalid_request_error] The type of error that occurred.

status: 404 Not Found

messagestring
A message describing the error that occurred.
typestring
[invalid_request_error] The type of error that occurred.

Request Example

curl --request PUT \
--url https://api.courier.com/brands/C8CPX6HQZ5M7Q5KAMW5CXC4N98DH \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Example Brand Name",
"settings": {
"colors": {
"primary": "#9D3789",
"secondary": "#9D3789",
"tertiary": "#9D3789"
},
"email": {
"footer": {
"markdown": "**Bold** and _italic_ with a [link](https://www.courier.com)",
"social": {
"facebook": {
"url": "https://www.facebook.com/example"
},
"instagram": {
"url": "https://www.instagram.com/example"
},
"linkedin": {
"url": "https://www.linkedin.com/example"
},
"medium": {
"url": "https://www.medium.com/example"
},
"twitter": {
"url": "https://www.twitter.com/example"
}
}
},
"header": {
"barColor": "#9D3789",
"logo": {
"href": "https://www.courier.com",
"image": "https://www.courier.com/logo.png"
}
}
}
}
}
'

Responses Example

{
"created": 1591753605265,
"id": "C8CPX6HQZ5M7Q5KAMW5CXC4N98DH",
"name": "Example Brand Name",
"published": 1591753605265,
"settings": {
"colors": {
"primary": "#9D3789",
"secondary": "#9D3789",
"tertiary": "#9D3789"
},
"inapp": {
"preferences": {
"templateIds": [
null
]
}
},
"email": {
"footer": {
"markdown": "**Bold** and _italic_ with a [link](https://www.courier.com)",
"social": {
"facebook": {
"url": "https://www.facebook.com/example"
},
"instagram": {
"url": "https://www.instagram.com/example"
},
"linkedin": {
"url": "https://www.linkedin.com/example"
},
"medium": {
"url": "https://www.medium.com/example"
},
"twitter": {
"url": "https://www.twitter.com/example"
}
}
},
"header": {
"barColor": "#9D3789",
"logo": {
"href": "https://www.courier.com",
"image": "https://www.courier.com/logo.png"
}
}
}
},
"updated": 1591753605265,
"snippets": {
"items": [
{}
]
},
"version": "2020-06-19T18:51:36.083Z"
}
{
"message": "Error Message",
"type": "invalid_request_error"
}
{
"message": "Not Found",
"type": "invalid_request_error"
}

Example

Method: PUT

URL: https://api.courier.com/brands/C8CPX6HQZ5M7Q5KAMW5CXC4N98DH

Body: ​

{
"name": "Example Brand Name",
"settings": {
"colors": {
"primary": "#9D3789",
"secondary": "#9D3789",
"tertiary": "#9D3789"
},
"email": {
"footer": {
"markdown": "**Bold** and _italic_ with a [link](https://www.courier.com)",
"social": {
"facebook": {
"url": "https://www.facebook.com/example"
},
"instagram": {
"url": "https://www.instagram.com/example"
},
"linkedin": {
"url": "https://www.linkedin.com/example"
},
"medium": {
"url": "https://www.medium.com/example"
},
"twitter": {
"url": "https://www.twitter.com/example"
}
}
},
"header": {
"barColor": "#9D3789",
"logo": {
"href": "https://www.courier.com",
"image": "https://www.courier.com/logo.png"
}
}
}
}
}