Bulk Create Organizations

This endpoint creates one or more new Organization(s).

Request

To create multiple new Organizations please make a POST request to the following URL:

HTTP MethodURL
POSThttps://industrial.api.ubidots.com/api/v2.0/organizations/_/bulk/create/

Query Parameters

ParameterTypeUseDescription
tokenStringAuthenticationAuthentication Token can optionally be sent as a query parameter.

Body Parameters

The body is an Array containing Organization JSON objects. Each Organization object can contain the following body parameters:

ParameterTypeRequired?Default ValueDescription
labelStringYesN/A (required)API label of Organization
nameStringNoSame as labelName of Organization
descriptionStringNo""Description of Organization
faviconImageNonullIcon of the Organization. How to send the favicon as body attribute
logoImageNonullLogo of the Organization. How to send the logo as body attribute
propertiesObjectNo{}Organization properties. Valid properties are: color
isActiveBooleanNoTrueIs True when Organization is active
app<app_key>NonullKey of App (id or label)

Header

ParameterTypeDescription
X-Auth-TokenString[Authentication Token] (/reference/authentication) of account
X-Bulk-OperationBooleanNeed to be set to True for the bulk operation to work
Content-TypeString (application/json)Content type of body
curl -X POST 'https://industrial.api.ubidots.com/api/v2.0/organizations/_/bulk/create/' \
 -H 'Content-Type: application/json' \
 -H 'X-Auth-Token: oaXBo6ODhIjPsusNRPUGIK4d72bc73' \
 -H 'X-Bulk-Operation: True' \
 -d '[
  {
    "label": "first-organization",
    "name": "First Organization"
  },
  {
    "label": "second-organization",
    "description": "Description of second Organization"
  },
  {
    "label": "third-organization",
    "properties": {"color": "#BADA55"}
  }
]'
{
  "task": {
    "id": "tyg54645501a9ca5714e7b098721"
  }
}
{
    "code": 400001,
    "message": "Validation Error.",
    "detail": {
        ....
    }
}
{
    "code": 401001,
    "message": "Authentication credentials were not provided.",
    "detail": "Authentication credentials were not provided."
}
{
    "detail": "Header `X-BULK-OPERATION` should be provided for bulk operation."
}

Response

Returns a Task Id of the asynchronous process.