Create New Sub Organization Type

Create New Sub Organization Type

This endpoint adds a new custom sub-organization type to the four default ones: Department, Client, Partner, and Company.


HTTP Method and URL

POST {{host}}/api/v2/sub-organization/types?user_type=ENTERPRISE_API


Authentication Requirements

Requires Bearer Token in the 'Authorization' header.


Path and Query Parameters

  • user_type (required): Set to 'ENTERPRISE_API'

Request Body

Content-Type: multipart/form-data

  • name (string, required): Name of the sub-organization type (e.g., 'Technology', 'Finance')

  • description (string, optional): Description of the sub-organization type (e.g., 'Technology Department')


Example Request
POST {{host}}/api/v2/sub-organization/types?user_type=ENTERPRISE_API

Headers:
Authorization: Bearer {{user-token}}
Content-Type: multipart/form-data

Body:
name=Technology
description=Technology Department


Example Successful Response

Status: 201 Created

{
  "id": "string",
  "name": "Technology",
  "description": "Technology Department",
  "created_at": "2024-06-01T12:00:00Z"
}

Error Responses

  • 400 Bad Request: Invalid input or missing required fields.

  • 401 Unauthorized: Missing or invalid authentication token.

  • 409 Conflict: Sub-organization type already exists.


Usage Notes

  • The 'name' field must be unique among sub-organization types.

  • Only users with appropriate permissions can create new sub-organization types.

  • Refer to saved examples for variations in request and response payloads.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Query Params
string
Body Params
string

required

string

optional

Response

Language
Credentials
Bearer
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json