Skip to main content

Get Organization

Retrieves complete information about an organization by its ID.

Parameters

ParameterTypeRequiredDescription
organizationIdstringYesUnique identifier of the organization

Response

Returns the organization with:

  • id: Unique organization identifier
  • accountId: Account ID this organization belongs to
  • name: Organization name
  • phoneNumber, streetAddress, city, state, zipCode, country: Contact details (if set)
  • created: Creation timestamp
  • updated: Last modification timestamp

Examples

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)

Errors

CodeDescription
NOT_FOUNDOrganization does not exist
PERMISSION_DENIEDOrganization belongs to a different account
UNAUTHENTICATEDInvalid or missing API key