Spatio.Api.Organizations (spatio_sdk v0.0.2)
API calls for all endpoints tagged Organizations.
Summary
Functions
Accept an invitation to this organization.
Add a member directly (skips invitation flow).
Create an organization.
Create an org-brain concept (admin+ only).
Create a custom role (admin+ only).
Invite a user to the organization.
Pending invitations count toward seat cap. Free-tier callers at the cap receive a 402 with billing-upgrade payload; paid-tier auto-scales the Stripe quantity.
Create a workspace inside an organization.
Requires the OrgActionCreateWorkspace action permission. Slug collisions auto-suffix (-2, -3, ...).
Delete an organization.
Delete a concept (admin+ only).
Delete a custom role (admin+ only).
Delete the organization logo.
Fetch a single organization.
Wire format note: response uses PascalCase keys (ID, Name, Slug, ...) — distinct from the rest of the SpatioAPI's camelCase convention. Documented as-is; a future cleanup will harmonize.
Fetch a concept.
List the caller's organizations.
Read the organization audit log (admin / billing-admin only).
List org-brain concepts (curated knowledge surfaced to agents).
List custom roles defined on the organization.
List pending invitations for an organization.
List members of an organization.
List workspaces in an organization.
Remove a member from the organization.
Revoke and reissue an invitation with a fresh token.
Revoke a pending invitation.
Update organization metadata.
Update a concept (admin+ only).
Update a custom role (admin+ only).
Update a member's role.
Upload (or replace) the organization logo. Multipart.
Functions
@spec accept_organization_invitation( Tesla.Env.client(), String.t(), Spatio.Model.AcceptOrganizationInvitationRequest.t(), keyword() ) :: {:ok, %{optional(String.t()) => any()}} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Accept an invitation to this organization.
Parameters
connection(Spatio.Connection): Connection to serverorg(String.t):accept_organization_invitation_request(AcceptOrganizationInvitationRequest):opts(keyword): Optional parameters
Returns
{:ok, %{}}on success{:error, Tesla.Env.t}on failure
@spec add_organization_member( Tesla.Env.client(), String.t(), Spatio.Model.AddOrganizationMemberRequest.t(), keyword() ) :: {:ok, %{optional(String.t()) => any()}} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Add a member directly (skips invitation flow).
Parameters
connection(Spatio.Connection): Connection to serverorg(String.t):add_organization_member_request(AddOrganizationMemberRequest):opts(keyword): Optional parameters
Returns
{:ok, %{}}on success{:error, Tesla.Env.t}on failure
@spec create_organization( Tesla.Env.client(), Spatio.Model.CreateOrganizationRequest.t(), keyword() ) :: {:ok, %{optional(String.t()) => any()}} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Create an organization.
Parameters
connection(Spatio.Connection): Connection to servercreate_organization_request(CreateOrganizationRequest):opts(keyword): Optional parameters
Returns
{:ok, %{}}on success{:error, Tesla.Env.t}on failure
@spec create_organization_concept( Tesla.Env.client(), String.t(), %{optional(String.t()) => any()}, keyword() ) :: {:ok, %{optional(String.t()) => any()}} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Create an org-brain concept (admin+ only).
Parameters
connection(Spatio.Connection): Connection to serverorg(String.t):request_body(%{optional(String.t) => any()}):opts(keyword): Optional parameters
Returns
{:ok, %{}}on success{:error, Tesla.Env.t}on failure
@spec create_organization_custom_role( Tesla.Env.client(), String.t(), %{optional(String.t()) => any()}, keyword() ) :: {:ok, %{optional(String.t()) => any()}} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Create a custom role (admin+ only).
Parameters
connection(Spatio.Connection): Connection to serverorg(String.t):request_body(%{optional(String.t) => any()}):opts(keyword): Optional parameters
Returns
{:ok, %{}}on success{:error, Tesla.Env.t}on failure
@spec create_organization_invitation( Tesla.Env.client(), String.t(), Spatio.Model.CreateOrganizationInvitationRequest.t(), keyword() ) :: {:ok, Spatio.Model.OrganizationInvitation.t()} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Invite a user to the organization.
Pending invitations count toward seat cap. Free-tier callers at the cap receive a 402 with billing-upgrade payload; paid-tier auto-scales the Stripe quantity.
Parameters
connection(Spatio.Connection): Connection to serverorg(String.t):create_organization_invitation_request(CreateOrganizationInvitationRequest):opts(keyword): Optional parameters
Returns
{:ok, Spatio.Model.OrganizationInvitation.t}on success{:error, Tesla.Env.t}on failure
@spec create_organization_workspace( Tesla.Env.client(), String.t(), Spatio.Model.CreateWorkspaceRequest.t(), keyword() ) :: {:ok, Spatio.Model.WorkspaceEnvelope.t()} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Create a workspace inside an organization.
Requires the OrgActionCreateWorkspace action permission. Slug collisions auto-suffix (-2, -3, ...).
Parameters
connection(Spatio.Connection): Connection to serverorg(String.t):create_workspace_request(CreateWorkspaceRequest):opts(keyword): Optional parameters
Returns
{:ok, Spatio.Model.WorkspaceEnvelope.t}on success{:error, Tesla.Env.t}on failure
@spec delete_organization(Tesla.Env.client(), String.t(), keyword()) :: {:ok, nil} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Delete an organization.
Parameters
connection(Spatio.Connection): Connection to serverorg(String.t): Organization id or slug.opts(keyword): Optional parameters
Returns
{:ok, nil}on success{:error, Tesla.Env.t}on failure
@spec delete_organization_concept( Tesla.Env.client(), String.t(), String.t(), keyword() ) :: {:ok, nil} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Delete a concept (admin+ only).
Parameters
connection(Spatio.Connection): Connection to serverorg(String.t):slug(String.t):opts(keyword): Optional parameters
Returns
{:ok, nil}on success{:error, Tesla.Env.t}on failure
@spec delete_organization_custom_role( Tesla.Env.client(), String.t(), String.t(), keyword() ) :: {:ok, nil} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Delete a custom role (admin+ only).
Parameters
connection(Spatio.Connection): Connection to serverorg(String.t):role_id(String.t):opts(keyword): Optional parameters
Returns
{:ok, nil}on success{:error, Tesla.Env.t}on failure
@spec delete_organization_logo(Tesla.Env.client(), String.t(), keyword()) :: {:ok, nil} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Delete the organization logo.
Parameters
connection(Spatio.Connection): Connection to serverorg(String.t):opts(keyword): Optional parameters
Returns
{:ok, nil}on success{:error, Tesla.Env.t}on failure
@spec get_organization(Tesla.Env.client(), String.t(), keyword()) :: {:ok, Spatio.Model.OrganizationDetailLegacy.t()} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Fetch a single organization.
Wire format note: response uses PascalCase keys (ID, Name, Slug, ...) — distinct from the rest of the SpatioAPI's camelCase convention. Documented as-is; a future cleanup will harmonize.
Parameters
connection(Spatio.Connection): Connection to serverorg(String.t): Organization id or slug.opts(keyword): Optional parameters
Returns
{:ok, Spatio.Model.OrganizationDetailLegacy.t}on success{:error, Tesla.Env.t}on failure
@spec get_organization_concept(Tesla.Env.client(), String.t(), String.t(), keyword()) :: {:ok, %{optional(String.t()) => any()}} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Fetch a concept.
Parameters
connection(Spatio.Connection): Connection to serverorg(String.t):slug(String.t):opts(keyword): Optional parameters
Returns
{:ok, %{}}on success{:error, Tesla.Env.t}on failure
@spec list_my_organizations( Tesla.Env.client(), keyword() ) :: {:ok, Spatio.Model.OrganizationListResponse.t()} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
List the caller's organizations.
Parameters
connection(Spatio.Connection): Connection to serveropts(keyword): Optional parameters
Returns
{:ok, Spatio.Model.OrganizationListResponse.t}on success{:error, Tesla.Env.t}on failure
@spec list_organization_audit_log(Tesla.Env.client(), String.t(), keyword()) :: {:ok, %{optional(String.t()) => any()}} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Read the organization audit log (admin / billing-admin only).
Parameters
connection(Spatio.Connection): Connection to serverorg(String.t):opts(keyword): Optional parameters:limit(integer())::cursor(String.t):
Returns
{:ok, %{}}on success{:error, Tesla.Env.t}on failure
@spec list_organization_concepts(Tesla.Env.client(), String.t(), keyword()) :: {:ok, %{optional(String.t()) => any()}} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
List org-brain concepts (curated knowledge surfaced to agents).
Parameters
connection(Spatio.Connection): Connection to serverorg(String.t):opts(keyword): Optional parameters
Returns
{:ok, %{}}on success{:error, Tesla.Env.t}on failure
@spec list_organization_custom_roles(Tesla.Env.client(), String.t(), keyword()) :: {:ok, %{optional(String.t()) => any()}} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
List custom roles defined on the organization.
Parameters
connection(Spatio.Connection): Connection to serverorg(String.t):opts(keyword): Optional parameters
Returns
{:ok, %{}}on success{:error, Tesla.Env.t}on failure
@spec list_organization_invitations(Tesla.Env.client(), String.t(), keyword()) :: {:ok, Spatio.Model.OrganizationInvitationListResponse.t()} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
List pending invitations for an organization.
Parameters
connection(Spatio.Connection): Connection to serverorg(String.t):opts(keyword): Optional parameters
Returns
{:ok, Spatio.Model.OrganizationInvitationListResponse.t}on success{:error, Tesla.Env.t}on failure
@spec list_organization_members(Tesla.Env.client(), String.t(), keyword()) :: {:ok, Spatio.Model.OrganizationMemberListResponse.t()} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
List members of an organization.
Parameters
connection(Spatio.Connection): Connection to serverorg(String.t):opts(keyword): Optional parameters
Returns
{:ok, Spatio.Model.OrganizationMemberListResponse.t}on success{:error, Tesla.Env.t}on failure
@spec list_organization_workspaces(Tesla.Env.client(), String.t(), keyword()) :: {:ok, Spatio.Model.WorkspaceListResponse.t()} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
List workspaces in an organization.
Parameters
connection(Spatio.Connection): Connection to serverorg(String.t):opts(keyword): Optional parameters
Returns
{:ok, Spatio.Model.WorkspaceListResponse.t}on success{:error, Tesla.Env.t}on failure
@spec remove_organization_member( Tesla.Env.client(), String.t(), String.t(), keyword() ) :: {:ok, nil} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Remove a member from the organization.
Parameters
connection(Spatio.Connection): Connection to serverorg(String.t):member_id(String.t):opts(keyword): Optional parameters
Returns
{:ok, nil}on success{:error, Tesla.Env.t}on failure
@spec resend_organization_invitation( Tesla.Env.client(), String.t(), String.t(), keyword() ) :: {:ok, Spatio.Model.OrganizationInvitation.t()} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Revoke and reissue an invitation with a fresh token.
Parameters
connection(Spatio.Connection): Connection to serverorg(String.t):invitation_id(String.t):opts(keyword): Optional parameters
Returns
{:ok, Spatio.Model.OrganizationInvitation.t}on success{:error, Tesla.Env.t}on failure
@spec revoke_organization_invitation( Tesla.Env.client(), String.t(), String.t(), keyword() ) :: {:ok, nil} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Revoke a pending invitation.
Parameters
connection(Spatio.Connection): Connection to serverorg(String.t):invitation_id(String.t):opts(keyword): Optional parameters
Returns
{:ok, nil}on success{:error, Tesla.Env.t}on failure
@spec update_organization( Tesla.Env.client(), String.t(), Spatio.Model.UpdateOrganizationRequest.t(), keyword() ) :: {:ok, %{optional(String.t()) => any()}} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Update organization metadata.
Parameters
connection(Spatio.Connection): Connection to serverorg(String.t): Organization id or slug.update_organization_request(UpdateOrganizationRequest):opts(keyword): Optional parameters
Returns
{:ok, %{}}on success{:error, Tesla.Env.t}on failure
@spec update_organization_concept( Tesla.Env.client(), String.t(), String.t(), %{optional(String.t()) => any()}, keyword() ) :: {:ok, %{optional(String.t()) => any()}} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Update a concept (admin+ only).
Parameters
connection(Spatio.Connection): Connection to serverorg(String.t):slug(String.t):request_body(%{optional(String.t) => any()}):opts(keyword): Optional parameters
Returns
{:ok, %{}}on success{:error, Tesla.Env.t}on failure
@spec update_organization_custom_role( Tesla.Env.client(), String.t(), String.t(), %{optional(String.t()) => any()}, keyword() ) :: {:ok, %{optional(String.t()) => any()}} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Update a custom role (admin+ only).
Parameters
connection(Spatio.Connection): Connection to serverorg(String.t):role_id(String.t):request_body(%{optional(String.t) => any()}):opts(keyword): Optional parameters
Returns
{:ok, %{}}on success{:error, Tesla.Env.t}on failure
update_organization_member(connection, org, member_id, update_organization_member_request, opts \\ [])
@spec update_organization_member( Tesla.Env.client(), String.t(), String.t(), Spatio.Model.UpdateOrganizationMemberRequest.t(), keyword() ) :: {:ok, %{optional(String.t()) => any()}} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Update a member's role.
Parameters
connection(Spatio.Connection): Connection to serverorg(String.t):member_id(String.t):update_organization_member_request(UpdateOrganizationMemberRequest):opts(keyword): Optional parameters
Returns
{:ok, %{}}on success{:error, Tesla.Env.t}on failure
@spec upload_organization_logo(Tesla.Env.client(), String.t(), keyword()) :: {:ok, %{optional(String.t()) => any()}} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Upload (or replace) the organization logo. Multipart.
Parameters
connection(Spatio.Connection): Connection to serverorg(String.t):opts(keyword): Optional parameters:file(String.t):
Returns
{:ok, %{}}on success{:error, Tesla.Env.t}on failure