Create a user profile
# Create a User Profile ### `POST /dm/v1/users` Use this endpoint to create a user profile for use with Notification Groups. ## Header Parameters The request header must set the content-type to JSON, contain a current ThingSpace authorization token and a current VZ-M2M session token. For more details on how to get these tokens, visit [Getting Started](https://thingspace.verizon.com/documentation/api-documentation.html#/http/connectivity-management/guides/getting-started/introduction-to-the-connectivity-management-api). |Parameter Name|Data Type|Description| |-----|-----|-----| | **Authorization** *(required)* | string | HTTP Authorization request header containing a valid Bearer token: `Authorization: Bearer {token}` | | **VZ-M2M-Token** *(required)* | string | A valid session token returned by a Connectivity Management `POST /session/login` request. | | **Content-Type** *(required)* | string | Must be `application/json`. | ## HTTP Request [POST https://thingspace.verizon.com/api/dm/v1/users](/docs/specialized-apis/sensor-insights/api-endpoints/users/sensorinsightscreateuserrequest) ## Request Parameters **Note:** All parameters are required unless marked *(optional)* | Parameter | Data Type | Description | | ---------- | --------- | ------------ | | **accountname** | string | The numeric name of the account and must include leading zeros. | | **user** |object| An object containing the details of the user. | | **email** |string| An email address for the user, in the format "<email@domain.com>". | | **firstname** |string| The user's first name | | **id** |string| The UUID of the resource record. A UUID is a 32 to 36-bit alphanumeric string. | | **lastname** |string| The user's last name or Surname. | | **mdn** |string| The Mobile Directory Number of the user. This is a 10-digit phone number. | | **customdata** |object| This is free form JSON, any thing in the form of JSON can be stored. | ## Request Body Example Request: ```json { "accountname": "0000123456-00001", "user": { "email": "email@domain.com", "firstname": "First name", "id": "3f2f6461-eeee-ffff-gggg-f880c25aa143", "lastname": "Last name or Surname", "mdn": "908-555-1234", "customdata": { "additionalProp1": [ 100 ], "additionalProp2": [ 100 ], "additionalProp3": [ 100 ] } } } ``` ## Success Response **Status 200** This is a synchronous response, so the details of the user record will be returned. Example Response: ```json { "accountclientid": null, "ackterms": true, "acktermson": "2023-10-02T15:46:34.562Z", "billingaccountid": "0000123456-00001", "createdon": "2023-10-02T15:46:34.562Z", "credentialsid": "email@domain.com", "credentialstype": "email", "customdata": { "additionalProp1": [ 100 ], "additionalProp2": [ 100 ], "additionalProp3": [ 100 ] }, "description": "a short description", "displayname": "The user name displayed", "email": "email@domain.com", "firstname": "First name", "foreignid": "c1f178d3-eeee-ffff-gggg-0d6b7ae6022a", "id": "The UUID of the resource record", "lastname": "Last name or Surname", "lastupdated": "2023-10-02T15:46:34.562Z", "mdn": "908-555-1234", "middlename": "Middle name or initial", "name": "name of the record", "secondarybillingaccountids": [ null ], "state": "success", "version": "1.0", "versionid": "337bd2e8-eeee-ffff-gggg-5207992fd395" } ``` ## Success Parameters | Parameter | Data Type | Description | | ---------- | -------- | ----------- | | **accountclientid** |string| Future functionality. This value will be "null". | | **ackterms** |boolean|A flag indicating if the user has accepted the terms of use ( **true** ) or not ( **false** ).| | **acktermson** |string ($date-time)|A timestamp of when terms were accepted.| | **billingaccountid** |string| The numeric name of the account and must include leading zeros. This value matches the `accountname`. | | **createdon** |string ($date-time)|The timestamp of when the record was created. | | **credentialsid** |string| An email address used for user credentials. Currently, only email addresses are valid values. | | **credentialstype** |string|The type of credential represented by the ID. This will be `email`.| | **customdata** |object| This is free form JSON, any thing in the form of JSON can be stored. | | **description** |string| A description of the user record. | | **displayname** |string| The name of the user to be displayed.| | **email** |string| An email address for the user, in the format "<email@domain.com>".| | **firstname** |string| The user's first name | | **foreignid** |string| The UUID value of the user's Enterprise Customer Profile Database (ECPD) account. A UUID is a 32 to 36-bit alphanumeric string. | | **id** |string| The UUID of the resource record. A UUID is a 32 to 36-bit alphanumeric string. | | **lastname** |string|The user's last name or Surname.| | **lastupdated** |string ($date-time)|The timestamp of when the last update to the record was made.| | **mdn** |string|The Mobile Directory Number of the user. This is a 10-digit phone number.| | **middlename** |string|The middle name or initial of the user.| | **name** |string|The name of the record assigned by the creator of the record.| | **requestedon** |string ($date-time)|The timestamp of when the record was requested. | | **secondarybillingaccountids** |array| This is a virtual field not used in this release. The value will be "null". | | **state** |string|The status of the request made. This will be `success` or `failed`.| | **version** |string| The resource version. | | **versionid** |string| The UUID of the resource version. A UUID is a 32 to 36-bit alphanumeric string. | ## Failure Responses Example Response: ```json { "error": "Error name or code", "error_description": "A longer error description.", "cause": "A cause for the error" } ```