HostTracker help - api REST contact operations

  1. GET /api/web/v1/contacts/types- get array of accepted contact types. Currently accepted ["Email","IM","SMS","VoiceCall"]
  2. GET /api/web/v1/contacts/delays - get array of accepted contact alert delays in minutes. Currently [0,5,15,30,60,180,720]
  3. GET /api/web/v1/contacts/sms/gateways - get array of accepted sms gateways. Currently ["clickatell","clickatella","infobip","skype","twiliosms"]
  4. GET /api/web/v1/contacts/im/gateways - get array of accepted instant messaging gateways. Currently ["GTalk","SkypeChat"]
  5. GET /api/web/v1/contacts - get all contacts, possible filltered by url query string
  6. GET /api/web/v1/contacts/{id:guid} - get contact by id (GUID)
  7. POST /api/web/v1/contacts/email - create email contact
  8. POST /api/web/v1/contacts/sms - create sms contact
  9. POST /api/web/v1/contacts/im - create instant messaging contact
  10. POST /api/web/v1/contacts/voice - create voice call contact
  11. PUT /api/web/v1/contacts - update general contacts parameters (delay, name, activity period, etc.)
  12. PUT /api/web/v1/contacts/email - update email contact
  13. PUT /api/web/v1/contacts/sms - update sms contact
  14. PUT /api/web/v1/contacts/im - update instant messaging contact
  15. PUT /api/web/v1/contacts/voice - update voice call contact
  16. DELETE /api/web/v1/contacts/{id:guid} - delete contact specified by id (GUID)
  17. DELETE /api/web/v1/contacts - delete contacts specified by filter or all contacts
  18. POST /api/web/v1/contacts/{id:guid}/code - confirm contact by sending confirmation code
  19. PATCH /api/web/v1/contacts/{id:guid}/code - possible regenerate confirmation code and resend it to contact address
  20. POST /api/web/v1/contacts/$batch - perform batched contacts creation and/or update
GET /api/web/v1/contacts/types - get array of accepted contact types.
Request. GET /api/web/v1/contacts/types
  • Authorization: bearer <your auth.token here> (how to get token see user operations)
  • Accept or Content-Type specifies response content format: application/json, text/xml.
Response. GET /api/web/v1/contacts/types
  • Content-Type: application/json ["Email","IM","SMS","VoiceCall"]
  • Content-Type: text/xml <ArrayOfString xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <string>Email</string>
       <string>IM</string>
       <string>SMS</string>
       <string>VoiceCall</string>
    </ArrayOfString>
GET /api/web/v1/contacts/delays - get array of accepted contact alert delays in minutes.
Request. GET /api/web/v1/contacts/delays
  • Authorization: bearer <your auth.token here> (how to get token see user operations)
  • Accept or Content-Type specifies response content format: application/json, text/xml.
Response. GET /api/web/v1/contacts/delays
  • Content-Type: application/json [0,5,15,30,60,180,720]
  • Content-Type: text/xml <ArrayOfInt xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <int>0</int>
       <int>5</int>
       <int>15</int>
       <int>30</int>
       <int>60</int>
       <int>180</int>
       <int>720</int>
    </ArrayOfInt>
GET /api/web/v1/contacts/sms/gateways - get array of accepted sms gateways.
Request. GET /api/web/v1/contacts/sms/gateways
  • Authorization: bearer <your auth.token here> (how to get token see user operations)
  • Accept or Content-Type specifies response content format: application/json, text/xml.
Response. GET /api/web/v1/contacts/sms/gateways
  • Content-Type: application/json ["clickatell","clickatella","infobip","skype","twiliosms"]
  • Content-Type: text/xml <ArrayOfString xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <string>clickatell</string>
       <string>clickatella</string>
       <string>infobip</string>
       <string>skype</string>
       <string>twiliosms</string>
    </ArrayOfString>
GET /api/web/v1/contacts/im/gateways - get array of accepted im gateways.
Request. GET /api/web/v1/contacts/im/gateways Headers:
  • Authorization: bearer <your auth.token here> (how to get token see user operations)
  • Accept or Content-Type specifies response content format: application/json, text/xml.
Response. GET /api/web/v1/contacts/im/gateways
  • Content-Type: application/json ["GTalk","SkypeChat"]
  • Content-Type: text/xml <ArrayOfString xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <string>GTalk</string>
       <string>SkypeChat</string>
    </ArrayOfString>
GET /api/web/v1/contacts - get all contacts, possible filltered by url query string
Request. GET /api/web/v1/contacts Headers:
  • Authorization: bearer <your auth.token here> (how to get token see user operations)
  • Accept or Content-Type specifies response content format: application/json, text/xml.

    Optional filters(via URL,URL filter keywords are case sensitive!):
  • acceptBillingNotifications - True - search for contacts which accepts billing notifications, False - search only for contacts which does not accept billing notifications, Null - search both GET https://www.host-tracker.com/api/web/v1/contacts?acceptBillingNotifications=True HTTP/1.1
    User-Agent: Fiddler
    Content-Type: application/json
    Host: www.host-tracker.com
    Authorization: bearer <your token here>
  • address - search for contacts with specified address. GET https://www.host-tracker.com/api/web/v1/contacts?address=test@mail.com HTTP/1.1
    User-Agent: Fiddler
    Content-Type: application/json
    Host: www.host-tracker.com
    Authorization: bearer <your token here>
  • addresses - search for contacts with specified addresses GET https://www.host-tracker.com/api/web/v1/contacts?addresses=test@mail.com&addresses=
    1122334455 HTTP/1.1
    User-Agent: Fiddler
    Content-Type: application/json
    Host: www.host-tracker.com
    Authorization: bearer <your token here>
  • contactType - search for specified contact type(SMS, Email, IM, VoiceCall). GET https://www.host-tracker.com/api/web/v1/contacts?contactType=SMS HTTP/1.1
    User-Agent: Fiddler
    Content-Type: application/json
    Host: www.host-tracker.com
    Authorization: bearer <your token here>
  • confirmed - True - search for confirmed only, False - search only for not confirmed, null - search both. GET https://www.host-tracker.com/api/web/v1/contacts?confirmed=True HTTP/1.1
    User-Agent: Fiddler
    Content-Type: application/json
    Host: www.host-tracker.com
    Authorization: bearer <your token here>
  • excludeAddresses - search for contacts with not specified addresses(not email) GET https://www.host-tracker.com/api/web/v1/contacts?addresses=3333333334&addresses=222222221&addresses="gord_den+5@gmail.com"&excludeAddresses=True HTTP/1.1
    User-Agent: Fiddler
    Content-Type: application/json
    Host: www.host-tracker.com
    Authorization: bearer <your token here>
  • excludeContactTypes - if true - exclude specified contact types
  • excludeIds - if true then exclude specified ids
  • ids - search contacts by ids. GET https://www.host-tracker.com/api/web/v1/contacts?ids=092a2bc9-58d1-e411-80c3
    -00155d36955e
    &ids=695dc35a-59d1-e411-80c3-00155d36955e HTTP/1.1
    User-Agent: Fiddler
    Content-Type: application/json
    Host: www.host-tracker.com
    Authorization: bearer <your token here>
  • overlimited - True - search for overlimited only, False - search only for not overlimited, Null - search both. GET https://www.host-tracker.com/api/web/v1/contacts?overlimited=False HTTP/1.1
    User-Agent: Fiddler
    Content-Type: application/json
    Host: www.host-tracker.com
    Authorization: bearer <your token here>
Response. GET /api/web/v1/contacts - contact data
  • Content-Type: application/json [
     {
       "id":"Contact id",
       "address":"Contact address",
       "confirmed":"True or false"
       "contactType":"Type of contact",
       "name":"Name of contact",
       "sendCost":"Cost to send",
       "alertDelay":"Delay of alert",
       "activePeriodStart":"Start of active period",
       "activePeriodEnd":"End of active period",
       "activeDays":"Active days",
       "billingOverlimit":Billing overlimit here,
       "subscriptions":"Subscriptions here",
       "reportFormat":"Format of report",
       "sendNews":"True or false",
       "sendPressRelease":"True or false",
       "sendBillingNotifications":"True or false"
     }
    ]
  • Content-Type: text/xml <ArrayOfContact xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <Contact xsi:type="EmailContact">
         <id>Contact id</id>
         <confirmed>True or false</confirmed>
         <contactType>Type of contact</contactType>
         <name>Name</name>
         <address>Contact address</address>
         <sendCost>Cost to send</sendCost>
         <alertDelay>Delay of alerts</alertDelay>
         <activePeriodStart />
         <activePeriodEnd />
         <billingOverlimit />
         <subscriptions />
         <reportFormat>Format of report</reportFormat>
         <sendNews>True or false</sendNews>
         <sendPressRelease>True or false</sendPressRelease>
         <sendBillingNotifications>True or false</sendBillingNotifications>
       </Contact>
    </ArrayOfContact>
GET /api/web/v1/contacts/{id:guid} - get contact by id (GUID)
Request. GET /api/web/v1/contacts/{id:guid} Headers:
  • Authorization: bearer <your auth.token here> (how to get token see user operations)
  • Accept or Content-Type specifies response content format: application/json, text/xml. GET https://www.host-tracker.com/api/web/v1/contacts/092a2bc9-58d1-e411-80c3-00155d36955e HTTP/1.1
    User-Agent: Fiddler
    Content-Type: application/json
    Host: www.host-tracker.com
    Content-Length: 0
    Authorization: bearer
Response. GET /api/web/v1/contacts/{id:guid} Contact data
POST /api/web/v1/contacts/email - create email contact
Request. POST /api/web/v1/contacts/email Headers:
  • Authorization: bearer <your auth.token here> (how to get token see user operations)
  • Accept or Content-Type specifies response content format: application/json, text/xml.
    Parameters:
    • id - contact id (GUID) should be specified only in UpdateContacts operation. For other method should be null (not set).
    • name - user provided contact name
    • address - contact address
    • alertDelay - alert sending delay in minutes. See GetAlertDelays method for available values
    • activePeriodStart - string in format hh:mm (or null if contact is active for all time), specify start of contact daily activity period. Should be specified with activePeriodEnd. If activePeriodStart > activePeriodEnd then activity period calculated as period from activePeriodStart day time to the end of the day plus period from next day start to next day activePeriodEnd time. If alert created when contact is outside activity period then it will not be sent to this contact.
    • activePeriodEnd - string in format hh:mm (or null if contact is active for all time), specify period of contact activity. Should be specified with activePeriodStart. If activePeriodStart > activePeriodEnd then activity period calculated as period from activePeriodStart day time to the end of the day plus period from next day start to next day activePeriodEnd time. If alert created when contact is outside activity period then it will not be sent to this contact.
    • activeDays - array of week days when contact is active or null if contact is active for all days. Available values: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday
    • subscriptions - subscriptions for this contact (see subscription service AddSubscriptions for details).
    • reportFormat - format of emails. Currently supported: Text, ShortText. Planned: HTML, Pdf(for reports)
    • sendNews - could contact be used for news delivery
    • sendPressRelease - could contact be used for press release delivery
    • sendBillingNotifications - send billing notifications (about low balance, overlimits and others)
  • Content-Type: application/json {"address":"example@example.com","name":"name of you contact"}
  • Content-Type: text/xml <EmailContactEditableData>
       <address>
          example@example.com
       </address>
       <name>
          name of your contact
       </name>
    </EmailContactEditableData>
Response. POST /api/web/v1/contacts/email Contact statuses:
  • Confirmed - contact created in confirmed state.
  • LowSmsBalance - could not send contact confirmation code due to low balance.
  • CodeSent - contact created and confirmation code was sent. Contact become active after confirmation.
  • CodeFail - contact create but code sending failed. Try to resend code after some time.
  • CodeSentEarlier -
  • OperationError -
  • Overlimited -
POST /api/web/v1/contacts/sms - create sms contact
Request. POST /api/web/v1/contacts/sms Headers:
  • Authorization: bearer <your auth.token here> (how to get token see user operations)
  • Accept or Content-Type specifies response content format: application/json, text/xml.
    Parameters:
    • id - contact id (GUID) should be specified only in UpdateContacts operation. For other method should be null (not set).
    • name - user provided contact name
    • address - contact address
    • alertDelay - alert sending delay in minutes. See GetAlertDelays method for available values
    • activePeriodStart - string in format hh:mm (or null if contact is active for all time), specify start of contact daily activity period. Should be specified with activePeriodEnd. If activePeriodStart > activePeriodEnd then activity period calculated as period from activePeriodStart day time to the end of the day plus period from next day start to next day activePeriodEnd time. If alert created when contact is outside activity period then it will not be sent to this contact.
    • activePeriodEnd - string in format hh:mm (or null if contact is active for all time), specify period of contact activity. Should be specified with activePeriodStart. If activePeriodStart > activePeriodEnd then activity period calculated as period from activePeriodStart day time to the end of the day plus period from next day start to next day activePeriodEnd time. If alert created when contact is outside activity period then it will not be sent to this contact.
    • activeDays - array of week days when contact is active or null if contact is active for all days. Available values: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday
    • subscriptions - subscriptions for this contact (see subscription service AddSubscriptions for details).
    • gateway - sms gateway of contact. See SMS gateways for details
  • Content-Type: application/json {"address":"number","name":"name of you contact","gateway":"type of gateway"}
  • Content-Type: text/xml <SmsContactEditableData>
      <address>399494543</address>
      <name>name of you contact4</name>
      <gateway>clickatell</gateway>
    </SmsContactEditableData>
Response. POST /api/web/v1/contacts/sms Contact data
POST /api/web/v1/contacts/im - create instant messaging contact
Request. POST /api/web/v1/contacts/im Headers:
  • Authorization: bearer <your auth.token here> (how to get token see user operations)
  • Accept or Content-Type specifies response content format: application/json, text/xml.
    Parameters:
    • id - contact id (GUID) should be specified only in UpdateContacts operation. For other method should be null (not set).
    • name - user provided contact name
    • address - contact address
    • alertDelay - alert sending delay in minutes. See GetAlertDelays method for available values
    • activePeriodStart - string in format hh:mm (or null if contact is active for all time), specify start of contact daily activity period. Should be specified with activePeriodEnd. If activePeriodStart > activePeriodEnd then activity period calculated as period from activePeriodStart day time to the end of the day plus period from next day start to next day activePeriodEnd time. If alert created when contact is outside activity period then it will not be sent to this contact.
    • activePeriodEnd - string in format hh:mm (or null if contact is active for all time), specify period of contact activity. Should be specified with activePeriodStart. If activePeriodStart > activePeriodEnd then activity period calculated as period from activePeriodStart day time to the end of the day plus period from next day start to next day activePeriodEnd time. If alert created when contact is outside activity period then it will not be sent to this contact.
    • activeDays - array of week days when contact is active or null if contact is active for all days. Available values: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday
    • subscriptions - subscriptions for this contact (see subscription service AddSubscriptions for details).
    • gateway - instant messaging gateway of contact. See IM gateways for details
  • Content-Type: application/json {"address":"123api", "name":"im contact","gateway":"SkypeChat"}
  • Content-Type: text/xml <IMContactEditableData>
    <address>123api2</address>
      <name>im contact2</name>
      <gateway>SkypeChat</gateway>
    </IMContactEditableData>
Response. POST /api/web/v1/contacts/im Contact data
POST /api/web/v1/contacts/voice - create voice call contact
Request. POST /api/web/v1/contacts/voice Headers:
  • Authorization: bearer <your auth.token here> (how to get token see user operations)
  • Accept or Content-Type specifies response content format: application/json, text/xml.
    Parameters:
    • id - contact id (GUID) should be specified only in UpdateContacts operation. For other method should be null (not set).
    • name - user provided contact name
    • address - contact address
    • alertDelay - alert sending delay in minutes. See GetAlertDelays method for available values
    • activePeriodStart - string in format hh:mm (or null if contact is active for all time), specify start of contact daily activity period. Should be specified with activePeriodEnd. If activePeriodStart > activePeriodEnd then activity period calculated as period from activePeriodStart day time to the end of the day plus period from next day start to next day activePeriodEnd time. If alert created when contact is outside activity period then it will not be sent to this contact.
    • activePeriodEnd - string in format hh:mm (or null if contact is active for all time), specify period of contact activity. Should be specified with activePeriodStart. If activePeriodStart > activePeriodEnd then activity period calculated as period from activePeriodStart day time to the end of the day plus period from next day start to next day activePeriodEnd time. If alert created when contact is outside activity period then it will not be sent to this contact.
    • activeDays - array of week days when contact is active or null if contact is active for all days. Available values: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday
    • subscriptions - subscriptions for this contact (see subscription service AddSubscriptions for details).
    Currently has no additional field. VoiceCall gateway is twiliovoice. Send cost: $0.04 for US carriers, $0.222 for other.
  • Content-Type: application/json {
    "address":"123123123",
    "name":"voice contact",
    "gateway":"twiliovoice"
    }
  • Content-Type: text/xml <VoiceCallEditableData>
    <address>1231231232</address>
    <name>voice contact2</name>
    <gateway>twiliovoice</gateway>
    </VoiceCallEditableData>
Response. POST /api/web/v1/contacts/voice Contact data
PUT /api/web/v1/contacts/email - update email contact
Request. api/web/v1/contacts/email Headers:
  • Authorization: bearer <your auth.token here> (how to get token see user operations)
  • Accept or Content-Type specifies response content format: application/json, text/xml.
  • Content-Type: application/json PUT https://www.host-tracker.com/api/web/v1/contacts/email/id of contact HTTP/1.1
    User-Agent: Fiddler
    Content-Type: application/json
    Host: www.host-tracker.com
    Authorization: bearer your ticket here

    {"reportFormat":"ShortText"}
  • Content-Type: text/xml PUT https://www.host-tracker.com/api/web/v1/contacts/email/id of contact HTTP/1.1
    User-Agent: Fiddler
    Content-Type: text/xml
    Host: www.host-tracker.com
    Authorization: bearer your ticket here

    <EmailContactEditableData>
    <reportFormat>report format, see</reportFormat>
    <sendNews>1 or 0</sendNews>
    </EmailContactEditableData>
Response. api/web/v1/contacts/email Contact data
PUT /api/web/v1/contacts/sms - update sms contact
Request. PUT /api/web/v1/contacts/sms Headers:
  • Authorization: bearer <your auth.token here> (how to get token see user operations)
  • Accept or Content-Type specifies response content format: application/json, text/xml.
  • Content-Type: application/json {"address":"222222221","name":"sms contact2","gateway":"twiliosms"}
  • Content-Type: text/xml PUT https://www.host-tracker.com/api/web/v1/contacts/sms/092a2bc9-58d1-e411-80c3-00155d36955e HTTP/1.1
    User-Agent: Fiddler
    Content-Type: text/xml
    Host: www.host-tracker.com
    Authorization: bearer

    <SmsContactEditableData>
    <gateway>clickatell</gateway>
    </SmsContactEditableData>
Response. PUT /api/web/v1/contacts/sms Contact data
PUT /api/web/v1/contacts/im - update instant messaging contact
Request. PUT PUT /api/web/v1/contacts/im Headers:
  • Authorization: bearer <your auth.token here> (how to get token see user operations)
  • Accept or Content-Type specifies response content format: application/json, text/xml.
  • Content-Type: application/json PUT https://www.host-tracker.com/api/web/v1/contacts/im/695dc35a-59d1-e411-80c3-00155d36955e HTTP/1.1
    User-Agent: Fiddler
    Content-Type: application/json
    Host: www.host-tracker.com
    Authorization: bearer
    Content-Length: 79
    {"address":"222222224","name":"im contact2","gateway":"GTalk"}
  • Content-Type: text/xml PUT https://www.host-tracker.com/api/web/v1/contacts/im/695dc35a-59d1-e411-80c3-00155d36955e HTTP/1.1
    User-Agent: Fiddler
    Content-Type: text/xml
    Host: www.host-tracker.com
    Authorization: bearer
    <IMContactEditableData>
    <gateway>SkypeChat</gateway>
    </IMContactEditableData>
Response. PUT PUT /api/web/v1/contacts/im Contact data
PUT /api/web/v1/contacts/voice Currently has no additional field. VoiceCall gateway is twiliovoice. Send cost: $0.04 for US carriers, $0.222 for other.
DELETE /api/web/v1/contacts/{id:guid} - delete contact specified by id (GUID)
Request. DELETE /api/web/v1/contacts/{id:guid} Headers:
  • Authorization: bearer <your auth.token here> (how to get token see user operations)
  • Accept or Content-Type specifies response content format: application/json, text/xml. DELETE https://www.host-tracker.com/api/web/v1/contacts/id of contact HTTP/1.1
    User-Agent: Fiddler
    Content-Type: application/json
    Host: www.host-tracker.com
    Authorization: bearer your ticket here
Response. DELETE /api/web/v1/contacts/{id:guid} Contact data
DELETE /api/web/v1/contacts - delete contacts specified by filter or all contacts
Request.
Response. Contact data
POST /api/web/v1/contacts/{id:guid}/code - confirm contact by sending confirmation code
Request. POST /api/web/v1/contacts/{id:guid}/code Headers:
  • Authorization: bearer <your auth.token here> (how to get token see user operations)
  • Accept or Content-Type specifies response content format: application/json, text/xml.
  • Content-Type: application/json POST https://www.host-tracker.com/api/web/v1/contacts/id of contact/code HTTP/1.1
    User-Agent: Fiddler
    Content-Type: application/json
    Host: www.host-tracker.com
    Authorization: bearer your token here

    {"code":"64700"}
  • Content-Type: text/xml POST https://www.host-tracker.com/api/web/v1/contacts/7cb19b17-6bd9-e411-80c3-00155d36955e/code HTTP/1.1
    User-Agent: Fiddler
    Content-Type: text/xml
    Host: www.host-tracker.com
    Authorization: bearer

    <ContactCode>
    <contactId>7cb19b17-6bd9-e411-80c3-00155d36955e</contactId>
    <code>22934</code>
    </ContactCode>
Response. POST /api/web/v1/contacts/{id:guid}/code Contact data
PATCH /api/web/v1/contacts/{id:guid}/code - possible regenerate confirmation code and resend it to contact address
Request. PATCH /api/web/v1/contacts/{id:guid}/code Headers:
  • Authorization: bearer <your auth.token here> (how to get token see user operations)
  • Accept or Content-Type specifies response content format: application/json, text/xml. PATCH https://www.host-tracker.com/api/web/v1/contacts/id of contact/code HTTP/1.1
    User-Agent: Fiddler
    Content-Type: text/xml
    Host: www.host-tracker.com
    Authorization: bearer your token here
Response. PATCH /api/web/v1/contacts/{id:guid}/code Contact data

Help pages by categories