Invalid dataId errors when creating segments using the CJA Segments API
Creating a segment using the Customer Journey Analytics Segments API fails when the request includes an invalid dataId. The API requires a valid data view ID to associate the new segment with an existing data view. When the dataId value is incorrect or inaccessible, the API returns an authorization error and the segment isn’t created.
To fix this issue, use the correct data view ID in the dataId parameter when sending the API request.
Description description
Environment
- Customer Journey Analytics
Issue/Symptoms
- Errors occur when sending a POST request to the CJA Segments API endpoint.
- The API returns an authorization error indicating that the user does not have access to the specified data view ID.
- Example error message: “errorCode”:“invalid_access”, “errorDescription”:“No access to this dataId…”
Resolution resolution
- Use the data view ID of an existing data view in the
dataIdparameter when creating a segment. Refer to Manage Data Views for more details. - The
dataIdvalue must match the data view where the segment should be created. Data view IDs always start withdv_followed by an alphanumeric value. - Update the request body with the correct data view ID and resend the POST request to the CJA Segments API endpoint.
Related reading
recommendation-more-help
3d58f420-19b5-47a0-a122-5c9dab55ec7f