Organizations

Delete the current organization

Starts an owner-authorized organization deletion operation, confirming the organization name in the request.

POST
/v1/organizations/deletion-operations

Starts an owner-authorized organization deletion operation, confirming the organization name in the request. Repeating the same request with the same Idempotency-Key returns the existing organization-scoped operation.

Authorization

apiKey
headerx-api-key<token>

Header Parameters

idempotency-key*string
Length1 <= length <= 255

Request Body

application/json
  1. body
confirmationName*string

Response Body

OperationAccepted

application/json
  1. response
operation*
links*
Example Request
import { createClient } from "samva";const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });const result = await samva.organizations.delete({  "confirmationName": "example"});
Example Response
{  "operation": {    "id": "string",    "organizationId": "string",    "kind": "email-domain-provisioning",    "subject": {      "type": "string",      "id": "string"    },    "actor": {      "type": "user",      "id": "string"    },    "status": "pending",    "phase": "accepted",    "error": {      "code": "validation-failed",      "message": "string"    },    "createdAt": "string",    "updatedAt": "string",    "startedAt": "string",    "completedAt": "string"  },  "links": {    "self": "string",    "resource": {      "resource": {        "type": "string",        "id": "string"      },      "href": "string"    }  }}

Related documentation