Update Specific Sub Organization
This endpoint updates the details of a specific sub-organization within an enterprise. You can modify the sub-organization's name, address, contact details, branding photo, and type. The sub-organization ID is required to identify which entity to update.
HTTP Method and URL
Method: PUT
URL: {{host}}/api/v2/organizations/sub/:uuid?user_type=ENTERPRISE_API
Authentication Requirements
This endpoint requires authentication via a bearer token. The token should be provided in the Authorization header.
| Header | Value | Description |
|---|---|---|
| Authorization | Bearer | Required. API access token. |
Path and Query Parameters
Path Parameter:
uuid(string, required): The unique identifier of the sub-organization to update.
Query Parameter:
user_type(string, required): Must be set toENTERPRISE_API.
Request Body
The request body must be sent as multipart/form-data and can include the following fields:
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | The new name of the sub-organization. |
| string | Yes | The email address for the sub-organization. | |
| address | string | Yes | The address or contact details of the sub-organization. |
| photo | file | No | Branding image (shown on emails and signing page). |
| sub_organization_type_name | string | Yes | The type of sub-organization (e.g., Client). |
Example Request
PUT {{host}}/api/v2/organizations/sub/79b7c96e-28cd-4b7e-83fb-ebaf06bf241f?user_type=ENTERPRISE_API
Headers:
Authorization: Bearer <user-token>
Body (form-data):
name: test2
email: [email protected]
address: address2
photo: (file) doclogo.png
sub_organization_type_name: Client
Example Successful Response
{
"success": true,
"message": "Sub-organization updated successfully.",
"data": {
"uuid": "79b7c96e-28cd-4b7e-83fb-ebaf06bf241f",
"name": "test2",
"email": "[email protected]",
"address": "address2",
"photo_url": "https://.../doclogo.png",
"sub_organization_type_name": "Client"
}
}
Error Responses
-
400 Bad Request: Invalid input or missing required fields. -
401 Unauthorized: Missing or invalid authentication token. -
404 Not Found: Sub-organization with the specified UUID does not exist. -
500 Internal Server Error: Unexpected server error.
Usage Notes
-
Ensure the
user_typequery parameter is always set toENTERPRISE_API. -
The
photofield is optional; omit it if you do not wish to update the branding image. -
Only users with appropriate permissions can update sub-organization details.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
