Curate or update content
const url = 'https://api.tryletterhead.com/api/v3/curations';const form = new FormData();form.append('api', 'true');form.append('url', 'https://letterhead.ai');form.append('channels[]', 'letterhead-example-newsletter');form.append('content', 'example');form.append('excerpt', 'example');form.append('image', 'example');form.append('siteName', 'example');form.append('publicationDate', 'example');form.append('tags', 'example');form.append('title', '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/curations \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: multipart/form-data' \ --form api=true \ --form url=https://letterhead.ai \ --form 'channels[]=letterhead-example-newsletter' \ --form content=example \ --form excerpt=example \ --form image=example \ --form siteName=example \ --form publicationDate=example \ --form tags=example \ --form title=exampleCreate a curation for any channel within the company. Note that the v3 api requires a key generated from within the company-level settings, which are available only to folks with that given plan.
Provided that you are curating the same url, Letterhead will not create a duplicate curation, and you can use this endpoint to also update one if it is already in the system.
Version note: at present, you can only pass one channel identifier to channels. Shortly, you will able to pass multiple, or none - which will represent βall channels.β
This endpoint persists exactly the fields you supply β it does not crawl url for Open Graph data on your behalf. If you omit title, excerpt, image, or the other content fields, the curation is saved without them; fetch and pass those values yourself if you want them populated.
Authorizations
Section titled βAuthorizations βRequest Body required
Section titled βRequest Body required βobject
Set to true to authenticate with your company API key rather than a signed-in session.
Example
trueURL of the content being curated. Saved as provided β this endpoint does not fetch or crawl the URL for Open Graph data.
Example
https://letterhead.aistring[] | An array of channel identifiers (or channel βslugsβ) across which to create a curation.
Example
letterhead-example-newsletterhtml content for the curation, only p and formatting elements are allowed.
Plain text excerpt of the curated content. Saved as provided β this endpoint does not fetch or crawl the URL for one.
The URL of a featured image to associate with this piece of content.
The name of the site the curated content originated from.
The Y-md H:i:s formatted date of publication.
string[] | An optional array of string tags with which to associate this piece of content. Example: ['dogs', 'canines']
Title of the curated content. Saved as provided β this endpoint does not fetch or crawl the URL for one.
Responses
Section titled β Responses βCuration created (or updated, if a curation for the same url already existed).
Still can’t find what you need? Contact support.