Update a story
curl --request PATCH \
--url https://api.1-news.app/v1/projects/{projectId}/articles/{articleId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"action": "<string>"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({title: '<string>', action: '<string>'})
};
fetch('https://api.1-news.app/v1/projects/{projectId}/articles/{articleId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.1-news.app/v1/projects/{projectId}/articles/{articleId}"
payload = {
"title": "<string>",
"action": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)Stories
Update a story
PATCH /v1/projects//articles/ updates a story. A published story stays published unless you send action publish.
PATCH
/
v1
/
projects
/
{projectId}
/
articles
/
{articleId}
Update a story
curl --request PATCH \
--url https://api.1-news.app/v1/projects/{projectId}/articles/{articleId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"action": "<string>"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({title: '<string>', action: '<string>'})
};
fetch('https://api.1-news.app/v1/projects/{projectId}/articles/{articleId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.1-news.app/v1/projects/{projectId}/articles/{articleId}"
payload = {
"title": "<string>",
"action": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)Update a story. The body fields are the same as Create a story. A story that is already published stays published, and keeps its publish time, unless you set
action to publish.