Update a data feed
const url = 'https://api.tryletterhead.com/api/v3/curations/data-feeds/example?api=true';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"title":"example","description":"example","feedUrl":"example","archiveIntervalDays":1,"tags":["example"],"channels":[1],"fieldMappings":[{"source":"example","target":"example"}],"authType":1,"bearerToken":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url 'https://api.tryletterhead.com/api/v3/curations/data-feeds/example?api=true' \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "title": "example", "description": "example", "feedUrl": "example", "archiveIntervalDays": 1, "tags": [ "example" ], "channels": [ 1 ], "fieldMappings": [ { "source": "example", "target": "example" } ], "authType": 1, "bearerToken": "example" }'Update an existing company-level JSON data feed. This endpoint replaces the feed’s full set of
fields — every property required on Create a data feed must be supplied again, not just the
ones changing. An omitted bearerToken on an authType: 1 feed keeps the credential already
stored.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The data feed’s unique identifier, from List data feeds.
Query Parameters
Section titled “Query Parameters ”Required. Set to true to authenticate with your company API key rather than a signed-in session.
Request Body required
Section titled “Request Body required ”object
object
Example generated
{ "title": "example", "description": "example", "feedUrl": "example", "archiveIntervalDays": 1, "tags": [ "example" ], "channels": [ 1 ], "fieldMappings": [ { "source": "example", "target": "example" } ], "authType": 1, "bearerToken": "example"}Responses
Section titled “ Responses ”Data feed updated
object
The shape returned for both RSS feeds (List curation feeds) and JSON data feeds (List data
feeds) — type (0 RSS, 1 JSON data feed) tells the two apart. fieldMappings, authType,
and hasAuthSecret are only meaningful on a JSON data feed.
object
0 RSS feed, 1 JSON data feed.
The channel this feed was originally created against, or blank for a feed shared to multiple channels with no single owner.
Internal numeric identifiers of every channel this feed is shared with.
0 — no authentication. 1 — bearer token.
Whether a credential is stored — the credential itself is never returned.
object
Example generated
{ "items": { "uniqueId": "example", "title": "example", "description": "example", "feedUrl": "example", "type": 1, "isValid": true, "validationCode": 1, "crawl": true, "archiveIntervalDays": 1, "lastValidated": "example", "lastQueried": "example", "channelName": "example", "channelSlug": "example", "sharedChannelIds": [ 1 ], "tags": [ "example" ], "authType": 1, "hasAuthSecret": true, "fieldMappings": [ { "source": "example", "target": "example" } ], "createdAt": "example", "updatedAt": "example", "deletedAt": "example" }, "message": "example", "total": 1}Still can’t find what you need? Contact support.