Skip to main content
POST
/
open-api
/
v1.1
/
memberships
/
tiers
Create Tier
curl --request POST \
  --url https://api.fourthwall.com/open-api/v1.1/memberships/tiers \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "monthlyAmounts": {
    "usd": 75000050,
    "eur": 123,
    "gbp": 123,
    "cad": 123,
    "aud": 123,
    "nzd": 123,
    "sek": 123,
    "nok": 123,
    "dkk": 123,
    "pln": 123,
    "jpy": 123,
    "myr": 123,
    "sgd": 123,
    "mxn": 123
  },
  "imageResourceId": 123,
  "pricesAutomaticallyConverted": true,
  "askForShippingAddress": true,
  "freeTrial": true
}
'
import requests

url = "https://api.fourthwall.com/open-api/v1.1/memberships/tiers"

payload = {
"name": "<string>",
"description": "<string>",
"monthlyAmounts": {
"usd": 75000050,
"eur": 123,
"gbp": 123,
"cad": 123,
"aud": 123,
"nzd": 123,
"sek": 123,
"nok": 123,
"dkk": 123,
"pln": 123,
"jpy": 123,
"myr": 123,
"sgd": 123,
"mxn": 123
},
"imageResourceId": 123,
"pricesAutomaticallyConverted": True,
"askForShippingAddress": True,
"freeTrial": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
monthlyAmounts: {
usd: 75000050,
eur: 123,
gbp: 123,
cad: 123,
aud: 123,
nzd: 123,
sek: 123,
nok: 123,
dkk: 123,
pln: 123,
jpy: 123,
myr: 123,
sgd: 123,
mxn: 123
},
imageResourceId: 123,
pricesAutomaticallyConverted: true,
askForShippingAddress: true,
freeTrial: true
})
};

fetch('https://api.fourthwall.com/open-api/v1.1/memberships/tiers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fourthwall.com/open-api/v1.1/memberships/tiers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'monthlyAmounts' => [
'usd' => 75000050,
'eur' => 123,
'gbp' => 123,
'cad' => 123,
'aud' => 123,
'nzd' => 123,
'sek' => 123,
'nok' => 123,
'dkk' => 123,
'pln' => 123,
'jpy' => 123,
'myr' => 123,
'sgd' => 123,
'mxn' => 123
],
'imageResourceId' => 123,
'pricesAutomaticallyConverted' => true,
'askForShippingAddress' => true,
'freeTrial' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.fourthwall.com/open-api/v1.1/memberships/tiers"

payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"monthlyAmounts\": {\n \"usd\": 75000050,\n \"eur\": 123,\n \"gbp\": 123,\n \"cad\": 123,\n \"aud\": 123,\n \"nzd\": 123,\n \"sek\": 123,\n \"nok\": 123,\n \"dkk\": 123,\n \"pln\": 123,\n \"jpy\": 123,\n \"myr\": 123,\n \"sgd\": 123,\n \"mxn\": 123\n },\n \"imageResourceId\": 123,\n \"pricesAutomaticallyConverted\": true,\n \"askForShippingAddress\": true,\n \"freeTrial\": true\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.fourthwall.com/open-api/v1.1/memberships/tiers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"monthlyAmounts\": {\n \"usd\": 75000050,\n \"eur\": 123,\n \"gbp\": 123,\n \"cad\": 123,\n \"aud\": 123,\n \"nzd\": 123,\n \"sek\": 123,\n \"nok\": 123,\n \"dkk\": 123,\n \"pln\": 123,\n \"jpy\": 123,\n \"myr\": 123,\n \"sgd\": 123,\n \"mxn\": 123\n },\n \"imageResourceId\": 123,\n \"pricesAutomaticallyConverted\": true,\n \"askForShippingAddress\": true,\n \"freeTrial\": true\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.fourthwall.com/open-api/v1.1/memberships/tiers")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"monthlyAmounts\": {\n \"usd\": 75000050,\n \"eur\": 123,\n \"gbp\": 123,\n \"cad\": 123,\n \"aud\": 123,\n \"nzd\": 123,\n \"sek\": 123,\n \"nok\": 123,\n \"dkk\": 123,\n \"pln\": 123,\n \"jpy\": 123,\n \"myr\": 123,\n \"sgd\": 123,\n \"mxn\": 123\n },\n \"imageResourceId\": 123,\n \"pricesAutomaticallyConverted\": true,\n \"askForShippingAddress\": true,\n \"freeTrial\": true\n}"

response = http.request(request)
puts response.read_body
{
  "id": 123
}
{
"parameters": "{ \"post_id\": [ \"is missing\" ] }",
"body": "{ \"discount\": { \"percentOff\": [ \"is missing\" ] } }"
}
OAuth scope: memberships_writeAPI keys have full access to this endpoint.

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Headers

X-ShopId
string

Body

application/json
name
string
required
Required string length: 1 - 40
description
string
required
Maximum string length: 600
monthlyAmounts
object
required
imageResourceId
integer
pricesAutomaticallyConverted
boolean
askForShippingAddress
boolean
discount
object
freeTrial
boolean

Response

id
integer
required