Definition

Creates a new Kulea Contact record based on Payload. The only real mandatory field for a Contact is an email address, which must be unique for all Kulea Contacts.

REST API URL 

  • Create a contact (with given JSON Payload in body) - POST: https://{{MA2ID}}.prod.kulea.marketing:8089/rest/api/users

Headers

  • Authorization (Mandatory String <API-KEY>) - Example: afeWER£4q3

Body/Payload - JSON

This must be JSON format where fields must correspond to Kulea fields (which you can get from /rest/api/users/fields API).  Also, the field types must be correct otherwise validation may fail. 

{
 "email": "junaid8@kulea.ma",
"forename":"junaid8",
"surname":"bakali8",
"signupdate":"20170201-131200"
"subscribed":true,
}

NOTE: In the example below the field 'subscribed' will subscribe the user within Kulea.  All new users by default are set to subscribed (without the need to set this field).  If later on you wish to update this record then you may update it by setting 'unsubscribe' to true in the Update Contact API method. 

NOTE: Once a record has been updated with 'unsubscribe' set to true, then you will not be able to set them to 'subscribed' again via the API.

NOTE: You cannot archive a user from using this API method.  For archive please use the DELETE contact API method. 

Response (application/json)

Response will be a json object with the following fields:

  • success - if true then request was successful; otherwise failed.
  • reason - only shown if success is false and indicates the reason of failure.  Examples of failure might be invalid fields, contact already exists (i.e. email address), Json format invalid etc.
  • crm_id - If success then returns the crm_id contact that was created.

Example:

{
"success": true,
"crm_id": 4294967668
}