Customers

Customer Marketing Preferences

Endpoints for managing a Customer's opt-in/out state against each of their organisation's MarketingPreferences.

get/customers/customers/{customerId}/marketing-preferences

List a Customer's Marketing Preferences

listCustomerMarketingPreferences

Returns the marketing preferences that exist in the customer's organisation along with the customer's opt-in state for each.

Path parameters

  • customerIduuidrequired

    The unique identifier of the customer this operation is scoped to. Customer IDs are stable across renames and email changes; treat them as opaque strings even though the underlying format is a UUID.

Query parameters

  • per_pageintegeroptional

    The number of results to return per page

  • pageintegeroptional

    The page to retrieve results from

Responses

  • 200

    The customer's marketing preferences were successfully retrieved

  • 401

    The user is unauthenticated

  • 404

    The resource couldn't be found

get/customers/customers/{customerId}/marketing-preferences/{marketingPreferenceId}

Get a Customer's Marketing Preference

getCustomerMarketingPreference

Returns the customer's opt-in state for the given marketing preference. If the customer has never been presented with the preference, the response describes the implicit opted-out state (the preference's id with opted_in: false) rather than 404ing.

Path parameters

  • customerIduuidrequired

    The unique identifier of the customer this operation is scoped to. Customer IDs are stable across renames and email changes; treat them as opaque strings even though the underlying format is a UUID.

  • marketingPreferenceIdstringrequired

    The unique identifier of the marketing preference this operation is scoped to.

Responses

  • 200

    The customer's marketing preference state was successfully retrieved

  • 401

    The user is unauthenticated

  • 404

    The resource couldn't be found

put/customers/customers/{customerId}/marketing-preferences/{marketingPreferenceId}

Opt a Customer into a Marketing Preference

actionMarketingPreferenceOptIn

Opts the customer into the given marketing preference.

Path parameters

  • customerIduuidrequired

    The unique identifier of the customer this operation is scoped to. Customer IDs are stable across renames and email changes; treat them as opaque strings even though the underlying format is a UUID.

  • marketingPreferenceIdstringrequired

    The unique identifier of the marketing preference this operation is scoped to.

Responses

  • 200

    The customer's marketing preference state was successfully retrieved

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found

  • 422

    The request didn't pass validation

delete/customers/customers/{customerId}/marketing-preferences/{marketingPreferenceId}

Opt a Customer out of a Marketing Preference

actionMarketingPreferenceOptOut

Opts the customer out of the given marketing preference.

Path parameters

  • customerIduuidrequired

    The unique identifier of the customer this operation is scoped to. Customer IDs are stable across renames and email changes; treat them as opaque strings even though the underlying format is a UUID.

  • marketingPreferenceIdstringrequired

    The unique identifier of the marketing preference this operation is scoped to.

Responses

  • 204

    The customer was opted out of the marketing preference

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found