Skip to main content

Create Organization

Creates a new organization in your account.

Endpoint

POST /api/organizations

Authentication

Requires API Key authentication.

Request Body

FieldTypeRequiredDescription
namestringYesOrganization name
phone_numberstringYesPrimary contact phone number
street_addressstringYesPhysical street address
citystringYesCity
statestringYesState or province
zip_codestringYesZIP or postal code
countrystringYesCountry

Response

Returns the created organization object.

{
"success": true,
"data": {
"id": "org_abc123def456",
"account_id": "acc_xyz789",
"name": "Smith & Associates Law Firm",
"phone_number": "555-123-4567",
"street_address": "123 Main Street, Suite 400",
"city": "San Francisco",
"state": "CA",
"zip_code": "94102",
"country": "United States",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
}

Example

curl -X POST "https://api.silentwitness.ai/api/organizations" \
-H "X-API-Key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Smith & Associates Law Firm",
"phone_number": "555-123-4567",
"street_address": "123 Main Street, Suite 400",
"city": "San Francisco",
"state": "CA",
"zip_code": "94102",
"country": "United States"
}'

Errors

CodeDescription
400Missing required field (name, phone_number, etc.)
401Unauthorized - Invalid or missing token
500Internal server error

Example Error

{
"success": false,
"error": "Name is required"
}