Skip to content

Organization Management

Get Current Organization

Retrieve detailed information about the current user's organization.

Request

http
GET /api/v2/organization/

Authentication

Supports two authentication methods:

  1. User login authentication
  2. Token authentication (add Authorization: Bearer <token> to headers)

Permissions

Requires valid organization access permissions.

Response

json
{
    "id": "org_id",
    "name": "Organization Name",
    "description": "Organization Description",
    "created_at": "2024-01-08T10:00:00Z",
    "updated_at": "2024-01-08T10:00:00Z",
    "creator": {
        "id": "user_id",
        "username": "creator_username"
    }
}

Update Organization

Update the current organization's information.

Request

http
PUT /api/v2/organization/

Permissions

Only the organization creator can update organization information.

Request Parameters

FieldTypeRequiredDescription
namestringNoOrganization name
descriptionstringNoOrganization description

Request Example

json
{
    "name": "New Organization Name",
    "description": "New Organization Description"
}

Response

Returns the updated organization information, same format as "Get Current Organization".

Error Codes

Error CodeDescription
401Unauthorized
403Forbidden (not creator)
400Bad Request

Organization Token Management

For organization token-related APIs, see Organization Token Management.