POST | /api/services | Creates a new service in the system. | The datacenter where the service will be created can be specified by either setting the CollectionGuid or SiteGuid property. If CollectionGuid is specified the service will be installed in that Collection. If SiteGuid is specified the default Collection for that Site will be used to install the service. |
---|
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
PrimaryDomain | body | String | Yes | Used to apply membership rules for this domain. Needs to be specified in FQDN format. 54 char Max. |
ResellerGuid | body | Guid | Yes | The Guid of the Reseller that manages the Service. |
SystemUser | body | UserInfo | No | The initial user of the Service. This account is used for automatic invites and other administrative tasks. |
ContactInfo | body | ContactInfo | No | The customers contact info. |
CompanyInfo | body | Company | No | The customer's company information. CompanyInfo Name defaults to '{PrimaryDomain} Secure Messaging' if not supplied. |
CollectionGuid | body | Guid | No | The Guid of the collection in which the service will be created. If not provided, it is determined by the configuration of the specified reseller. |
ServiceCode | body | String | No | A unique Service code that identifies the service. SuperUser only. |
ServiceName | body | String | No | If not specified an automatic name is assigned based on the company's name. SuperUser only. |
ReferenceId | body | String | No | Optional reference to an external identification system. 250 char Max. |
SiteGuid | body | Guid | No | The Site where the service will be installed. |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
form | string | No | ||
Password | body | String | No | Password in plain text |
FirstName | form | string | No | |
LastName | form | string | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Name | body | String | Yes | |
body | String | Yes | ||
PhoneNumber | body | String | Yes |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Name | form | string | No | |
Address | form | string | No | |
City | form | string | No | |
StateProvince | form | string | No | |
PostalCode | form | string | No | |
Country | form | string | No | |
Website | form | string | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
ServiceGuid | body | Guid | No | |
ServiceStatus | form | ServiceStatus | No | Allowable Values
|
AdminUsername | form | string | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
ResponseStatus | form | ResponseStatus | No |
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /api/services HTTP/1.1
Host: api.secure-messaging.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{
"primaryDomain": "String",
"resellerGuid": "00000000000000000000000000000000",
"systemUser": {
"email": "String",
"password": "String",
"firstName": "String",
"lastName": "String"
},
"contactInfo": {
"name": "String",
"email": "String",
"phoneNumber": "String"
},
"companyInfo": {
"name": "String",
"address": "String",
"city": "String",
"stateProvince": "String",
"postalCode": "String",
"country": "String",
"website": "String"
},
"collectionGuid": "00000000000000000000000000000000",
"serviceCode": "String",
"serviceName": "String",
"referenceId": "String",
"siteGuid": "00000000000000000000000000000000"
}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length { "serviceGuid": "00000000000000000000000000000000", "serviceStatus": "Blocked", "adminUsername": "String", "responseStatus": { "errorCode": "String", "message": "String", "stackTrace": "String", "errors": [ { "errorCode": "String", "fieldName": "String", "message": "String", "meta": { "String": "String" } } ], "meta": { "String": "String" } } }