Get Organization
Retrieves complete information about an organization by its ID.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
organizationId | string | Yes | Unique identifier of the organization |
Response
Returns the organization with:
id: Unique organization identifieraccountId: Account ID this organization belongs toname: Organization namephoneNumber,streetAddress,city,state,zipCode,country: Contact details (if set)created: Creation timestampupdated: Last modification timestamp
Examples
- Go
- TypeScript
import (
"context"
"github.com/silentwitness/go-sdk"
)
response, err := silentwitness.Organizations.Get(ctx, "org_abc123def456")
if err != nil {
log.Fatal(err)
}
fmt.Printf("Organization: %s\n", response.Organization.Name)
fmt.Printf("Address: %s, %s %s\n",
response.Organization.City,
response.Organization.State,
response.Organization.ZipCode)
import { getOrganization } from "@silentwitness/typescript-sdk";
const response = await getOrganization("org_abc123def456");
console.log(`Organization: ${response.organization.name}`);
console.log(`Address: ${response.organization.city}, ${response.organization.state} ${response.organization.zipCode}`);
Errors
| Code | Description |
|---|---|
NOT_FOUND | Organization does not exist |
PERMISSION_DENIED | Organization belongs to a different account |
UNAUTHENTICATED | Invalid or missing API key |