v1

latestOpenAPI 3.0.12026-07-249297145.2 KB
Contacts

Subscribe a contact

The method is used for <a href="https://docs.reteno.com/docs/integration-subscription-form-via-api">the integration of subscription forms</a>.<br/>If a contact does not exist, it is created with the non-confirmed email.<br/>If a contact exists, the contact fields are updated (except existing media channels).<br/>New contacts are created with a <b>not confirmed</b> status.<br/>

post/api/v1/contact/subscribe

Request body

groupsstring[]

The list of segment names where a new/updated contact will be added.

subscriptionsstring[]

Subscription categories added for a contact.

formTypestring

The subscription form name. It allows you to use several independent subscription forms.<br/> All characters are acceptable, except: < ; ’ \ / | " ` ' ^ ? ! , >

Example request

{
  "contact": {
    "firstName": "John",
    "lastName": "Smith",
    "channels": [
      {
        "device": {
          "appId": "83b77a49-fc28-409b-aeaa-68c9d544ab9d",
          "deviceModel": "iPhone 16 Pro",
          "os": "iOS",
          "locale": "en_UK",
          "clientVersion": "1.6.8",
          "appVersion": "1.23.45"
        }
      }
    ],
    "address": {
      "region": "Occitanie",
      "town": "Toulouse",
      "address": "Rue Imaginaire, 456",
      "postcode": "31000",
      "countryCode": "FR"
    },
    "fields": [
      {
        "id": 79814,
        "value": "textfield"
      }
    ],
    "addressBookId": 7200,
    "id": 23456789,
    "externalCustomerId": "TV12790",
    "groups": [
      {
        "id": 200400
      }
    ],
    "languageCode": "en",
    "timeZone": "Europe/London",
    "marketId": "kyiv"
  },
  "formType": "Newsletter subscription"
}