Change a channel's slug
POST
/api/v3/channels/{channelSlug}/actions/update-slug
const url = 'https://api.tryletterhead.com/api/v3/channels/example/actions/update-slug';const form = new FormData();form.append('api', 'true');form.append('slug', 'example');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.tryletterhead.com/api/v3/channels/example/actions/update-slug \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: multipart/form-data' \ --form api=true \ --form slug=exampleChange the URL slug a channel is addressed by. Requires a company administrator key for the channel’s own company.
v3 endpoints expect a company API key.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” channelSlug
required
string
The newsletter’s channel identifier (slug), before the change.
Request Body required
Section titled “Request Body required ” Media type multipart/form-data
object
api
required
When set to true, this endpoint will accept authorization with your API Key.
string
Example
true slug
required
New slug. Letters, numbers, and hyphens only.
string
Responses
Section titled “ Responses ”202 Accepted. No response body.
404 Not Found — no channel matches channelSlug for this company.
Media type application/json
object
data
Array<object>
object
items
Array<object>
object
message
string
total
integer
Example
{ "data": [], "items": [], "message": "Channel not found", "total": 0}409 Conflict — another channel already uses this slug.
Media type application/json
object
data
Array<object>
object
items
Array<object>
object
message
string
total
integer
Example
{ "data": [], "items": [], "message": "A channel with this slug already exists.", "total": 0}Still can’t find what you need? Contact support.