Improved

Account ID is now optional: your API key sets the account

Your API key already identifies your account, so you no longer need to send an account ID.

  • accountId is now optional on POST /v1/segments, PUT /v1/segments/{segmentId}, GET /v1/segments, POST /v1/users and GET /v1/user-datasets. Leave it out and the account of your API key is used.
  • If you send an accountId that belongs to another account, the request now returns 403
  • A datasetId (or site) must be a dataset of your own account on segments, segment preferences, custom tracking domains, lead tags and lead assignment. Otherwise you get 403 You do not have access to the given datasetId.

See Do I need an account ID or dataset ID? for where to find your dataset IDs.