SSpiderIQ
SSpiderIQ

Docs / api-reference/crm-provision

crm-provision

2 endpoints from the published OpenAPI import.

POST/api/v1/crm/provision

Provision the CRM workspace (idempotent)

Create (or return the existing) CRM workspace for the caller's client.

Thin wrapper around :func:services.crm.provision_workspace, which handles the two-session dance (RLS-scoped group/board creation, then plain-role IDAP backfill). Safe to call repeatedly.

Try it

Examples

cURL
curl -X POST 'https://spideriq.ai/api/v1/crm/provision' \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string",
  "backfill_limit": 0
}'
Python
import httpx

resp = httpx.post(
    "https://spideriq.ai/api/v1/crm/provision",
    headers={"Authorization": "Bearer <token>", "Content-Type": "application/json"},
    json={"name": "string", "backfill_limit": 0},
)
resp.raise_for_status()
print(resp.json())
JavaScript
const resp = await fetch("https://spideriq.ai/api/v1/crm/provision", {
  method: "POST",
  headers: { "Authorization": "Bearer <token>", "Content-Type": "application/json" },
  body: JSON.stringify({"name": "string", "backfill_limit": 0})
});
const data = await resp.json();
console.log(data);
Go
package main

import (
	"net/http"
	"strings"
)

func main() {
	body := strings.NewReader(`{"name": "string", "backfill_limit": 0}`)
	req, _ := http.NewRequest("POST", "https://spideriq.ai/api/v1/crm/provision", body)
	req.Header.Set("Authorization", "Bearer <token>")
	req.Header.Set("Content-Type", "application/json")
	resp, _ := http.DefaultClient.Do(req)
	defer resp.Body.Close()
}

Responses

StatusDescription
200Successful Response
422Validation Error
GET/api/v1/crm/health

CRM schema health check

Return 200 if the CRM DDL is in place, the RLS policies are enabled, and both CRM roles exist. No tenant scope — safe to expose.

Try it

Examples

cURL
curl -X GET 'https://spideriq.ai/api/v1/crm/health' \
  -H 'Authorization: Bearer <token>'
Python
import httpx

resp = httpx.get(
    "https://spideriq.ai/api/v1/crm/health",
    headers={"Authorization": "Bearer <token>"},
)
resp.raise_for_status()
print(resp.json())
JavaScript
const resp = await fetch("https://spideriq.ai/api/v1/crm/health", {
  method: "GET",
  headers: { "Authorization": "Bearer <token>" }
});
const data = await resp.json();
console.log(data);
Go
package main

import (
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://spideriq.ai/api/v1/crm/health", nil)
	req.Header.Set("Authorization", "Bearer <token>")
	resp, _ := http.DefaultClient.Do(req)
	defer resp.Body.Close()
}

Responses

StatusDescription
200Successful Response