Deactivate an organization
client.orgs.deactivate(stringorgID, RequestOptionsoptions?): OrgDeactivateResponse { createdAt, isActive, orgId, 6 more }
/v1/orgs/{orgId}/deactivate
Deactivates an organization, preventing it from being used for new studies or user assignments. Existing data is preserved and the organization can be reactivated later.
Parameters
orgID: string
Unique organization identifier. Format: org_{32-hex-chars}
Returns
Deactivate an organization
import Avara from 'avara';
const client = new Avara({
apiKey: process.env['AVARA_API_KEY'], // This is the default and can be omitted
});
const response = await client.orgs.deactivate('org_1234567890abcdef1234567890abcdef');
console.log(response.createdAt);
{
"createdAt": "2024-01-15T09:00:00Z",
"isActive": true,
"orgId": "org_1234567890abcdef1234567890abcdef",
"orgName": "City Medical Center - Radiology Department",
"updatedAt": "2024-03-15T14:20:00Z",
"userCount": 15,
"createdByApiKeyId": "550e8400-e29b-41d4-a716-446655440000",
"createdByUserId": "usr_1234567890abcdef1234567890abcdef",
"metadata": {
"department": "radiology",
"region": "northeast"
}
}
Returns Examples
{
"createdAt": "2024-01-15T09:00:00Z",
"isActive": true,
"orgId": "org_1234567890abcdef1234567890abcdef",
"orgName": "City Medical Center - Radiology Department",
"updatedAt": "2024-03-15T14:20:00Z",
"userCount": 15,
"createdByApiKeyId": "550e8400-e29b-41d4-a716-446655440000",
"createdByUserId": "usr_1234567890abcdef1234567890abcdef",
"metadata": {
"department": "radiology",
"region": "northeast"
}
}