Skip to content

Organization Management ​

Overview ​

Organization endpoints expose the tenant that scopes every device, project, and token. Use these APIs to read metadata about the active organization or rename it. Token creation, membership management, and access configuration are documented in the dedicated guides referenced below.

Endpoint Summary ​

MethodPathDescriptionNotes
GET/api/v2/organization/Fetch the active organization attached to the current token or sessionSee Get Current Organization.
PUT/api/v2/organization/Update organization profile fieldsSee Update Organization.

Endpoints ​

Get Current Organization ​

Retrieve metadata for the organization resolved from the request context.

Request ​

http
GET /api/v2/organization/
Authorization: Bearer <token>
Content-Type: application/json

Response ​

json
{
    "slug": "yengear",
    "name": "YenGear Lab",
    "description": "Pilot installation for greenhouse monitoring",
    "created_at": "2024-01-08T10:00:00Z",
    "updated_at": "2024-02-16T09:00:00Z"
}

Notes ​

  1. The organization is resolved by middleware. Applications embedding the slug in the URL must still pass the appropriate access token.

Update Organization ​

Update mutable metadata for the active organization. Only the creator (owner) can call this endpoint.

Request ​

http
PUT /api/v2/organization/
Authorization: Bearer <owner_token>
Content-Type: application/json

{
    "name": "YenGear Smart Agriculture",
    "description": "Central tenant for greenhouse and cold-chain projects"
}
FieldTypeRequiredDescription
namestringNoDisplay name shown across the portal
descriptionstringNoRicher context for operators. Markdown is not rendered.

Response ​

Returns the same schema as Get Current Organization with updated timestamps and values.

Error Codes ​

StatusCodeDescription
401UNAUTHORIZEDMissing or invalid credentials
403FORBIDDENCaller is not the organization owner
400BAD_REQUESTValidation failure (e.g., name too long)
  • Membership management, slug changes, and deletion are handled by YenGear IoT Cloud support. Reach out via the support channel if you need those workflows.
  • Token lifecycle operations are covered in Organization Token Management.