STAGING

πŸ§ͺ Staging Integration Guide

Test your integration safely before going live β€” no risk, no billing, full API

What is the Staging Environment?

Staging is a fully functional copy of the SoWasIt API, dedicated to testing your integration before connecting to production. You can create chains, add blocks, test your webhooks and API keys β€” all for free, with no impact on your production data.

FeatureStagingProduction
API URLapi.staging.sowasit.ioapi.sowasit.io
Billingβœ… Always freePer plan
Stripeβœ… Test mode onlyLive mode
Data retention⚠️ Deleted after 30 daysβœ… Permanent
Rate limitsRelaxedPer plan
πŸ’‘ Identical API. The staging API is 100% identical to production. Every endpoint, every parameter, every response format is the same. When your code works on staging, it will work in production.

Quick Start (3 minutes)

1. Create a free account on staging

Sign up at the staging URL below. Your staging account is separate from your production account.

2. Generate an API key

Go to Dashboard β†’ API Keys β†’ Create key. Copy your staging API key β€” it will only be shown once.

3. Make your first API call

Create your first chain:

curl https://api.staging.sowasit.io/chains \
  -H "X-API-Key: YOUR_STAGING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"id":"my-first-chain","name":"My First Chain"}'

That's it. You now have a blockchain chain on staging. Add blocks, test webhooks, build your integration.

Code Examples

The only thing that changes between staging and production is the base URL and your API key. Here are ready-to-use examples:

cURL

# Create a chain
curl -X POST https://api.staging.sowasit.io/chains \
  -H "X-API-Key: YOUR_STAGING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"id":"my-chain","name":"My Chain","visibility":"private"}'

# Add a block
curl -X POST https://api.staging.sowasit.io/chains/my-chain/blocks \
  -H "X-API-Key: YOUR_STAGING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data":{"event":"user_signed","userId":"u_123","timestamp":"2025-01-15T10:00:00Z"}}'

# Read blocks
curl https://api.staging.sowasit.io/chains/my-chain/blocks \
  -H "X-API-Key: YOUR_STAGING_API_KEY"

JavaScript / Node.js

const API_KEY = 'YOUR_STAGING_API_KEY';
const BASE_URL = 'https://api.staging.sowasit.io';

const headers = {
  'X-API-Key': API_KEY,
  'Content-Type': 'application/json',
};

// Create a chain
await fetch(`${BASE_URL}/chains`, {
  method: 'POST',
  headers,
  body: JSON.stringify({ id: 'my-chain', name: 'My Chain' }),
});

// Add a block
const res = await fetch(`${BASE_URL}/chains/my-chain/blocks`, {
  method: 'POST',
  headers,
  body: JSON.stringify({ data: { event: 'user_signed', userId: 'u_123' } }),
});
const block = await res.json();
console.log('Block hash:', block.hash);

Python

import requests

API_KEY = 'YOUR_STAGING_API_KEY'
BASE_URL = 'https://api.staging.sowasit.io'
headers = {'X-API-Key': API_KEY, 'Content-Type': 'application/json'}

# Create a chain
requests.post(f'{BASE_URL}/chains', json={'id': 'my-chain', 'name': 'My Chain'}, headers=headers)

# Add a block
res = requests.post(
    f'{BASE_URL}/chains/my-chain/blocks',
    json={'data': {'event': 'user_signed', 'userId': 'u_123'}},
    headers=headers
)
print('Block hash:', res.json()['hash'])

Data Retention Policy

Staging data is automatically cleaned every night at 02:00 UTC. This keeps the environment lean and free for everyone.

Data typeRetention
Private chains + blocks⏳ 30 days
Public chains (non-anchoring) + blocks⏳ 30 days
Anchoring chains⏳ 1 year
SessionsOn expiry
⚠️ Do not use staging for permanent data. Staging is for integration testing only. Any data older than 30 days will be permanently deleted without notice. Use production for data you intend to keep.

Need a clean slate? You can delete your chains manually at any time from the dashboard, or simply wait for the nightly cleanup.

Going to Production

Migrating from staging to production requires exactly two changes in your code:

The two changes

1. Change the API base URL

# Staging
const BASE_URL = 'https://api.staging.sowasit.io';

# Production
const BASE_URL = 'https://api.sowasit.io';

That's the only URL change needed. All endpoints, paths and parameters stay the same.

2. Use your production API key

Create a new API key in your production dashboard (sowasit.io β†’ Dashboard β†’ API Keys). Do not reuse your staging key β€” staging and production keys are separate.

βœ… That's it. No SDK to reinstall, no configuration to change, no migration script to run. If your integration works on staging, it will work in production exactly the same way.

Pre-launch checklist

  • βœ… All API calls return the expected responses on staging
  • βœ… Webhook endpoints are validated and receiving events
  • βœ… Error handling tested (invalid key, quota exceeded, etc.)
  • βœ… Production API key created and stored securely
  • βœ… Base URL updated to api.sowasit.io