Skip to main content
POST
/
subscribe
Subscribe
curl --request POST \
  --url https://xquik.com/api/v1/subscribe \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "tier": "<string>"
}
'
import requests

url = "https://xquik.com/api/v1/subscribe"

payload = { "tier": "<string>" }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}

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

print(response.text)
const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({tier: '<string>'})
};

fetch('https://xquik.com/api/v1/subscribe', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
package main

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

func main() {

url := "https://xquik.com/api/v1/subscribe"

payload := strings.NewReader("{\n \"tier\": \"<string>\"\n}")

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

req.Header.Add("x-api-key", "<api-key>")
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))

}
Free - does not consume credits
Returns a checkout URL for new subscribers or a billing portal URL for existing subscribers.
curl -X POST https://xquik.com/api/v1/subscribe \
  -H "x-api-key: xq_YOUR_KEY_HERE" | jq
const response = await fetch("https://xquik.com/api/v1/subscribe", {
  method: "POST",
  headers: {
    "x-api-key": "xq_YOUR_KEY_HERE",
  },
});
const data = await response.json();
// Redirect user to data.url
import requests

response = requests.post(
    "https://xquik.com/api/v1/subscribe",
    headers={"x-api-key": "xq_YOUR_KEY_HERE"},
)
data = response.json()
# Redirect user to data["url"]
package main

import (
    "encoding/json"
    "fmt"
    "net/http"
)

func main() {
    req, err := http.NewRequest("POST", "https://xquik.com/api/v1/subscribe", nil)
    if err != nil {
        panic(err)
    }
    req.Header.Set("x-api-key", "xq_YOUR_KEY_HERE")

    resp, err := http.DefaultClient.Do(req)
    if err != nil {
        panic(err)
    }
    defer resp.Body.Close()

    var data map[string]interface{}
    if err := json.NewDecoder(resp.Body).Decode(&data); err != nil {
        panic(err)
    }
    fmt.Println(data)
}

Headers

x-api-key
string
required
Your API key. Session cookie authentication is also supported. Generate a key from the dashboard.

Body

tier
string
Subscription tier to pre-select. One of: starter, pro, business. If omitted, the user chooses on the checkout page.

Response

url
string
Checkout URL (new subscribers) or billing portal URL (existing subscribers). Redirect the user to this URL.
message
string
Human-readable message describing the action taken.
status
string
One of: already_subscribed, checkout_created, payment_issue.
{
  "url": "https://xquik.com/billing/checkout/session",
  "message": "Complete checkout at the URL below to start your subscription.",
  "status": "checkout_created"
}
Related: Get Account to check current subscription status and usage.
Last modified on May 6, 2026