Save a tier
curl --request POST \
--url https://api.1-news.app/v1/projects/{projectId}/membership/tiers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"currency": "<string>",
"tierId": "<string>",
"enabled": true,
"prices": [
{}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
currency: '<string>',
tierId: '<string>',
enabled: true,
prices: [{}]
})
};
fetch('https://api.1-news.app/v1/projects/{projectId}/membership/tiers', 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}/membership/tiers"
payload = {
"name": "<string>",
"description": "<string>",
"currency": "<string>",
"tierId": "<string>",
"enabled": True,
"prices": [{}]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>"
}Membership
Save a tier
Create or update a paid membership tier and its prices.
POST
/
v1
/
projects
/
{projectId}
/
membership
/
tiers
Save a tier
curl --request POST \
--url https://api.1-news.app/v1/projects/{projectId}/membership/tiers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"currency": "<string>",
"tierId": "<string>",
"enabled": true,
"prices": [
{}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
currency: '<string>',
tierId: '<string>',
enabled: true,
prices: [{}]
})
};
fetch('https://api.1-news.app/v1/projects/{projectId}/membership/tiers', 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}/membership/tiers"
payload = {
"name": "<string>",
"description": "<string>",
"currency": "<string>",
"tierId": "<string>",
"enabled": True,
"prices": [{}]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>"
}Save a membership tier. Sending tierId updates that tier. Omitting it creates one. You need the membership tool.
Prices to store. Each item has interval (day, week, month, or year) and amountCents. This list replaces the tier’s prices.