Create Customer User

This API is used to create a new user under your own account or under one of the customer’s sub accounts. Public APIs service will generate the initial password for the new user and will send it as part of an email to the user’s provided email address.

HTTP URL  
POST api/v2/customer/{id}/user

NOTE: Current API creates a user for the use of Public APIs only. It does not create a user for CMP portal.

Eligibility

The Requester is eligible to request and receive information on own customer or sub-customers.

API Request

Parameter Type M/O/CM Description
username String M Security Management Application username. Must be unique. Need to provide a valid user email address
customerId UUID M Your own customer ID or sub-customer ID which the user is created for If the user is created for your own account, then need to set your own customer ID. If the user is created for one of your sub accounts, then need to set the sub customer’s ID
role String M User role. ENUM valid values: ROLE_SUPER_ADMIN, ROLE_USER, ROLE_READ_ONLY, ROLE_SUPPORT, ‘ROLE_SUPER_ADMIN+IMPERSONATOR’ ‘ROLE_SUPER_ADMIN+IMPERSONATOR’ role can be used only if: • The new user’s account owner is ROOT or CSP. • If CSP, it also must be set as ‘isAllowedLoginOnBehalf’ on. • User type must be of ‘PORTAL’ type *Any other selection will result in an error. If the selected type of user is ‘PUBLIC_API’ then only ‘ROLE_SUPER_ADMIN’ can be used. *Any other selection will result in an error.

API Response

Response Structure

Parameter Type M/O/CM Description
errorCode String O Failure code.
errorMessage String O Failure message.
content Object O Array of main response body object displayed when an API call was successful. For a failure, it will be empty.
pageable Object O Paging information object displayed when an API call was successful. For a failure, it will be empty.

Content Data Objects

Element Type M/O/CM Description
userId UUID M New user generated universal unique identifier.
requestID String M Request instance ID. To be used by external systems to query the call (operation) status, whether in progress, successful or failed.

Pageable data objects

Element Type M/O/CM Description
page Numeric M Page number
size Numeric M Page size. Number of requested elements per page
totalPages Numeric M Total amount of available pages per requested page size
totalElements Numeric M Total amount of retrieved elements

Error Codes

In addition to the general success and failure codes, the following error codes are possible.

Code Message
AUTH_1003 Password does not satisfy the required policy

Examples

Request Body

Copy
{
  "username": "shaul.cohen@flolive.net",
  "customerId": "e7fcef24-5c03-41dd-9e33-995b7d6f46b6",
  "role": "ROLE_SUPER_ADMIN"
}

Response Body: Success ACK

Copy
{
  "errorCode": "",
  "errorMessage": "",
  "content": [
    {
      "userId": "5fce5508-b3b2-4b06-8b9a-eb2e9bb6ee76",
      "requestId": "ff74dca6-8e7f-4b85-a42b-13860913b371"
    }
  ],
  "pageable": {
    "page": 0,
    "size": 10,
    "totalPages": 1,
    "totalElements": 1
  }
}

Response Body: Failure NAK

Copy
{
  "errorCode": "GLOBAL_1001",
  "errorMessage": "Service unavailable. Please try again",
  "content": "",
  "pageable": ""
}