Skip to content
Get started

Organizations

Organizations are a powerful feature in Straddle that allow you to manage multiple accounts under a single umbrella. This hierarchical structure is particularly useful for businesses with complex operations, multiple departments, or legally related entities.

Create an organization
client.Embed.Organizations.New(ctx, params) (*OrganizationV1, error)
POST/v1/organizations
List organizations
client.Embed.Organizations.List(ctx, params) (*PageNumberSchema[OrganizationPagedV1Data], error)
GET/v1/organizations
Retrieve organization details
client.Embed.Organizations.Get(ctx, organizationID, query) (*OrganizationV1, error)
GET/v1/organizations/{organization_id}
ModelsExpand Collapse
type OrganizationPagedV1 struct{…}
Data []OrganizationPagedV1Data
ID string

Straddle's unique identifier for the organization.

formatuuid
CreatedAt Time

Timestamp of when the organization was created.

formatdate-time
Name string

The name of the organization.

UpdatedAt Time

Timestamp of the most recent update to the organization.

formatdate-time
ExternalID stringoptional

Unique identifier for the organization in your database, used for cross-referencing between Straddle and your systems.

Metadata map[string, string]optional

Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the organization in a structured format.

Metadata about the API request, including an identifier, timestamp, and pagination details.

APIRequestID string

Unique identifier for this API request, useful for troubleshooting.

formatuuid
APIRequestTimestamp Time

Timestamp for this API request, useful for troubleshooting.

formatdate-time
MaxPageSize int64

Maximum allowed page size for this endpoint.

formatint32
PageNumber int64

Page number for paginated results.

formatint32
PageSize int64

Number of items per page in this response.

formatint32
SortBy string

The field that the results were sorted by.

SortOrder PagedResponseMetadataSortOrder
One of the following:
const PagedResponseMetadataSortOrderAsc PagedResponseMetadataSortOrder = "asc"
const PagedResponseMetadataSortOrderDesc PagedResponseMetadataSortOrder = "desc"
TotalItems int64

Total number of items returned in this response.

formatint32
TotalPages int64

The number of pages available.

formatint32
ResponseType OrganizationPagedV1ResponseType

Indicates the structure of the returned content.

  • "object" means the data field contains a single JSON object.
  • "array" means the data field contains an array of objects.
  • "error" means the data field contains an error object with details of the issue.
  • "none" means no data is returned.
One of the following:
const OrganizationPagedV1ResponseTypeObject OrganizationPagedV1ResponseType = "object"
const OrganizationPagedV1ResponseTypeArray OrganizationPagedV1ResponseType = "array"
const OrganizationPagedV1ResponseTypeError OrganizationPagedV1ResponseType = "error"
const OrganizationPagedV1ResponseTypeNone OrganizationPagedV1ResponseType = "none"
type OrganizationV1 struct{…}
Data OrganizationV1Data
ID string

Straddle's unique identifier for the organization.

formatuuid
CreatedAt Time

Timestamp of when the organization was created.

formatdate-time
Name string

The name of the organization.

UpdatedAt Time

Timestamp of the most recent update to the organization.

formatdate-time
ExternalID stringoptional

Unique identifier for the organization in your database, used for cross-referencing between Straddle and your systems.

Metadata map[string, string]optional

Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the organization in a structured format.

Metadata about the API request, including an identifier and timestamp.

APIRequestID string

Unique identifier for this API request, useful for troubleshooting.

formatuuid
APIRequestTimestamp Time

Timestamp for this API request, useful for troubleshooting.

formatdate-time
ResponseType OrganizationV1ResponseType

Indicates the structure of the returned content.

  • "object" means the data field contains a single JSON object.
  • "array" means the data field contains an array of objects.
  • "error" means the data field contains an error object with details of the issue.
  • "none" means no data is returned.
One of the following:
const OrganizationV1ResponseTypeObject OrganizationV1ResponseType = "object"
const OrganizationV1ResponseTypeArray OrganizationV1ResponseType = "array"
const OrganizationV1ResponseTypeError OrganizationV1ResponseType = "error"
const OrganizationV1ResponseTypeNone OrganizationV1ResponseType = "none"