---
title: "Signup API — SpireStock REST API"
description: "Create a SpireStock workspace programmatically, check slug availability and complete onboarding for a new organization."
source: https://developers.spirestock.com/api-reference/signup
---

# Signup API

Create a SpireStock workspace programmatically, check slug availability and complete onboarding for a new organization.

Base URL: `https://api.spirestock.com/api/v1`. Every request needs an API key (`X-API-Key`) or a session token (`Authorization: Bearer`); see https://developers.spirestock.com/api-reference/auth.

## Endpoints

- [POST /signup/register](https://developers.spirestock.com/api-reference/signup#post-signup-register)

## POST /signup/register

Register a new organization and its admin user. Creates the workspace (free plan, with a trial) and default settings, and returns a JWT for immediate sign-in. Missing required fields answer 400 "company_name, slug, admin_email, admin_phone, admin_password are required"; disposable email addresses and weak passwords are rejected with 400. Requires a Turnstile token in production; rate limited to 5 signups per hour.

**Request body**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `company_name` | string | yes | Name of the organization, 2-100 characters |
| `slug` | string | yes | Workspace subdomain (min 5 characters, starts with a letter); check it first with GET /signup/check-slug/{slug} |
| `admin_email` | string | yes | Admin email address |
| `admin_phone` | string | yes | Admin phone number |
| `admin_password` | string | yes | Password (min 8 characters with upper, lower, digit and symbol) |
| `admin_first_name` | string | no | Defaults to the first word of company_name |
| `admin_last_name` | string | no | Defaults to Admin |
| `state` | string | no | State |
| `pincode` | string | no | Pincode |
| `referral_code` | string | no | Referral code, if any |

**Example request**

```bash
curl -X POST https://api.spirestock.com/api/v1/signup/register \
  -H "Content-Type: application/json" \
  -d '{
    "company_name": "Acme Dairy",
    "slug": "acmedairy",
    "admin_first_name": "Jane",
    "admin_last_name": "Smith",
    "admin_email": "jane@acmedairy.com",
    "admin_phone": "9876500020",
    "admin_password": "secureP@ss123"
  }'
```

**Example response**

```json
{
  "response_code": 201,
  "message": "Workspace created successfully",
  "token": "eyJhbGciOiJIUzI1NiIs...",
  "user": {
    "auth_methods_used": [],
    "is_distributor": 0,
    "is_super_stockist": 0,
    "is_retailer": 0,
    "is_tagged": 0,
    "self_owned": 0,
    "purchase_milk_from_org": 0,
    "id": 100,
    "first_name": "Jane",
    "last_name": "Smith",
    "official_email": "jane@acmedairy.com",
    "primary_contact_number": "9876500020",
    "role_id": 0,
    "role_name": "Admin",
    "user_type": 0,
    "organization_id": 10,
    "organization_name": "Demo Dairy",
    "status": 1,
    "updatedAt": "2026-10-22T10:59:02.802Z",
    "createdAt": "2026-10-22T10:59:02.802Z",
    "salutation": null,
    "middle_name": null,
    "store_name": null,
    "store_image": null,
    "emp_sap_id": null,
    "department_id": null,
    "department_name": null,
    "reporting_to_id": null,
    "reporting_to_name": null,
    "reporting_to_emp_id": null,
    "profile_image": null,
    "device_id": null,
    "last_login": null,
    "last_auth_method": null,
    "onboarding_state": null,
    "last_ip": null,
    "tagged_by": null,
    "tagged_date": null,
    "periphery": null,
    "timing": null,
    "latitude": null,
    "longitude": null,
    "other_brand_id": null,
    "other_brand_name": null,
    "retailer_type_id": null,
    "retailer_class_type_id": null,
    "visit_date_time": null,
    "created_by": null,
    "oauth_provider": null,
    "portal_onboarding_completed_at": null,
    "app_version": null
  },
  "workspace": {
    "slug": "acme-dairy",
    "display_name": "Acme Dairy",
    "plan": "free",
    "status": 1,
    "trial_ends_at": "2026-11-05T10:59:02.788Z"
  },
  "referral": {
    "applied": false,
    "bonusDays": 0
  }
}
```
