> For the complete documentation index, see [llms.txt](https://guardian.hedera.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guardian.hedera.com/api-reference-guardian/organizations.md).

# Organizations

## List organizations owned by the active Standard Registry.

> Returns a paginated list of organizations owned by the calling Standard Registry. Supports filtering by name (case-insensitive partial match). If the caller is instead an organization administrator (an active member whose OrgRole carries MEMBER\_MANAGE), the single organization they administer is also included — their discovery path for that organization's id.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"OrganizationDTO":{"type":"object","properties":{"id":{"type":"string","description":"Internal database identifier"},"name":{"type":"string","description":"Human-readable organization name"},"description":{"type":"string","description":"Free-text description of the organization"},"owner":{"type":"string","description":"DID of the Standard Registry that owns the organization"},"did":{"type":"string","description":"DID of the organization (populated after publish)"},"walletToken":{"type":"string","description":"Vault handle for the organization wallet (server-side identifier; safe to expose)"},"hederaAccountId":{"type":"string","description":"Hedera account ID associated with the organization (populated after publish)"},"topicId":{"type":"string","description":"Hedera topic ID for the organization (populated after publish)"},"parentTopicId":{"type":"string","description":"Parent topic ID (the SR / global topic) the organization topic is linked to"},"status":{"type":"string","description":"Lifecycle status of the organization. PUBLISH_ERROR indicates a failed publish attempt; the organization can be republished.","enum":["DRAFT","PUBLISHED","PUBLISH_ERROR"]},"location":{"type":"string","description":"Location of the organization record","enum":["LOCAL","REMOTE"]},"createDate":{"type":"string","description":"Creation date in ISO 8601 format"},"updateDate":{"type":"string","description":"Last update date in ISO 8601 format"}},"required":["id"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/organizations":{"get":{"description":"Returns a paginated list of organizations owned by the calling Standard Registry. Supports filtering by name (case-insensitive partial match). If the caller is instead an organization administrator (an active member whose OrgRole carries MEMBER_MANAGE), the single organization they administer is also included — their discovery path for that organization's id.","operationId":"OrganizationApi_getOrganizations","parameters":[{"name":"name","required":false,"in":"query","description":"Filter by organization name (case-insensitive, partial match). Leave empty to return all.","schema":{"type":"string"}},{"name":"pageIndex","required":false,"in":"query","description":"The number of pages to skip before starting to collect the result set","schema":{"type":"number"}},{"name":"pageSize","required":false,"in":"query","description":"The numbers of items to return","schema":{"type":"number"}}],"responses":{"200":{"description":"Successful operation. Returns organizations array and total count in X-Total-Count header.","headers":{"X-Total-Count":{"schema":{"type":"integer"},"description":"Total items in the collection."}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationDTO"}}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"List organizations owned by the active Standard Registry.","tags":["organizations"]}}}}
```

## Create a new (DRAFT) organization.

> Creates a registry-scoped organization record owned by the calling Standard Registry. The record is created with status DRAFT; on-ledger topic/DID/message publishing is a separate explicit action: POST /organizations/{id}/publish.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"CreateOrganizationDTO":{"type":"object","properties":{"name":{"type":"string","description":"Human-readable organization name (required)"},"description":{"type":"string","description":"Optional free-text description"}},"required":["name"]},"OrganizationDTO":{"type":"object","properties":{"id":{"type":"string","description":"Internal database identifier"},"name":{"type":"string","description":"Human-readable organization name"},"description":{"type":"string","description":"Free-text description of the organization"},"owner":{"type":"string","description":"DID of the Standard Registry that owns the organization"},"did":{"type":"string","description":"DID of the organization (populated after publish)"},"walletToken":{"type":"string","description":"Vault handle for the organization wallet (server-side identifier; safe to expose)"},"hederaAccountId":{"type":"string","description":"Hedera account ID associated with the organization (populated after publish)"},"topicId":{"type":"string","description":"Hedera topic ID for the organization (populated after publish)"},"parentTopicId":{"type":"string","description":"Parent topic ID (the SR / global topic) the organization topic is linked to"},"status":{"type":"string","description":"Lifecycle status of the organization. PUBLISH_ERROR indicates a failed publish attempt; the organization can be republished.","enum":["DRAFT","PUBLISHED","PUBLISH_ERROR"]},"location":{"type":"string","description":"Location of the organization record","enum":["LOCAL","REMOTE"]},"createDate":{"type":"string","description":"Creation date in ISO 8601 format"},"updateDate":{"type":"string","description":"Last update date in ISO 8601 format"}},"required":["id"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/organizations":{"post":{"description":"Creates a registry-scoped organization record owned by the calling Standard Registry. The record is created with status DRAFT; on-ledger topic/DID/message publishing is a separate explicit action: POST /organizations/{id}/publish.","operationId":"OrganizationApi_createOrganization","parameters":[],"requestBody":{"required":true,"description":"Organization name and optional description.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrganizationDTO"}}}},"responses":{"201":{"description":"Organization created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDTO"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Create a new (DRAFT) organization.","tags":["organizations"]}}}}
```

## Get one organization by id.

> Returns the organization identified by the path parameter. Must be owned by the calling Standard Registry, or the calling organization administrator's own organization (an active member whose OrgRole carries MEMBER\_MANAGE).

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"OrganizationDTO":{"type":"object","properties":{"id":{"type":"string","description":"Internal database identifier"},"name":{"type":"string","description":"Human-readable organization name"},"description":{"type":"string","description":"Free-text description of the organization"},"owner":{"type":"string","description":"DID of the Standard Registry that owns the organization"},"did":{"type":"string","description":"DID of the organization (populated after publish)"},"walletToken":{"type":"string","description":"Vault handle for the organization wallet (server-side identifier; safe to expose)"},"hederaAccountId":{"type":"string","description":"Hedera account ID associated with the organization (populated after publish)"},"topicId":{"type":"string","description":"Hedera topic ID for the organization (populated after publish)"},"parentTopicId":{"type":"string","description":"Parent topic ID (the SR / global topic) the organization topic is linked to"},"status":{"type":"string","description":"Lifecycle status of the organization. PUBLISH_ERROR indicates a failed publish attempt; the organization can be republished.","enum":["DRAFT","PUBLISHED","PUBLISH_ERROR"]},"location":{"type":"string","description":"Location of the organization record","enum":["LOCAL","REMOTE"]},"createDate":{"type":"string","description":"Creation date in ISO 8601 format"},"updateDate":{"type":"string","description":"Last update date in ISO 8601 format"}},"required":["id"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/organizations/{id}":{"get":{"description":"Returns the organization identified by the path parameter. Must be owned by the calling Standard Registry, or the calling organization administrator's own organization (an active member whose OrgRole carries MEMBER_MANAGE).","operationId":"OrganizationApi_getOrganization","parameters":[{"name":"id","required":true,"in":"path","description":"Organization identifier","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDTO"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Get one organization by id.","tags":["organizations"]}}}}
```

## Update an organization (record-layer fields only).

> Updates the human-readable fields of an organization. On-ledger fields (did, topicId, parentTopicId, hederaAccountId, status, location) are hydrated by the explicit publish action and are not settable here.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"UpdateOrganizationDTO":{"type":"object","properties":{"name":{"type":"string","description":"New organization name"},"description":{"type":"string","description":"New free-text description"}}},"OrganizationDTO":{"type":"object","properties":{"id":{"type":"string","description":"Internal database identifier"},"name":{"type":"string","description":"Human-readable organization name"},"description":{"type":"string","description":"Free-text description of the organization"},"owner":{"type":"string","description":"DID of the Standard Registry that owns the organization"},"did":{"type":"string","description":"DID of the organization (populated after publish)"},"walletToken":{"type":"string","description":"Vault handle for the organization wallet (server-side identifier; safe to expose)"},"hederaAccountId":{"type":"string","description":"Hedera account ID associated with the organization (populated after publish)"},"topicId":{"type":"string","description":"Hedera topic ID for the organization (populated after publish)"},"parentTopicId":{"type":"string","description":"Parent topic ID (the SR / global topic) the organization topic is linked to"},"status":{"type":"string","description":"Lifecycle status of the organization. PUBLISH_ERROR indicates a failed publish attempt; the organization can be republished.","enum":["DRAFT","PUBLISHED","PUBLISH_ERROR"]},"location":{"type":"string","description":"Location of the organization record","enum":["LOCAL","REMOTE"]},"createDate":{"type":"string","description":"Creation date in ISO 8601 format"},"updateDate":{"type":"string","description":"Last update date in ISO 8601 format"}},"required":["id"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/organizations/{id}":{"put":{"description":"Updates the human-readable fields of an organization. On-ledger fields (did, topicId, parentTopicId, hederaAccountId, status, location) are hydrated by the explicit publish action and are not settable here.","operationId":"OrganizationApi_updateOrganization","parameters":[{"name":"id","required":true,"in":"path","description":"Organization identifier","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Fields to update. All fields are optional; only provided fields are written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrganizationDTO"}}}},"responses":{"200":{"description":"Organization updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDTO"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Update an organization (record-layer fields only).","tags":["organizations"]}}}}
```

## Delete an organization.

> Deletes the organization and cascades its OrgRoles, OrganizationMembers, and PolicyOrgAssignments at the record layer. Only DRAFT organizations can be deleted; once publishing has begun (PUBLISHED or PUBLISH\_ERROR) the organization is permanent — a PUBLISH\_ERROR organization can be republished, and decommissioning a published organization is future work. Hedera-side artefacts (topic, DID document, on-ledger messages) are immutable and are NOT removed.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"OrganizationDTO":{"type":"object","properties":{"id":{"type":"string","description":"Internal database identifier"},"name":{"type":"string","description":"Human-readable organization name"},"description":{"type":"string","description":"Free-text description of the organization"},"owner":{"type":"string","description":"DID of the Standard Registry that owns the organization"},"did":{"type":"string","description":"DID of the organization (populated after publish)"},"walletToken":{"type":"string","description":"Vault handle for the organization wallet (server-side identifier; safe to expose)"},"hederaAccountId":{"type":"string","description":"Hedera account ID associated with the organization (populated after publish)"},"topicId":{"type":"string","description":"Hedera topic ID for the organization (populated after publish)"},"parentTopicId":{"type":"string","description":"Parent topic ID (the SR / global topic) the organization topic is linked to"},"status":{"type":"string","description":"Lifecycle status of the organization. PUBLISH_ERROR indicates a failed publish attempt; the organization can be republished.","enum":["DRAFT","PUBLISHED","PUBLISH_ERROR"]},"location":{"type":"string","description":"Location of the organization record","enum":["LOCAL","REMOTE"]},"createDate":{"type":"string","description":"Creation date in ISO 8601 format"},"updateDate":{"type":"string","description":"Last update date in ISO 8601 format"}},"required":["id"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/organizations/{id}":{"delete":{"description":"Deletes the organization and cascades its OrgRoles, OrganizationMembers, and PolicyOrgAssignments at the record layer. Only DRAFT organizations can be deleted; once publishing has begun (PUBLISHED or PUBLISH_ERROR) the organization is permanent — a PUBLISH_ERROR organization can be republished, and decommissioning a published organization is future work. Hedera-side artefacts (topic, DID document, on-ledger messages) are immutable and are NOT removed.","operationId":"OrganizationApi_deleteOrganization","parameters":[{"name":"id","required":true,"in":"path","description":"Organization identifier","schema":{"type":"string"}}],"responses":{"200":{"description":"Organization deleted. Returns the removed record.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDTO"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Delete an organization.","tags":["organizations"]}}}}
```

## Publish a DRAFT organization on the ledger.

> Creates the organization topic under the SR/global topic, publishes the organization DID and OrganizationMessage, stores the Hedera key in the org wallet, and persists the hydrated record (status PUBLISHED) as the final step. If publishing fails after the first ledger write the organization is marked PUBLISH\_ERROR and can be republished (a retry creates a fresh topic/DID set). The provided Hedera key is stored securely and never echoed.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PublishOrganizationDTO":{"type":"object","properties":{"hederaAccountId":{"type":"string","description":"Hedera account ID to associate with the organization (operator account)"},"hederaAccountKey":{"type":"string","description":"Private key for the Hedera account (stored securely in the org wallet, never echoed)"},"description":{"type":"string","description":"Optional description override applied during publish"}},"required":["hederaAccountId","hederaAccountKey"]},"OrganizationDTO":{"type":"object","properties":{"id":{"type":"string","description":"Internal database identifier"},"name":{"type":"string","description":"Human-readable organization name"},"description":{"type":"string","description":"Free-text description of the organization"},"owner":{"type":"string","description":"DID of the Standard Registry that owns the organization"},"did":{"type":"string","description":"DID of the organization (populated after publish)"},"walletToken":{"type":"string","description":"Vault handle for the organization wallet (server-side identifier; safe to expose)"},"hederaAccountId":{"type":"string","description":"Hedera account ID associated with the organization (populated after publish)"},"topicId":{"type":"string","description":"Hedera topic ID for the organization (populated after publish)"},"parentTopicId":{"type":"string","description":"Parent topic ID (the SR / global topic) the organization topic is linked to"},"status":{"type":"string","description":"Lifecycle status of the organization. PUBLISH_ERROR indicates a failed publish attempt; the organization can be republished.","enum":["DRAFT","PUBLISHED","PUBLISH_ERROR"]},"location":{"type":"string","description":"Location of the organization record","enum":["LOCAL","REMOTE"]},"createDate":{"type":"string","description":"Creation date in ISO 8601 format"},"updateDate":{"type":"string","description":"Last update date in ISO 8601 format"}},"required":["id"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/organizations/{id}/publish":{"post":{"description":"Creates the organization topic under the SR/global topic, publishes the organization DID and OrganizationMessage, stores the Hedera key in the org wallet, and persists the hydrated record (status PUBLISHED) as the final step. If publishing fails after the first ledger write the organization is marked PUBLISH_ERROR and can be republished (a retry creates a fresh topic/DID set). The provided Hedera key is stored securely and never echoed.","operationId":"OrganizationApi_publishOrganization","parameters":[{"name":"id","required":true,"in":"path","description":"Organization identifier","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Hedera account ID and key to associate with the organization (key stored in vault).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishOrganizationDTO"}}}},"responses":{"200":{"description":"Organization published. Returns the hydrated record.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDTO"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Publish a DRAFT organization on the ledger.","tags":["organizations"]}}}}
```

## List roles under an organization.

> Returns all OrgRoles defined under the organization. Callable by the owning Standard Registry, or by an organization administrator (an active member whose OrgRole carries MEMBER\_MANAGE) for their own organization.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"OrgRoleDTO":{"type":"object","properties":{"id":{"type":"string","description":"Internal database identifier"},"organizationId":{"type":"string","description":"Parent organization identifier"},"name":{"type":"string","description":"Role name (unique within the organization)"},"description":{"type":"string","description":"Free-text role description"},"permissions":{"description":"Subset of TOKEN_MINTING, TOKEN_RETIREMENT, TOKEN_TRANSFER, TOKEN_ASSOCIATE, TOKEN_DISSOCIATE, MEMBER_MANAGE","type":"array","items":{"type":"string"}}},"required":["id"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/organizations/{id}/roles":{"get":{"description":"Returns all OrgRoles defined under the organization. Callable by the owning Standard Registry, or by an organization administrator (an active member whose OrgRole carries MEMBER_MANAGE) for their own organization.","operationId":"OrganizationApi_getOrgRoles","parameters":[{"name":"id","required":true,"in":"path","description":"Organization identifier","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrgRoleDTO"}}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"List roles under an organization.","tags":["organizations"]}}}}
```

## Create a role under an organization.

> Creates a named role under the organization with a subset of OrgRolePermission (TOKEN\_MINTING, TOKEN\_RETIREMENT, TOKEN\_TRANSFER, TOKEN\_ASSOCIATE, TOKEN\_DISSOCIATE, MEMBER\_MANAGE). MEMBER\_MANAGE makes members holding the role organization administrators, able to manage their own organization's non-admin membership; granting or revoking it is always Standard-Registry-only. Role names are unique within an organization.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"CreateOrgRoleDTO":{"type":"object","properties":{"name":{"type":"string","description":"Role name (required, unique within the organization)"},"description":{"type":"string","description":"Optional free-text description"},"permissions":{"description":"Subset of TOKEN_MINTING, TOKEN_RETIREMENT, TOKEN_TRANSFER, TOKEN_ASSOCIATE, TOKEN_DISSOCIATE, MEMBER_MANAGE","type":"array","items":{"type":"string"}}},"required":["name"]},"OrgRoleDTO":{"type":"object","properties":{"id":{"type":"string","description":"Internal database identifier"},"organizationId":{"type":"string","description":"Parent organization identifier"},"name":{"type":"string","description":"Role name (unique within the organization)"},"description":{"type":"string","description":"Free-text role description"},"permissions":{"description":"Subset of TOKEN_MINTING, TOKEN_RETIREMENT, TOKEN_TRANSFER, TOKEN_ASSOCIATE, TOKEN_DISSOCIATE, MEMBER_MANAGE","type":"array","items":{"type":"string"}}},"required":["id"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/organizations/{id}/roles":{"post":{"description":"Creates a named role under the organization with a subset of OrgRolePermission (TOKEN_MINTING, TOKEN_RETIREMENT, TOKEN_TRANSFER, TOKEN_ASSOCIATE, TOKEN_DISSOCIATE, MEMBER_MANAGE). MEMBER_MANAGE makes members holding the role organization administrators, able to manage their own organization's non-admin membership; granting or revoking it is always Standard-Registry-only. Role names are unique within an organization.","operationId":"OrganizationApi_createOrgRole","parameters":[{"name":"id","required":true,"in":"path","description":"Organization identifier","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Role name + optional permissions list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrgRoleDTO"}}}},"responses":{"201":{"description":"Role created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgRoleDTO"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Create a role under an organization.","tags":["organizations"]}}}}
```

## Update an organization role.

> Updates the name, description, or permissions of an OrgRole. A name change propagates to the denormalized OrganizationMember.orgRoleName on all existing members.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"UpdateOrgRoleDTO":{"type":"object","properties":{"name":{"type":"string","description":"New role name (must be unique within the organization)"},"description":{"type":"string","description":"New free-text description"},"permissions":{"description":"New permissions list — subset of TOKEN_MINTING, TOKEN_RETIREMENT, TOKEN_TRANSFER, TOKEN_ASSOCIATE, TOKEN_DISSOCIATE, MEMBER_MANAGE","type":"array","items":{"type":"string"}}}},"OrgRoleDTO":{"type":"object","properties":{"id":{"type":"string","description":"Internal database identifier"},"organizationId":{"type":"string","description":"Parent organization identifier"},"name":{"type":"string","description":"Role name (unique within the organization)"},"description":{"type":"string","description":"Free-text role description"},"permissions":{"description":"Subset of TOKEN_MINTING, TOKEN_RETIREMENT, TOKEN_TRANSFER, TOKEN_ASSOCIATE, TOKEN_DISSOCIATE, MEMBER_MANAGE","type":"array","items":{"type":"string"}}},"required":["id"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/organizations/{id}/roles/{roleId}":{"put":{"description":"Updates the name, description, or permissions of an OrgRole. A name change propagates to the denormalized OrganizationMember.orgRoleName on all existing members.","operationId":"OrganizationApi_updateOrgRole","parameters":[{"name":"id","required":true,"in":"path","description":"Organization identifier","schema":{"type":"string"}},{"name":"roleId","required":true,"in":"path","description":"OrgRole identifier","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Role fields to update.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrgRoleDTO"}}}},"responses":{"200":{"description":"Role updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgRoleDTO"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Update an organization role.","tags":["organizations"]}}}}
```

## Delete an organization role.

> Removes an OrgRole. The operation is refused if any active OrganizationMember is still assigned to the role; re-assign or remove those members first.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"OrgRoleDTO":{"type":"object","properties":{"id":{"type":"string","description":"Internal database identifier"},"organizationId":{"type":"string","description":"Parent organization identifier"},"name":{"type":"string","description":"Role name (unique within the organization)"},"description":{"type":"string","description":"Free-text role description"},"permissions":{"description":"Subset of TOKEN_MINTING, TOKEN_RETIREMENT, TOKEN_TRANSFER, TOKEN_ASSOCIATE, TOKEN_DISSOCIATE, MEMBER_MANAGE","type":"array","items":{"type":"string"}}},"required":["id"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/organizations/{id}/roles/{roleId}":{"delete":{"description":"Removes an OrgRole. The operation is refused if any active OrganizationMember is still assigned to the role; re-assign or remove those members first.","operationId":"OrganizationApi_deleteOrgRole","parameters":[{"name":"id","required":true,"in":"path","description":"Organization identifier","schema":{"type":"string"}},{"name":"roleId","required":true,"in":"path","description":"OrgRole identifier","schema":{"type":"string"}}],"responses":{"200":{"description":"Role deleted. Returns the removed record.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgRoleDTO"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Delete an organization role.","tags":["organizations"]}}}}
```

## List members of an organization.

> Returns a paginated list of OrganizationMember rows. Supports filtering by active flag, OrgRole id, and member DID. Callable by the owning Standard Registry, or by an organization administrator (an active member whose OrgRole carries MEMBER\_MANAGE) for their own organization.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"OrganizationMemberDTO":{"type":"object","properties":{"id":{"type":"string","description":"Internal database identifier"},"organizationId":{"type":"string","description":"Parent organization identifier"},"did":{"type":"string","description":"Member DID"},"userId":{"type":"string","description":"Underlying user identifier (auth-service User._id)"},"username":{"type":"string","description":"Username (denormalized for display)"},"orgRoleId":{"type":"string","description":"OrgRole identifier the member is enrolled in"},"orgRoleName":{"type":"string","description":"OrgRole name (denormalized for display)"},"active":{"type":"boolean","description":"Whether the membership is active"},"messageId":{"type":"string","description":"Identifier of the RegistrationMessage(Init) published on the org topic"},"createDate":{"type":"string","description":"Creation date in ISO 8601 format"},"updateDate":{"type":"string","description":"Last update date in ISO 8601 format"}},"required":["id"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/organizations/{id}/members":{"get":{"description":"Returns a paginated list of OrganizationMember rows. Supports filtering by active flag, OrgRole id, and member DID. Callable by the owning Standard Registry, or by an organization administrator (an active member whose OrgRole carries MEMBER_MANAGE) for their own organization.","operationId":"OrganizationApi_getOrgMembers","parameters":[{"name":"id","required":true,"in":"path","description":"Organization identifier","schema":{"type":"string"}},{"name":"orgRoleId","required":false,"in":"query","description":"Filter by OrgRole identifier.","schema":{"type":"string"}},{"name":"did","required":false,"in":"query","description":"Filter by member DID.","schema":{"type":"string"}},{"name":"pageIndex","required":false,"in":"query","description":"The number of pages to skip before starting to collect the result set","schema":{"type":"number"}},{"name":"pageSize","required":false,"in":"query","description":"The numbers of items to return","schema":{"type":"number"}},{"name":"active","required":false,"in":"query","description":"Filter by active flag (true/false). Omit to return all.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Successful operation. Returns members array and total count in X-Total-Count header.","headers":{"X-Total-Count":{"schema":{"type":"integer"},"description":"Total items in the collection."}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationMemberDTO"}}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"List members of an organization.","tags":["organizations"]}}}}
```

## Enroll a user as a member of an organization.

> Validates the member first (user exists, not already in an organization), then publishes a RegistrationMessage(Init) on the organization topic (carrying member DID + role name as attributes), then persists the OrganizationMember record with the resulting messageId. A user can belong to at most one organization (enforced by @Unique(did)). Callable by the owning Standard Registry (no restriction), or by an organization administrator (an active member whose OrgRole carries MEMBER\_MANAGE) enrolling into their own organization — subject to server-side rules: an admin cannot assign a role that itself carries MEMBER\_MANAGE, and the assigned role's permissions must be a subset of the admin's own role's permissions.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"EnrollMemberDTO":{"type":"object","properties":{"did":{"type":"string","description":"DID of the user to enroll (must already exist as a Guardian user)"},"orgRoleId":{"type":"string","description":"Identifier of the OrgRole to assign to the new member"}},"required":["did","orgRoleId"]},"OrganizationMemberDTO":{"type":"object","properties":{"id":{"type":"string","description":"Internal database identifier"},"organizationId":{"type":"string","description":"Parent organization identifier"},"did":{"type":"string","description":"Member DID"},"userId":{"type":"string","description":"Underlying user identifier (auth-service User._id)"},"username":{"type":"string","description":"Username (denormalized for display)"},"orgRoleId":{"type":"string","description":"OrgRole identifier the member is enrolled in"},"orgRoleName":{"type":"string","description":"OrgRole name (denormalized for display)"},"active":{"type":"boolean","description":"Whether the membership is active"},"messageId":{"type":"string","description":"Identifier of the RegistrationMessage(Init) published on the org topic"},"createDate":{"type":"string","description":"Creation date in ISO 8601 format"},"updateDate":{"type":"string","description":"Last update date in ISO 8601 format"}},"required":["id"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/organizations/{id}/members":{"post":{"description":"Validates the member first (user exists, not already in an organization), then publishes a RegistrationMessage(Init) on the organization topic (carrying member DID + role name as attributes), then persists the OrganizationMember record with the resulting messageId. A user can belong to at most one organization (enforced by @Unique(did)). Callable by the owning Standard Registry (no restriction), or by an organization administrator (an active member whose OrgRole carries MEMBER_MANAGE) enrolling into their own organization — subject to server-side rules: an admin cannot assign a role that itself carries MEMBER_MANAGE, and the assigned role's permissions must be a subset of the admin's own role's permissions.","operationId":"OrganizationApi_enrollOrganizationMember","parameters":[{"name":"id","required":true,"in":"path","description":"Organization identifier","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Member DID + target OrgRole identifier.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrollMemberDTO"}}}},"responses":{"201":{"description":"Member enrolled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationMemberDTO"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Enroll a user as a member of an organization.","tags":["organizations"]}}}}
```

## Get an organization member by id.

> Returns one OrganizationMember row by its database identifier. Scoped via the parent organization: the owning Standard Registry, or an organization administrator (an active member whose OrgRole carries MEMBER\_MANAGE) for their own organization.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"OrganizationMemberDTO":{"type":"object","properties":{"id":{"type":"string","description":"Internal database identifier"},"organizationId":{"type":"string","description":"Parent organization identifier"},"did":{"type":"string","description":"Member DID"},"userId":{"type":"string","description":"Underlying user identifier (auth-service User._id)"},"username":{"type":"string","description":"Username (denormalized for display)"},"orgRoleId":{"type":"string","description":"OrgRole identifier the member is enrolled in"},"orgRoleName":{"type":"string","description":"OrgRole name (denormalized for display)"},"active":{"type":"boolean","description":"Whether the membership is active"},"messageId":{"type":"string","description":"Identifier of the RegistrationMessage(Init) published on the org topic"},"createDate":{"type":"string","description":"Creation date in ISO 8601 format"},"updateDate":{"type":"string","description":"Last update date in ISO 8601 format"}},"required":["id"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/organizations/{id}/members/{memberId}":{"get":{"description":"Returns one OrganizationMember row by its database identifier. Scoped via the parent organization: the owning Standard Registry, or an organization administrator (an active member whose OrgRole carries MEMBER_MANAGE) for their own organization.","operationId":"OrganizationApi_getOrgMember","parameters":[{"name":"id","required":true,"in":"path","description":"Organization identifier","schema":{"type":"string"}},{"name":"memberId","required":true,"in":"path","description":"OrganizationMember identifier","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationMemberDTO"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Get an organization member by id.","tags":["organizations"]}}}}
```

## Remove an organization member.

> Removes an OrganizationMember row. The delete is hard (not soft) so the @Unique(did) constraint is freed and the user can be enrolled in another organization. Callable by the owning Standard Registry (no restriction), or by an organization administrator (an active member whose OrgRole carries MEMBER\_MANAGE) removing a member of their own organization — subject to server-side rules: an admin cannot remove a member who currently holds MEMBER\_MANAGE (including themselves).

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"OrganizationMemberDTO":{"type":"object","properties":{"id":{"type":"string","description":"Internal database identifier"},"organizationId":{"type":"string","description":"Parent organization identifier"},"did":{"type":"string","description":"Member DID"},"userId":{"type":"string","description":"Underlying user identifier (auth-service User._id)"},"username":{"type":"string","description":"Username (denormalized for display)"},"orgRoleId":{"type":"string","description":"OrgRole identifier the member is enrolled in"},"orgRoleName":{"type":"string","description":"OrgRole name (denormalized for display)"},"active":{"type":"boolean","description":"Whether the membership is active"},"messageId":{"type":"string","description":"Identifier of the RegistrationMessage(Init) published on the org topic"},"createDate":{"type":"string","description":"Creation date in ISO 8601 format"},"updateDate":{"type":"string","description":"Last update date in ISO 8601 format"}},"required":["id"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/organizations/{id}/members/{memberId}":{"delete":{"description":"Removes an OrganizationMember row. The delete is hard (not soft) so the @Unique(did) constraint is freed and the user can be enrolled in another organization. Callable by the owning Standard Registry (no restriction), or by an organization administrator (an active member whose OrgRole carries MEMBER_MANAGE) removing a member of their own organization — subject to server-side rules: an admin cannot remove a member who currently holds MEMBER_MANAGE (including themselves).","operationId":"OrganizationApi_removeOrgMember","parameters":[{"name":"id","required":true,"in":"path","description":"Organization identifier","schema":{"type":"string"}},{"name":"memberId","required":true,"in":"path","description":"OrganizationMember identifier","schema":{"type":"string"}}],"responses":{"200":{"description":"Member removed. Returns the removed record.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationMemberDTO"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Remove an organization member.","tags":["organizations"]}}}}
```

## Update an organization member's role.

> Re-assigns the OrgRole of an existing OrganizationMember. The new role must belong to the same organization. Callable by the owning Standard Registry (no restriction), or by an organization administrator (an active member whose OrgRole carries MEMBER\_MANAGE) re-assigning a member of their own organization — subject to server-side rules: an admin cannot re-role a member who currently holds MEMBER\_MANAGE (including themselves) or assign a role that itself carries MEMBER\_MANAGE, and the new role's permissions must be a subset of the admin's own role's permissions.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"UpdateMemberRoleDTO":{"type":"object","properties":{"orgRoleId":{"type":"string","description":"Identifier of the new OrgRole (must belong to the same organization)"}},"required":["orgRoleId"]},"OrganizationMemberDTO":{"type":"object","properties":{"id":{"type":"string","description":"Internal database identifier"},"organizationId":{"type":"string","description":"Parent organization identifier"},"did":{"type":"string","description":"Member DID"},"userId":{"type":"string","description":"Underlying user identifier (auth-service User._id)"},"username":{"type":"string","description":"Username (denormalized for display)"},"orgRoleId":{"type":"string","description":"OrgRole identifier the member is enrolled in"},"orgRoleName":{"type":"string","description":"OrgRole name (denormalized for display)"},"active":{"type":"boolean","description":"Whether the membership is active"},"messageId":{"type":"string","description":"Identifier of the RegistrationMessage(Init) published on the org topic"},"createDate":{"type":"string","description":"Creation date in ISO 8601 format"},"updateDate":{"type":"string","description":"Last update date in ISO 8601 format"}},"required":["id"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/organizations/{id}/members/{memberId}/role":{"put":{"description":"Re-assigns the OrgRole of an existing OrganizationMember. The new role must belong to the same organization. Callable by the owning Standard Registry (no restriction), or by an organization administrator (an active member whose OrgRole carries MEMBER_MANAGE) re-assigning a member of their own organization — subject to server-side rules: an admin cannot re-role a member who currently holds MEMBER_MANAGE (including themselves) or assign a role that itself carries MEMBER_MANAGE, and the new role's permissions must be a subset of the admin's own role's permissions.","operationId":"OrganizationApi_updateOrgMemberRole","parameters":[{"name":"id","required":true,"in":"path","description":"Organization identifier","schema":{"type":"string"}},{"name":"memberId","required":true,"in":"path","description":"OrganizationMember identifier","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Target OrgRole identifier.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMemberRoleDTO"}}}},"responses":{"200":{"description":"Member role updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationMemberDTO"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Update an organization member's role.","tags":["organizations"]}}}}
```

## Assign a policy to an organization.

> Creates a PolicyOrgAssignment row that grants current and future members of the organization visibility into the policy and open/execute access to it. Does NOT auto-enroll members into policy groups (PolicyRoles group selection still applies on first entry). Idempotent: an existing assignment is returned unchanged; a previously revoked assignment is reactivated.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"AssignPolicyToOrgDTO":{"type":"object","properties":{"policyId":{"type":"string","description":"Identifier of the policy to assign to the organization"}},"required":["policyId"]},"PolicyOrgAssignmentDTO":{"type":"object","properties":{"id":{"type":"string","description":"Internal database identifier"},"organizationId":{"type":"string","description":"Organization identifier"},"policyId":{"type":"string","description":"Policy identifier"},"owner":{"type":"string","description":"DID of the Standard Registry that created the assignment"},"assigned":{"type":"boolean","description":"Whether the assignment is currently active (false = soft-revoked)"},"createDate":{"type":"string","description":"Creation date in ISO 8601 format"},"updateDate":{"type":"string","description":"Last update date in ISO 8601 format"}},"required":["id"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/organizations/{id}/policies/assign":{"post":{"description":"Creates a PolicyOrgAssignment row that grants current and future members of the organization visibility into the policy and open/execute access to it. Does NOT auto-enroll members into policy groups (PolicyRoles group selection still applies on first entry). Idempotent: an existing assignment is returned unchanged; a previously revoked assignment is reactivated.","operationId":"OrganizationApi_assignPolicyToOrg","parameters":[{"name":"id","required":true,"in":"path","description":"Organization identifier","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Policy identifier to assign.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignPolicyToOrgDTO"}}}},"responses":{"201":{"description":"Policy assigned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyOrgAssignmentDTO"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Assign a policy to an organization.","tags":["organizations"]}}}}
```

## Revoke a policy assignment from an organization.

> Soft-revokes a PolicyOrgAssignment by setting assigned=false; the row is kept for audit purposes and can be reactivated by re-assigning the same policy.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PolicyOrgAssignmentDTO":{"type":"object","properties":{"id":{"type":"string","description":"Internal database identifier"},"organizationId":{"type":"string","description":"Organization identifier"},"policyId":{"type":"string","description":"Policy identifier"},"owner":{"type":"string","description":"DID of the Standard Registry that created the assignment"},"assigned":{"type":"boolean","description":"Whether the assignment is currently active (false = soft-revoked)"},"createDate":{"type":"string","description":"Creation date in ISO 8601 format"},"updateDate":{"type":"string","description":"Last update date in ISO 8601 format"}},"required":["id"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/organizations/{id}/policies/{policyId}":{"delete":{"description":"Soft-revokes a PolicyOrgAssignment by setting assigned=false; the row is kept for audit purposes and can be reactivated by re-assigning the same policy.","operationId":"OrganizationApi_revokePolicyFromOrg","parameters":[{"name":"id","required":true,"in":"path","description":"Organization identifier","schema":{"type":"string"}},{"name":"policyId","required":true,"in":"path","description":"Policy identifier","schema":{"type":"string"}}],"responses":{"200":{"description":"Assignment revoked. Returns the updated record (assigned=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyOrgAssignmentDTO"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Revoke a policy assignment from an organization.","tags":["organizations"]}}}}
```

## List policies assigned to an organization.

> Returns the PolicyOrgAssignment rows for an organization. By default only active assignments are returned; pass includeRevoked=true to include soft-revoked rows.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PolicyOrgAssignmentDTO":{"type":"object","properties":{"id":{"type":"string","description":"Internal database identifier"},"organizationId":{"type":"string","description":"Organization identifier"},"policyId":{"type":"string","description":"Policy identifier"},"owner":{"type":"string","description":"DID of the Standard Registry that created the assignment"},"assigned":{"type":"boolean","description":"Whether the assignment is currently active (false = soft-revoked)"},"createDate":{"type":"string","description":"Creation date in ISO 8601 format"},"updateDate":{"type":"string","description":"Last update date in ISO 8601 format"}},"required":["id"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/organizations/{id}/policies":{"get":{"description":"Returns the PolicyOrgAssignment rows for an organization. By default only active assignments are returned; pass includeRevoked=true to include soft-revoked rows.","operationId":"OrganizationApi_getOrgPolicies","parameters":[{"name":"id","required":true,"in":"path","description":"Organization identifier","schema":{"type":"string"}},{"name":"includeRevoked","required":false,"in":"query","description":"Set to true to include soft-revoked assignments.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PolicyOrgAssignmentDTO"}}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"List policies assigned to an organization.","tags":["organizations"]}}}}
```

## Associate a token with the organization's Hedera wallet.

> Associates the provided token with the organization's Hedera account. Requires the caller to be an active member of the organization whose OrgRole carries TOKEN\_ASSOCIATE, or the organization's owner (always allowed).

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"TokenInfoDTO":{"type":"object","properties":{"id":{"type":"string","description":"Internal database identifier"},"tokenId":{"type":"string","description":"Hedera token ID"},"tokenName":{"type":"string","description":"Human-readable name of the token"},"tokenSymbol":{"type":"string","description":"Short ticker symbol for the token"},"tokenType":{"type":"string","description":"Token type on Hedera","enum":["fungible","non-fungible"]},"decimals":{"type":"string","description":"Number of decimal places"},"associated":{"type":"boolean","description":"Whether the current user is associated with this token"},"frozen":{"type":"boolean","description":"Whether the current user's account is frozen for this token"},"kyc":{"type":"boolean","description":"Whether the current user has passed KYC for this token"},"balance":{"type":"string","description":"Current token balance for the user"},"enableAdmin":{"type":"boolean","description":"Whether the token has an Admin key"},"enableFreeze":{"type":"boolean","description":"Whether the token has a Freeze key"},"enableKYC":{"type":"boolean","description":"Whether the token has a KYC key"},"enableWipe":{"type":"boolean","description":"Whether the token has a Wipe key"}},"required":["id","tokenId","tokenName","tokenSymbol","tokenType","decimals","associated","frozen","kyc","balance","enableAdmin","enableFreeze","enableKYC","enableWipe"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/organizations/{id}/tokens/{tokenId}/associate":{"put":{"description":"Associates the provided token with the organization's Hedera account. Requires the caller to be an active member of the organization whose OrgRole carries TOKEN_ASSOCIATE, or the organization's owner (always allowed).","operationId":"OrganizationApi_associateOrgToken","parameters":[{"name":"id","required":true,"in":"path","description":"Organization identifier","schema":{"type":"string"}},{"name":"tokenId","required":true,"in":"path","description":"Token identifier","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenInfoDTO"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Associate a token with the organization's Hedera wallet.","tags":["organizations"]}}}}
```

## Dissociate a token from the organization's Hedera wallet.

> Dissociates the provided token from the organization's Hedera account. Requires the caller to be an active member of the organization whose OrgRole carries TOKEN\_DISSOCIATE, or the organization's owner (always allowed).

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"TokenInfoDTO":{"type":"object","properties":{"id":{"type":"string","description":"Internal database identifier"},"tokenId":{"type":"string","description":"Hedera token ID"},"tokenName":{"type":"string","description":"Human-readable name of the token"},"tokenSymbol":{"type":"string","description":"Short ticker symbol for the token"},"tokenType":{"type":"string","description":"Token type on Hedera","enum":["fungible","non-fungible"]},"decimals":{"type":"string","description":"Number of decimal places"},"associated":{"type":"boolean","description":"Whether the current user is associated with this token"},"frozen":{"type":"boolean","description":"Whether the current user's account is frozen for this token"},"kyc":{"type":"boolean","description":"Whether the current user has passed KYC for this token"},"balance":{"type":"string","description":"Current token balance for the user"},"enableAdmin":{"type":"boolean","description":"Whether the token has an Admin key"},"enableFreeze":{"type":"boolean","description":"Whether the token has a Freeze key"},"enableKYC":{"type":"boolean","description":"Whether the token has a KYC key"},"enableWipe":{"type":"boolean","description":"Whether the token has a Wipe key"}},"required":["id","tokenId","tokenName","tokenSymbol","tokenType","decimals","associated","frozen","kyc","balance","enableAdmin","enableFreeze","enableKYC","enableWipe"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/organizations/{id}/tokens/{tokenId}/dissociate":{"put":{"description":"Dissociates the provided token from the organization's Hedera account. Requires the caller to be an active member of the organization whose OrgRole carries TOKEN_DISSOCIATE, or the organization's owner (always allowed).","operationId":"OrganizationApi_dissociateOrgToken","parameters":[{"name":"id","required":true,"in":"path","description":"Organization identifier","schema":{"type":"string"}},{"name":"tokenId","required":true,"in":"path","description":"Token identifier","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenInfoDTO"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Dissociate a token from the organization's Hedera wallet.","tags":["organizations"]}}}}
```

## Grant KYC for a token to the organization's Hedera wallet.

> Sets the KYC flag for the organization's Hedera account on the provided token. Requires the caller to be the organization's owner (Standard Registry) and the owner of the token's KYC key.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"TokenInfoDTO":{"type":"object","properties":{"id":{"type":"string","description":"Internal database identifier"},"tokenId":{"type":"string","description":"Hedera token ID"},"tokenName":{"type":"string","description":"Human-readable name of the token"},"tokenSymbol":{"type":"string","description":"Short ticker symbol for the token"},"tokenType":{"type":"string","description":"Token type on Hedera","enum":["fungible","non-fungible"]},"decimals":{"type":"string","description":"Number of decimal places"},"associated":{"type":"boolean","description":"Whether the current user is associated with this token"},"frozen":{"type":"boolean","description":"Whether the current user's account is frozen for this token"},"kyc":{"type":"boolean","description":"Whether the current user has passed KYC for this token"},"balance":{"type":"string","description":"Current token balance for the user"},"enableAdmin":{"type":"boolean","description":"Whether the token has an Admin key"},"enableFreeze":{"type":"boolean","description":"Whether the token has a Freeze key"},"enableKYC":{"type":"boolean","description":"Whether the token has a KYC key"},"enableWipe":{"type":"boolean","description":"Whether the token has a Wipe key"}},"required":["id","tokenId","tokenName","tokenSymbol","tokenType","decimals","associated","frozen","kyc","balance","enableAdmin","enableFreeze","enableKYC","enableWipe"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/organizations/{id}/tokens/{tokenId}/grant-kyc":{"put":{"description":"Sets the KYC flag for the organization's Hedera account on the provided token. Requires the caller to be the organization's owner (Standard Registry) and the owner of the token's KYC key.","operationId":"OrganizationApi_grantKycOrgToken","parameters":[{"name":"id","required":true,"in":"path","description":"Organization identifier","schema":{"type":"string"}},{"name":"tokenId","required":true,"in":"path","description":"Token identifier","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenInfoDTO"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Grant KYC for a token to the organization's Hedera wallet.","tags":["organizations"]}}}}
```

## Revoke KYC for a token from the organization's Hedera wallet.

> Unsets the KYC flag for the organization's Hedera account on the provided token. Requires the caller to be the organization's owner (Standard Registry) and the owner of the token's KYC key.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"TokenInfoDTO":{"type":"object","properties":{"id":{"type":"string","description":"Internal database identifier"},"tokenId":{"type":"string","description":"Hedera token ID"},"tokenName":{"type":"string","description":"Human-readable name of the token"},"tokenSymbol":{"type":"string","description":"Short ticker symbol for the token"},"tokenType":{"type":"string","description":"Token type on Hedera","enum":["fungible","non-fungible"]},"decimals":{"type":"string","description":"Number of decimal places"},"associated":{"type":"boolean","description":"Whether the current user is associated with this token"},"frozen":{"type":"boolean","description":"Whether the current user's account is frozen for this token"},"kyc":{"type":"boolean","description":"Whether the current user has passed KYC for this token"},"balance":{"type":"string","description":"Current token balance for the user"},"enableAdmin":{"type":"boolean","description":"Whether the token has an Admin key"},"enableFreeze":{"type":"boolean","description":"Whether the token has a Freeze key"},"enableKYC":{"type":"boolean","description":"Whether the token has a KYC key"},"enableWipe":{"type":"boolean","description":"Whether the token has a Wipe key"}},"required":["id","tokenId","tokenName","tokenSymbol","tokenType","decimals","associated","frozen","kyc","balance","enableAdmin","enableFreeze","enableKYC","enableWipe"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/organizations/{id}/tokens/{tokenId}/revoke-kyc":{"put":{"description":"Unsets the KYC flag for the organization's Hedera account on the provided token. Requires the caller to be the organization's owner (Standard Registry) and the owner of the token's KYC key.","operationId":"OrganizationApi_revokeKycOrgToken","parameters":[{"name":"id","required":true,"in":"path","description":"Organization identifier","schema":{"type":"string"}},{"name":"tokenId","required":true,"in":"path","description":"Token identifier","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenInfoDTO"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Revoke KYC for a token from the organization's Hedera wallet.","tags":["organizations"]}}}}
```

## Transfers tokens from the organization's Hedera wallet to a target account.

> Transfers fungible or non-fungible tokens FROM the organization's Hedera account to the specified target account, signed with the organization's key. Requires the caller to be an active member of the organization whose OrgRole carries TOKEN\_TRANSFER, or the organization's owner (always allowed). For FT specify amount; for NFT specify serialNumbers, or amount to pick that many of the highest-numbered owned serials (max 10 per request).

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"TransferTokenDTO":{"type":"object","properties":{"targetAccount":{"type":"string","description":"Target Hedera account ID"},"amount":{"type":"number","description":"Amount (FT) or serial count to pick (NFT); must be > 0"},"serialNumbers":{"description":"Specific NFT serial numbers to transfer; positive integers","type":"array","items":{"type":"number"}},"memo":{"type":"string","description":"Optional transaction memo"}},"required":["targetAccount"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/organizations/{id}/tokens/{tokenId}/transfer":{"post":{"description":"Transfers fungible or non-fungible tokens FROM the organization's Hedera account to the specified target account, signed with the organization's key. Requires the caller to be an active member of the organization whose OrgRole carries TOKEN_TRANSFER, or the organization's owner (always allowed). For FT specify amount; for NFT specify serialNumbers, or amount to pick that many of the highest-numbered owned serials (max 10 per request).","operationId":"OrganizationApi_transferOrgToken","parameters":[{"name":"id","required":true,"in":"path","description":"Organization identifier","schema":{"type":"string"}},{"name":"tokenId","required":true,"in":"path","description":"Token identifier","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferTokenDTO"}}}},"responses":{"200":{"description":"Successful operation."},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Transfers tokens from the organization's Hedera wallet to a target account.","tags":["organizations"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://guardian.hedera.com/api-reference-guardian/organizations.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
