Logo
Search
Docs

Subscriptions cancel

POST https://app.sulus.ai/api/subscriptions/cancel

Cancel the active subscription locally

Authentication

Send a bearer token created on your dashboard's Developer page:

Authorization: Bearer <YOUR_API_KEY>

Errors

StatusMeaningBody
401 Missing or invalid bearer token
404 No active subscription {"success":false,"message":"No active subscription found"}

Notes

  • Sets status=cancelled, cancelled_at=now, ends_at=current_period_end.
  • Does not call the upstream payment provider cancel endpoint.
curl --request POST \
  --url https://app.sulus.ai/api/subscriptions/cancel \
  --header 'Authorization: Bearer <YOUR_API_KEY>'
import requests

url = "https://app.sulus.ai/api/subscriptions/cancel"
headers = {"Authorization": "Bearer <YOUR_API_KEY>"}

response = requests.post(url, headers=headers)
print(response.json())
package main

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

func main() {
	url := "https://app.sulus.ai/api/subscriptions/cancel"
	req, _ := http.NewRequest("POST", url, nil)
	req.Header.Add("Authorization", "Bearer <YOUR_API_KEY>")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
Response 200
{
    "success": true,
    "message": "Subscription cancelled successfully"
}