CCC API v8.4.0.0

<back to all web services

CreateService

The following routes are available for this service:
POST/api/servicesCreates 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.
CreateService Parameters:
NameParameterData TypeRequiredDescription
PrimaryDomainbodyStringYesUsed to apply membership rules for this domain. Needs to be specified in FQDN format. 54 char Max.
ResellerGuidbodyGuidYesThe Guid of the Reseller that manages the Service.
SystemUserbodyUserInfoNoThe initial user of the Service. This account is used for automatic invites and other administrative tasks.
ContactInfobodyContactInfoNoThe customers contact info.
CompanyInfobodyCompanyNoThe customer's company information. CompanyInfo Name defaults to '{PrimaryDomain} Secure Messaging' if not supplied.
CollectionGuidbodyGuidNoThe Guid of the collection in which the service will be created. If not provided, it is determined by the configuration of the specified reseller.
ServiceCodebodyStringNoA unique Service code that identifies the service. SuperUser only.
ServiceNamebodyStringNoIf not specified an automatic name is assigned based on the company's name. SuperUser only.
ReferenceIdbodyStringNoOptional reference to an external identification system. 250 char Max.
SiteGuidbodyGuidNoThe Site where the service will be installed.
UserInfo Parameters:
NameParameterData TypeRequiredDescription
EmailformstringNo
PasswordbodyStringNoPassword in plain text
FirstNameformstringNo
LastNameformstringNo
ContactInfo Parameters:
NameParameterData TypeRequiredDescription
NamebodyStringYes
EmailbodyStringYes
PhoneNumberbodyStringYes
Company Parameters:
NameParameterData TypeRequiredDescription
NameformstringNo
AddressformstringNo
CityformstringNo
StateProvinceformstringNo
PostalCodeformstringNo
CountryformstringNo
WebsiteformstringNo
CreateServiceResponse Parameters:
NameParameterData TypeRequiredDescription
ServiceGuidbodyGuidNo
ServiceStatusformServiceStatusNo

Allowable Values

  • Blocked
  • AccountCancelled
  • AccountSuspended
  • Provisioning
  • TrialExpired
  • TrialActive
  • DemoAccount
  • CertifiedSecure
AdminUsernameformstringNo
BaseResponse Parameters:
NameParameterData TypeRequiredDescription
ResponseStatusformResponseStatusNo

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

HTTP + JSON

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"
    }
  }
}