Creates a new Survey object required to authenticate end users

Request Parameters

Name Type Description Required?
DataSurvey[]UnavailableRequired
ProjectIdSystem.Int32UnavailableRequired
ProjectIdSystem.Int32UnavailableRequired

Validation

Name Type Description Required?
ProjectIdSystem.Int32IdRequired

Endpoints

Sample Request
 <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:api="http://api.phoenixplatform.net" xmlns:tig="http://schemas.datacontract.org/2004/07/Tigerspike.Phoenix.Services" xmlns:arr="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:tig1="http://schemas.datacontract.org/2004/07/Tigerspike.Phoenix.Services.Filters">
    <soapenv:Header>
      <PhoenixHeader xmlns="http://api.phoenixplatform.com" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
         <AccessToken>[YOUR ACCESS TOKEN]</AccessToken>
         <Phoenix-ProjectId>1</Phoenix-ProjectId>
      </PhoenixHeader>
   </soapenv:Header>
   <soapenv:Body>
      <api1:CreateSurvey xmlns:api1="http://api.phoenixplatform.com">
         <api1:request>
             <tig:Id>1</tig:Id>
             <tig:ProjectId>1</tig:ProjectId>
             <tig:InitialScreenId>1</tig:InitialScreenId>
             <tig:Title>TestValue[f3feed2668fa4f5ebbd7b3278f91bf1a]</tig:Title>
             <tig:RecipientCount>1</tig:RecipientCount>
             <tig:ReportIndividuals>1</tig:ReportIndividuals>
             <tig:Score>1</tig:Score>
             <tig:UIColorsPrimary>TestValue[9d6a45788e414c0e8b52c283c0327edd]</tig:UIColorsPrimary>
             <tig:UIColorsSecondary>TestValue[74d63b35dd0941f3b33d0906839c60c2]</tig:UIColorsSecondary>
             <tig:UIColorsBackground>TestValue[406c8109c4194a6d9202599a3785eb20]</tig:UIColorsBackground>
             <tig:ImageDir>TestValue[77e82062cd4f4b84ab5600f17f2b2ae3]</tig:ImageDir>
             <tig:ProgressLabel>TestValue[19fb01fd3d9e463d95e6863842a71e32]</tig:ProgressLabel>
             <tig:Uuid>TestValue[7fb8ace3036546418233e879816853be]</tig:Uuid>
             <tig:LaunchScreenShow>true</tig:LaunchScreenShow>
             <tig:LaunchScreenTextDesktop>TestValue[f5c5f6f08cc349f695078511fca2ea75]</tig:LaunchScreenTextDesktop>
             <tig:LaunchScreenTextMobile>TestValue[30a46a317c34486fb300f27be2ab677f]</tig:LaunchScreenTextMobile>
             <tig:LaunchScreenTextColor>TestValue[9683c9e0d5864abc9809c2b239a1209c]</tig:LaunchScreenTextColor>
             <tig:LaunchScreenButtonText>TestValue[615a98a194cc405b801d3755e569772c]</tig:LaunchScreenButtonText>
             <tig:LaunchScreenBgFilename>TestValue[a044bbd6acfc44ae92dc673007c6ceeb]</tig:LaunchScreenBgFilename>
             <tig:FinalScreenTextSuccess>TestValue[b8820abf4e3a48b094cd9db6ce0abee3]</tig:FinalScreenTextSuccess>
             <tig:FinalScreenTextError>TestValue[8fb20c5b8fc4418087a65ed670aa6dad]</tig:FinalScreenTextError>
             <tig:FinalScreenTextColor>TestValue[1b40cb0073994ae984f6bdd4d38a1cec]</tig:FinalScreenTextColor>
             <tig:FinalScreenBgFilename>TestValue[3f9b2b132d0746a696574603e55b5932]</tig:FinalScreenBgFilename>
             <tig:EditUuid>TestValue[1d841f53dd5e4329a31d6397f0fc3366]</tig:EditUuid>
             <tig:DisplayUrlParam>TestValue[3c223b3529ad4c81aad4ca5d60dea018]</tig:DisplayUrlParam>
             <tig:ReportStatusFilter>TestValue[38118571e5e64b03843928c733b401b3]</tig:ReportStatusFilter>
             <tig:ModifyDate>2020-06-05T12:50:33.9052831+00:00</tig:ModifyDate>
             <tig:NameUrlField>TestValue[139d6abcdff1429285f62d4cb6282b9c]</tig:NameUrlField>
             <tig:IsActive>true</tig:IsActive>
             <tig:StatusTypeId>Open</tig:StatusTypeId>
             <tig:HasNamedRecipients>true</tig:HasNamedRecipients>
             <tig:ClosedText>TestValue[3ae28487937c408ca45c4d9f4768aa30]</tig:ClosedText>
             <tig:BadLinkText>TestValue[9176b034d7a74a36b5b84f2e18bc7918]</tig:BadLinkText>
             <tig:ReportIndividualNames>true</tig:ReportIndividualNames>
             <tig:CustomFont>TestValue[48d2eeeb592a4981b82426c56e6de16c]</tig:CustomFont>
             <tig:CustomCss>TestValue[81c4b1e3bfc047c399ada17540cdf436]</tig:CustomCss>
             <tig:NotificationAddresses>TestValue[cdb1a6ca23c0408682c8e22ee156950d]</tig:NotificationAddresses>
             <tig:MessageId>1</tig:MessageId>
             <tig:MetaDataParameters>new List<KeyValuePair<string, string>>().ToArray()</tig:MetaDataParameters>
         </api1:request>
      </api1:CreateSurvey>
   </soapenv:Body>
</soapenv:Envelope>
Sample Response
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Header>
      <ActivityId CorrelationId="d088e8c6-bf1e-4a9d-9e96-3f5faf232af5" xmlns="http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics">17abb643-6b2f-4485-b4ff-0afc30697b7d</ActivityId>
   </s:Header>
   <s:Body>
      <SurveyResponse xmlns="http://api.phoenixplatform.com">
         <SurveyResult xmlns:a="http://schemas.datacontract.org/2004/07/Tigerspike.Phoenix.Syndicate.Services.Contracts.Article" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
            <b:Data xmlns="http://schemas.datacontract.org/2004/07/Tigerspike.Phoenix.Services" xmlns:b="http://schemas.datacontract.org/2004/07/Tigerspike.Phoenix.Survey.Model">
              <b:Survey>
                <b:CreateDate>2020-06-05T12:50:33.9062829Z</b:CreateDate>
                <b:IsActive>false</b:IsActive>
                <b:Media />
                <b:ModifyDate>2020-06-05T12:50:33.9062829Z</b:ModifyDate>
                <b:ProjectId>0</b:ProjectId>
                <b:ReportIndividuals>0</b:ReportIndividuals>
                <b:Score>0</b:Score>
                <b:SurveyUrls />
  </b:Survey>
</b:Data>
            <TotalRecords xmlns="http://schemas.datacontract.org/2004/07/Tigerspike.Phoenix.Services">1</TotalRecords>
         </SurveyResult>
      </SurveyResponse>
   </s:Body>
</s:Envelope>
Resource URL

Sample Request

POST /projects/{projectId}/surveys? HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: application/json; charset=utf-8
Authorization: Bearer [YOUR SUPER SECURE TOKEN]
Content-Length: 4312
Host: [CallHost]
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)-
 
[{
 "Id" : 1,
 "ProjectId" : 1,
 "InitialScreenId" : 1,
 "Title" : "TestValue[34742120358a40a799b95b90cbc2da95]",
 "RecipientCount" : 1,
 "ReportIndividuals" : 1,
 "Score" : 1,
 "UIColorsPrimary" : "TestValue[0157c91e6a7f4dc6968c3eafab950a4c]",
 "UIColorsSecondary" : "TestValue[464acc13592a42fa9768af7734cbfa53]",
 "UIColorsBackground" : "TestValue[7cce615d864145b982abaa3de84826c9]",
 "ImageDir" : "TestValue[e4ac6f8118f44fe5b2bec9a0d418c5dd]",
 "ProgressLabel" : "TestValue[eb4c06d041214adda33e6cea542a3732]",
 "Uuid" : "TestValue[708db56a3ce34f82b8d992537992ca57]",
 "LaunchScreenShow" : true,
 "LaunchScreenTextDesktop" : "TestValue[0f4efe3a1e88449091b3f42c9dfe0dd2]",
 "LaunchScreenTextMobile" : "TestValue[de15e5183249407aa5bcdd1c1612503c]",
 "LaunchScreenTextColor" : "TestValue[09087860b40e4283ae38450d6f049080]",
 "LaunchScreenButtonText" : "TestValue[5ec31cf5ff234b8f9abce346fc6fb291]",
 "LaunchScreenBgFilename" : "TestValue[5e821b869dd144f3be15eac0d2623ba0]",
 "FinalScreenTextSuccess" : "TestValue[43f510fd41624dbebe4b540a7463fb66]",
 "FinalScreenTextError" : "TestValue[9686794c66724b4482d20124a66f238e]",
 "FinalScreenTextColor" : "TestValue[22959885fcfd4526a1a6e5da284c76a7]",
 "FinalScreenBgFilename" : "TestValue[7e49764b9a4e41deaf4f21ed4291116b]",
 "EditUuid" : "TestValue[6e5604b0d7b6400fb034ca73a9421d60]",
 "DisplayUrlParam" : "TestValue[393377d9fe8246648a7fa10793c20ee6]",
 "ReportStatusFilter" : "TestValue[ef3a4d20d67c4ee8a5bd919f6b3fcd50]",
 "ModifyDate" : "2020-06-05T12:50:33.9052831+00:00",
 "NameUrlField" : "TestValue[c3d12c0881094ab58488768a6d229a29]",
 "IsActive" : true,
 "StatusTypeId" : "Demo",
 "HasNamedRecipients" : true,
 "ClosedText" : "TestValue[afecabc803c64915aaa1a173e949fb76]",
 "BadLinkText" : "TestValue[95293deeda4e46eb9af6c45400252b2d]",
 "ReportIndividualNames" : true,
 "CustomFont" : "TestValue[b1b46d0449494766901ce999e743e9a5]",
 "CustomCss" : "TestValue[5f1ed968deb64cd19a8d07875a0eafe6]",
 "NotificationAddresses" : "TestValue[d262a3d2c5214b8c98668712ee505fa2]",
 "MessageId" : 1,
 "MetaDataParameters" : new List<KeyValuePair<string, string>>().ToArray()
}] 
Sample Response
HTTP/1.1 200 OK
Cache-Control: private
Content-Length: 200
Content-Type: application/json; charset=utf-8
Server: Microsoft-IIS/8.5
X-AspNet-Version: 4.0.30319
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET,PUT,POST,DELETE,OPTIONS
Access-Control-Allow-Headers: Content-Type

[{
  "ProjectId": 0,
  "ReportIndividuals": 0,
  "Score": 0,
  "CreateDate": "2020-06-05T13:24:14.1826058Z",
  "ModifyDate": "2020-06-05T13:24:14.1826058Z",
  "IsActive": false,
  "Media": [],
  "SurveyUrls": []
}]

Nuget

PM> Install-Package PhoenixServiceHelper

PhoenixServiceHelper Sample

using System;
using System.Collections.Generic;

using Tigerspike.Phoenix.Services.Api.ServiceConfiguration;
using Tigerspike.Phoenix.Services.Api.ServiceRequest;
using PhoenixService = Tigerspike.PhoenixSurvey.V1;
using Tigerspike.Phoenix.Services.Api;

var request = new SoapServiceRequest() { Token = "[YOUR SUPER SECURE TOKEN]", ProjectId = 1 };
var configuration = CustomConfigurationFactory.CreateServiceConfiguration(Assembly.GetExecutingAssembly());

var proxy = new PhoenixServiceHelper<PhoenixService.IPhoenixSurveyService>(configuration);
var response = proxy.Execute(request, o => o.CreateSurvey(new PhoenixService.CreateSurveyRequest() 
{ 
    Data = new[] 
    { 
        new PhoenixService.Survey() 
        {
          Id = 1,
          ProjectId = 1,
          InitialScreenId = 1,
          Title = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          RecipientCount = 1,
          ReportIndividuals = 1,
          Score = 1,
          UIColorsPrimary = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          UIColorsSecondary = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          UIColorsBackground = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          ImageDir = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          ProgressLabel = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          Uuid = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          LaunchScreenShow = true,
          LaunchScreenTextDesktop = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          LaunchScreenTextMobile = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          LaunchScreenTextColor = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          LaunchScreenButtonText = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          LaunchScreenBgFilename = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          FinalScreenTextSuccess = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          FinalScreenTextError = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          FinalScreenTextColor = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          FinalScreenBgFilename = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          EditUuid = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          DisplayUrlParam = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          ReportStatusFilter = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          ModifyDate = DateTime.UtcNow,
          NameUrlField = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          IsActive = true,
          StatusTypeId = PhoenixService.StatusTypeEnum.Testing,
          HasNamedRecipients = true,
          ClosedText = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          BadLinkText = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          ReportIndividualNames = true,
          CustomFont = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          CustomCss = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          NotificationAddresses = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          MessageId = 1,
          MetaDataParameters = new List<KeyValuePair<string, string>>().ToArray()
        }
    } 
}));