Create Organization
Create New Organization
POST
https://{server_address}/api/v1/organization/create
Headers
Authorization*
Bearer {access_token}
Content-Type*
application/json
Request Body
name*
My Organization
New organization's name. Should be from 3 to 100 symbols and can contains only letters, digits, spaces, dots, hyphens and apostrophes.
description
My friend's organization
New organization's description. Should be up to 1,000 symbols and may cannot contains slashes, back slashes, less than and greater than symbols.
type*
BUSINESS
Organization type. Could be: ROOT
, BUSINESS
, PERSONAL
, BRANCH
, DISTRIBUTOR
, CONTRACTOR
, INSTALLER
, RESELLER
. If parent organization's type is PERSONAL
, then new organization's type will be PERSONAL
as well.
tz
Europe/Kyiv
Organization's timezone.
parentId
1
Parent organization's identifier.
phoneNumber
+380123456789
New organization's phone number. Should be prefixed with +
.
unitSystem
IMPERIAL
Organization's unit system. Could be IMPERIAL
or METRIC
.
{
"error": {
"message": "Parent organization is not found or you don't have access to it."
}
}
Request examples:
# curl command example:
$ curl -X POST -H "Content-Type: application/json" \
-H "Authorization: Bearer {accessToken}" \
-d '{"templateId":667622,"orgId":6722,"name":"API Test Device","address":"Test Address","ownerId":11456}' \
https://fra1.blynk.cloud/api/v1/organization/create
$ curl -X POST -H "Content-Type: application/json" \
-H "Authorization: Bearer eIdWHQqRfFmvP5LDDh-IGxPUzi7I27HthzCPAVmS" \
-d '{"templateId":667622,"orgId":6722,"name":"API Test Device","address":"Test Address","ownerId":11456}' \
https://fra1.blynk.cloud/api/v1/organization/create
Last updated
Was this helpful?