Profiles

Create or update a profile

POST/profiles

Matches by the first identifier present and only by that one: id if given, else external_id, else email. Creates the profile when nothing matches (201) and updates it otherwise (200). An external_id that no profile has is a new profile: it is never matched to the profile that has the email you sent, and if another profile already has that email the request is refused (409 email_taken). Fields you leave out are not changed.

Permission: profiles:write · on the API key screen: Profiles → Full access · All permissions

Body parameters

  • idstring

    Match by profile id. If given and not found, the request fails (no fallback to email).

    At most 2,000 characters.

  • external_idstring | null

    Your own id for this person. Unique in the account.

    At most 255 characters.

  • emailstring | null

    At most 254 characters.

  • first_namestring | null

    At most 255 characters.

  • last_namestring | null

    At most 255 characters.

  • phonestring | null

    At most 50 characters.

  • organizationstring | null

    At most 255 characters.

  • titlestring | null

    At most 255 characters.

  • addressobject | null
    Show properties
    • streetstring | null

      At most 255 characters.

    • citystring | null

      At most 100 characters.

    • statestring | null

      At most 100 characters.

    • zipstring | null

      At most 20 characters.

  • custom_fieldsobject

    Keys must be custom fields that exist in the account. null clears a field.

    At most 100 keys.

  • tagsstring[]

    Added to the profile's tags; never removes one.

    At most 50 items.

  • subscriptionstring

    What the person said about marketing email. Leave it out when you do not know: nothing is then changed, and a new profile is not emailable. 'subscribed' makes a new or never-subscribed profile emailable; it never undoes the person's own unsubscribe (the response then says confirmation_required). 'unsubscribed' always applies. See subscription_result in the response.

    One of: subscribed unsubscribed

    At most 2,000 characters.

  • sms_subscriptionstring

    What the person said about marketing TEXT messages, separately from email. Send 'subscribed' only with their written consent to receive texts (US law requires it). Leave it out when you do not know: nothing is changed, and a new profile cannot be texted. 'subscribed' never undoes the person's own STOP or unsubscribe (the response then says refused). 'unsubscribed' always applies. Texts go to the profile's phone (US or Canadian mobile). See sms_subscription_result in the response.

    One of: subscribed unsubscribed

    At most 2,000 characters.

  • consentobject

    Evidence for subscription and sms_subscription, stored with the consent record and shown on the profile's consent history. Ignored without either.

    Show properties
    • textstring

      The wording the person agreed to.

      At most 2,000 characters.

    • sourcestring

      Where they agreed: a page, a form name, a system.

      At most 100 characters.

    • obtained_atstring

      When they agreed, as you recorded it.

      At most 2,000 characters.

Response

  • objectstringrequired

    One of: profile

    At most 2,000 characters.

  • idstringrequired

    At most 2,000 characters.

  • emailstring | nullrequired

    At most 100,000 characters.

  • email_subscriptionstringrequired

    Read-only. Whether the person may be sent marketing email: only 'subscribed' may. 'never_subscribed' = no consent recorded; 'pending' = waiting for the person to confirm by email.

    One of: subscribed unsubscribed pending never_subscribed

    At most 2,000 characters.

  • subscription_resultobject

    Only in the response to a write that sent subscription: what became of it.

    Show properties
    • requestedstringrequired

      One of: subscribed unsubscribed

      At most 2,000 characters.

    • outcomestringrequired

      One of: applied unchanged confirmation_required refused

      At most 2,000 characters.

    • reasonstring | nullrequired

      One of: unsubscribed suppressed

      At most 2,000 characters.

  • sms_subscription_resultobject

    Only in the response to a write that sent sms_subscription: what became of it.

    Show properties
    • requestedstringrequired

      One of: subscribed unsubscribed

      At most 2,000 characters.

    • outcomestringrequired

      One of: applied unchanged refused

      At most 2,000 characters.

    • reasonstring | nullrequired

      One of: unsubscribed

      At most 2,000 characters.

  • external_idstring | nullrequired

    At most 100,000 characters.

  • first_namestring | nullrequired

    At most 100,000 characters.

  • last_namestring | nullrequired

    At most 100,000 characters.

  • phonestring | nullrequired

    At most 100,000 characters.

  • organizationstring | nullrequired

    At most 100,000 characters.

  • titlestring | nullrequired

    At most 100,000 characters.

  • addressobjectrequired
    Show properties
    • streetstring | nullrequired

      At most 100,000 characters.

    • citystring | nullrequired

      At most 100,000 characters.

    • statestring | nullrequired

      At most 100,000 characters.

    • zipstring | nullrequired

      At most 100,000 characters.

  • custom_fieldsobjectrequired
  • tagsstring[]required

    At most 100000 items.

  • sourcestring | nullrequired

    At most 100,000 characters.

  • created_atstring | nullrequired

    At most 40 characters.

  • updated_atstring | nullrequired

    At most 40 characters.