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 Method

URL

POST

https://industrial.api.ubidots.com/api/v2.0/organizations/_/bulk/create/

Query Parameters

Parameter

Type

Use

Description

token

String

Authentication

Authentication 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:

Parameter

Type

Required?

Default Value

Description

label

String

Yes

N/A (required)

API label of Organization

name

String

No

Same as label

Name of Organization

description

String

No

""

Description of Organization

favicon

Image

No

null

Icon of the Organization. How to send the favicon as body attribute

logo

Image

No

null

Logo of the Organization. How to send the logo as body attribute

properties

Object

No

{}

Organization properties. Valid properties are: color

isActive

Boolean

No

True

Is True when Organization is active

app

<app_key>

No

null

Key of App (id or label)

Header

Parameter

Type

Description

X-Auth-Token

String

Authentication Token of account

X-Bulk-Operation

Boolean

Need to be set to True for the bulk operation to work

Content-Type

String (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.