Skip to main content

Update Organization

Updates an existing organization. All fields are optional - only provided fields will be updated.

Endpoint

PUT /api/organizations/:id

Authentication

Requires API Key authentication.

Path Parameters

ParameterTypeRequiredDescription
idstringYesOrganization ID

Request Body

All fields are optional. Only include fields you want to update.

FieldTypeDescription
namestringOrganization name
phone_numberstringPrimary contact phone number
street_addressstringPhysical street address
citystringCity
statestringState or province
zip_codestringZIP or postal code
countrystringCountry

Response

Returns the updated organization object.

{
"success": true,
"data": {
"id": "org_abc123def456",
"account_id": "acc_xyz789",
"name": "Smith & Associates Law Firm",
"phone_number": "555-999-8888",
"street_address": "789 New Street, Suite 500",
"city": "San Francisco",
"state": "CA",
"zip_code": "94103",
"country": "United States",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-20T14:45:00Z"
}
}

Example

curl -X PUT "https://api.silentwitness.ai/api/organizations/org_abc123def456" \
-H "X-API-Key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phone_number": "555-999-8888",
"street_address": "789 New Street, Suite 500",
"zip_code": "94103"
}'

Errors

CodeDescription
400Invalid request body
401Unauthorized - Invalid or missing token
404Organization not found
500Internal server error