> This page is for Data API, version v2 (default).
> For other versions, use one of these documentation indexes:
> - v2 (default): https://developers.webflow.com/data/v2.0.0/llms.txt
> - v2 Beta: https://developers.webflow.com/data/v2.0.0-beta/llms.txt
> - v1: https://developers.webflow.com/data/v1.0.0/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.webflow.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.webflow.com/_mcp/server.

# List Optimization Goals

GET https://api.webflow.com/v2/optimize/{optimize_id}/optimizations/{optimization_id}/goals

Lists an optimization's goals in two lists. `goals` holds the goals of the interval that contains the requested date range, as they were when it started, with its target goals marked. `currentGoals` holds the optimization's goals as they're set up now, with where each comes from. Use a `goalId` from either list to choose the goal a report measures.This endpoint requires a Webflow site with the Optimize add-on, or a non-Webflow site that uses Optimize.Each access token can have one Optimize request in flight at a time, across all Optimize endpoints. Additional concurrent requests return `429 Too Many Requests`. Wait for your in-flight request to finish, or for the `Retry-After` interval, then retry.Required scope | `sites:read`

Reference: https://developers.webflow.com/data/reference/optimize/list-optimization-goals

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `optimize_id` (string, required) — The Optimize ID, from [List Optimize IDs](/data/reference/optimize/list-optimize-ids).
- `optimization_id` (string, required) — The optimization ID, from [List Optimizations](/data/reference/optimize/list-optimizations).

### Query parameters

- `intervalStart` (string, required) — Start of the date range. Must be a UTC timestamp ending in `Z`, such as `2026-09-01T00:00:00Z`. Offsets and date-only values aren't accepted. Seconds and milliseconds are optional. The date range must fall within a single interval of the optimization. A range that crosses from one interval into the next is rejected. Use an interval's `start` and `end` from [List Optimizations](/data/reference/optimize/list-optimizations). Unlike the report endpoints, this endpoint has no 18-month limit.
- `intervalEnd` (string, required) — End of the date range. Must be a UTC timestamp ending in `Z`, such as `2026-09-15T00:00:00Z`, and later than `intervalStart`. Offsets and date-only values aren't accepted. Seconds and milliseconds are optional.

## Response

### 200

The optimization's goals for the interval that contains the requested date range.

- `intervalStart` (string, required) — Start of the reported date range, in full form with milliseconds.
- `intervalEnd` (string, required) — End of the reported date range, in full form with milliseconds.
- `goals` (list of OptimizeOptimizeIdOptimizationsOptimizationIdGoalsGetResponsesContentApplicationJsonSchemaGoalsItems, required) — The goals saved when the interval started. They include the interval's target goals and the goals created in the optimization by then.
- `currentGoals` (list of OptimizeOptimizeIdOptimizationsOptimizationIdGoalsGetResponsesContentApplicationJsonSchemaCurrentGoalsItems, required) — The optimization's goals as they're set up now, with where each comes from. The list is the same for every interval. A report accepts any `goalId` from this list.

## Errors

### 400 Bad Request Error

The request failed validation. The `code` field identifies the rule that failed: - `optimize_input_validation` — a parameter is invalid. `details[0].param` names the first failing field. - `optimize_invalid_interval` — `intervalEnd` isn't later than `intervalStart`, the optimization has never run, or the date range isn't within a single interval of the optimization.

- `code` (enum, optional) — Error code
  - Allowed values: `aeo_input_validation`, `analyze_filter_conflict`, `analyze_input_validation`, `analyze_unsupported_filter`, `bad_request`, `batch_too_large`, `before_historical_floor`, `billing_provider_unavailable`, `branch_merge_conflict`, `branch_merge_in_progress`, `branch_not_found`, `branch_publish_failed`, `branch_sync_pending`, `branch_task_not_found`, `branch_update_in_progress`, `brand_not_configured`, `cannot_invite_self`, `cannot_remove_self`, `cannot_update_user_role`, `client_seats_unavailable`, `collection_not_found`, `competitors_not_configured`, `conflict`, `conflicting_scope_filters`, `default_site_role_required`, `duplicate_collection`, `duplicate_member_in_request`, `duplicate_site_in_request`, `duplicate_user_email`, `ecommerce_not_enabled`, `end_time_too_recent`, `enterprise_provisioning_upstream_error`, `enterprise_self_provisioning_not_entitled`, `forbidden`, `forms_require_republish`, `incompatible_webhook_filter`, `insufficient_permissions`, `insufficient_seats`, `internal_error`, `invalid_auth_version`, `invalid_credentials`, `invalid_domain`, `invalid_resolution`, `invalid_site_role`, `invalid_time_range`, `invalid_user_email`, `invalid_workspace_role`, `invite_expired`, `invite_role_conflict`, `item_not_found`, `managed_by_scim`, `member_already_has_access`, `member_has_no_site_access`, `member_is_paying_client`, `member_not_found`, `member_not_removable`, `member_role_conflict`, `missing_scopes`, `no_domains`, `no_members_or_invites`, `not_authorized`, `not_enterprise_plan_site`, `not_enterprise_plan_workspace`, `optimize_before_historical_floor`, `optimize_input_validation`, `optimize_invalid_interval`, `optimize_unknown_dimension`, `optimize_unknown_goal`, `optimize_unknown_optimization`, `optimize_unsupported_group_by`, `order_not_found`, `page_cannot_branch`, `resource_not_found`, `service_unavailable`, `site_access_not_applicable_to_member`, `site_access_not_scopable_for_role`, `site_access_roles_must_match`, `site_not_in_workspace`, `site_role_id_invalid`, `site_role_id_not_allowed`, `site_role_id_required`, `site_specific_access_disabled`, `site_specific_access_not_entitled`, `time_range_too_wide`, `too_many_requests`, `unsupported_bot_provider`, `unsupported_version`, `unsupported_webhook_trigger_type`, `user_limit_reached`, `user_not_found`, `users_not_enabled`, `validation_error`, `workspace_invite_not_found`, `workspace_member_managed_by_scim`, `workspace_member_not_found`, `workspace_member_not_removable`, `workspace_role_not_grantable`
- `message` (string, optional) — Error message
- `externalReference` (string, optional) — Link to more information
- `details` (list of OptimizeOptimizeIdOptimizationsOptimizationIdGoalsGetResponsesContentApplicationJsonSchemaDetailsItems, optional) — Array of errors

### 401 Unauthorized Error

Provided access token is invalid or does not have access to requested resource

- `code` (enum, optional) — Error code
  - Allowed values: `aeo_input_validation`, `analyze_filter_conflict`, `analyze_input_validation`, `analyze_unsupported_filter`, `bad_request`, `batch_too_large`, `before_historical_floor`, `billing_provider_unavailable`, `branch_merge_conflict`, `branch_merge_in_progress`, `branch_not_found`, `branch_publish_failed`, `branch_sync_pending`, `branch_task_not_found`, `branch_update_in_progress`, `brand_not_configured`, `cannot_invite_self`, `cannot_remove_self`, `cannot_update_user_role`, `client_seats_unavailable`, `collection_not_found`, `competitors_not_configured`, `conflict`, `conflicting_scope_filters`, `default_site_role_required`, `duplicate_collection`, `duplicate_member_in_request`, `duplicate_site_in_request`, `duplicate_user_email`, `ecommerce_not_enabled`, `end_time_too_recent`, `enterprise_provisioning_upstream_error`, `enterprise_self_provisioning_not_entitled`, `forbidden`, `forms_require_republish`, `incompatible_webhook_filter`, `insufficient_permissions`, `insufficient_seats`, `internal_error`, `invalid_auth_version`, `invalid_credentials`, `invalid_domain`, `invalid_resolution`, `invalid_site_role`, `invalid_time_range`, `invalid_user_email`, `invalid_workspace_role`, `invite_expired`, `invite_role_conflict`, `item_not_found`, `managed_by_scim`, `member_already_has_access`, `member_has_no_site_access`, `member_is_paying_client`, `member_not_found`, `member_not_removable`, `member_role_conflict`, `missing_scopes`, `no_domains`, `no_members_or_invites`, `not_authorized`, `not_enterprise_plan_site`, `not_enterprise_plan_workspace`, `optimize_before_historical_floor`, `optimize_input_validation`, `optimize_invalid_interval`, `optimize_unknown_dimension`, `optimize_unknown_goal`, `optimize_unknown_optimization`, `optimize_unsupported_group_by`, `order_not_found`, `page_cannot_branch`, `resource_not_found`, `service_unavailable`, `site_access_not_applicable_to_member`, `site_access_not_scopable_for_role`, `site_access_roles_must_match`, `site_not_in_workspace`, `site_role_id_invalid`, `site_role_id_not_allowed`, `site_role_id_required`, `site_specific_access_disabled`, `site_specific_access_not_entitled`, `time_range_too_wide`, `too_many_requests`, `unsupported_bot_provider`, `unsupported_version`, `unsupported_webhook_trigger_type`, `user_limit_reached`, `user_not_found`, `users_not_enabled`, `validation_error`, `workspace_invite_not_found`, `workspace_member_managed_by_scim`, `workspace_member_not_found`, `workspace_member_not_removable`, `workspace_role_not_grantable`
- `message` (string, optional) — Error message
- `externalReference` (string, optional) — Link to more information
- `details` (list of OptimizeOptimizeIdOptimizationsOptimizationIdGoalsGetResponsesContentApplicationJsonSchemaDetailsItems, optional) — Array of errors

### 403 Forbidden Error

The access token is missing the `sites:read` scope (`missing_scopes`), or doesn't have sufficient user-level permissions (`insufficient_permissions`).

- `code` (enum, optional) — Error code
  - Allowed values: `aeo_input_validation`, `analyze_filter_conflict`, `analyze_input_validation`, `analyze_unsupported_filter`, `bad_request`, `batch_too_large`, `before_historical_floor`, `billing_provider_unavailable`, `branch_merge_conflict`, `branch_merge_in_progress`, `branch_not_found`, `branch_publish_failed`, `branch_sync_pending`, `branch_task_not_found`, `branch_update_in_progress`, `brand_not_configured`, `cannot_invite_self`, `cannot_remove_self`, `cannot_update_user_role`, `client_seats_unavailable`, `collection_not_found`, `competitors_not_configured`, `conflict`, `conflicting_scope_filters`, `default_site_role_required`, `duplicate_collection`, `duplicate_member_in_request`, `duplicate_site_in_request`, `duplicate_user_email`, `ecommerce_not_enabled`, `end_time_too_recent`, `enterprise_provisioning_upstream_error`, `enterprise_self_provisioning_not_entitled`, `forbidden`, `forms_require_republish`, `incompatible_webhook_filter`, `insufficient_permissions`, `insufficient_seats`, `internal_error`, `invalid_auth_version`, `invalid_credentials`, `invalid_domain`, `invalid_resolution`, `invalid_site_role`, `invalid_time_range`, `invalid_user_email`, `invalid_workspace_role`, `invite_expired`, `invite_role_conflict`, `item_not_found`, `managed_by_scim`, `member_already_has_access`, `member_has_no_site_access`, `member_is_paying_client`, `member_not_found`, `member_not_removable`, `member_role_conflict`, `missing_scopes`, `no_domains`, `no_members_or_invites`, `not_authorized`, `not_enterprise_plan_site`, `not_enterprise_plan_workspace`, `optimize_before_historical_floor`, `optimize_input_validation`, `optimize_invalid_interval`, `optimize_unknown_dimension`, `optimize_unknown_goal`, `optimize_unknown_optimization`, `optimize_unsupported_group_by`, `order_not_found`, `page_cannot_branch`, `resource_not_found`, `service_unavailable`, `site_access_not_applicable_to_member`, `site_access_not_scopable_for_role`, `site_access_roles_must_match`, `site_not_in_workspace`, `site_role_id_invalid`, `site_role_id_not_allowed`, `site_role_id_required`, `site_specific_access_disabled`, `site_specific_access_not_entitled`, `time_range_too_wide`, `too_many_requests`, `unsupported_bot_provider`, `unsupported_version`, `unsupported_webhook_trigger_type`, `user_limit_reached`, `user_not_found`, `users_not_enabled`, `validation_error`, `workspace_invite_not_found`, `workspace_member_managed_by_scim`, `workspace_member_not_found`, `workspace_member_not_removable`, `workspace_role_not_grantable`
- `message` (string, optional) — Error message
- `externalReference` (string, optional) — Link to more information
- `details` (list of OptimizeOptimizeIdOptimizationsOptimizationIdGoalsGetResponsesContentApplicationJsonSchemaDetailsItems, optional) — Array of errors

### 404 Not Found Error

The requested resource wasn't found (`resource_not_found`), or no optimization matches `optimization_id` (`optimize_unknown_optimization`).

- `code` (enum, optional) — Error code
  - Allowed values: `aeo_input_validation`, `analyze_filter_conflict`, `analyze_input_validation`, `analyze_unsupported_filter`, `bad_request`, `batch_too_large`, `before_historical_floor`, `billing_provider_unavailable`, `branch_merge_conflict`, `branch_merge_in_progress`, `branch_not_found`, `branch_publish_failed`, `branch_sync_pending`, `branch_task_not_found`, `branch_update_in_progress`, `brand_not_configured`, `cannot_invite_self`, `cannot_remove_self`, `cannot_update_user_role`, `client_seats_unavailable`, `collection_not_found`, `competitors_not_configured`, `conflict`, `conflicting_scope_filters`, `default_site_role_required`, `duplicate_collection`, `duplicate_member_in_request`, `duplicate_site_in_request`, `duplicate_user_email`, `ecommerce_not_enabled`, `end_time_too_recent`, `enterprise_provisioning_upstream_error`, `enterprise_self_provisioning_not_entitled`, `forbidden`, `forms_require_republish`, `incompatible_webhook_filter`, `insufficient_permissions`, `insufficient_seats`, `internal_error`, `invalid_auth_version`, `invalid_credentials`, `invalid_domain`, `invalid_resolution`, `invalid_site_role`, `invalid_time_range`, `invalid_user_email`, `invalid_workspace_role`, `invite_expired`, `invite_role_conflict`, `item_not_found`, `managed_by_scim`, `member_already_has_access`, `member_has_no_site_access`, `member_is_paying_client`, `member_not_found`, `member_not_removable`, `member_role_conflict`, `missing_scopes`, `no_domains`, `no_members_or_invites`, `not_authorized`, `not_enterprise_plan_site`, `not_enterprise_plan_workspace`, `optimize_before_historical_floor`, `optimize_input_validation`, `optimize_invalid_interval`, `optimize_unknown_dimension`, `optimize_unknown_goal`, `optimize_unknown_optimization`, `optimize_unsupported_group_by`, `order_not_found`, `page_cannot_branch`, `resource_not_found`, `service_unavailable`, `site_access_not_applicable_to_member`, `site_access_not_scopable_for_role`, `site_access_roles_must_match`, `site_not_in_workspace`, `site_role_id_invalid`, `site_role_id_not_allowed`, `site_role_id_required`, `site_specific_access_disabled`, `site_specific_access_not_entitled`, `time_range_too_wide`, `too_many_requests`, `unsupported_bot_provider`, `unsupported_version`, `unsupported_webhook_trigger_type`, `user_limit_reached`, `user_not_found`, `users_not_enabled`, `validation_error`, `workspace_invite_not_found`, `workspace_member_managed_by_scim`, `workspace_member_not_found`, `workspace_member_not_removable`, `workspace_role_not_grantable`
- `message` (string, optional) — Error message
- `externalReference` (string, optional) — Link to more information
- `details` (list of OptimizeOptimizeIdOptimizationsOptimizationIdGoalsGetResponsesContentApplicationJsonSchemaDetailsItems, optional) — Array of errors

### 409 Conflict Error

The `optimize_id` matches more than one resource the access token can access.

- `code` (enum, optional) — Error code
  - Allowed values: `aeo_input_validation`, `analyze_filter_conflict`, `analyze_input_validation`, `analyze_unsupported_filter`, `bad_request`, `batch_too_large`, `before_historical_floor`, `billing_provider_unavailable`, `branch_merge_conflict`, `branch_merge_in_progress`, `branch_not_found`, `branch_publish_failed`, `branch_sync_pending`, `branch_task_not_found`, `branch_update_in_progress`, `brand_not_configured`, `cannot_invite_self`, `cannot_remove_self`, `cannot_update_user_role`, `client_seats_unavailable`, `collection_not_found`, `competitors_not_configured`, `conflict`, `conflicting_scope_filters`, `default_site_role_required`, `duplicate_collection`, `duplicate_member_in_request`, `duplicate_site_in_request`, `duplicate_user_email`, `ecommerce_not_enabled`, `end_time_too_recent`, `enterprise_provisioning_upstream_error`, `enterprise_self_provisioning_not_entitled`, `forbidden`, `forms_require_republish`, `incompatible_webhook_filter`, `insufficient_permissions`, `insufficient_seats`, `internal_error`, `invalid_auth_version`, `invalid_credentials`, `invalid_domain`, `invalid_resolution`, `invalid_site_role`, `invalid_time_range`, `invalid_user_email`, `invalid_workspace_role`, `invite_expired`, `invite_role_conflict`, `item_not_found`, `managed_by_scim`, `member_already_has_access`, `member_has_no_site_access`, `member_is_paying_client`, `member_not_found`, `member_not_removable`, `member_role_conflict`, `missing_scopes`, `no_domains`, `no_members_or_invites`, `not_authorized`, `not_enterprise_plan_site`, `not_enterprise_plan_workspace`, `optimize_before_historical_floor`, `optimize_input_validation`, `optimize_invalid_interval`, `optimize_unknown_dimension`, `optimize_unknown_goal`, `optimize_unknown_optimization`, `optimize_unsupported_group_by`, `order_not_found`, `page_cannot_branch`, `resource_not_found`, `service_unavailable`, `site_access_not_applicable_to_member`, `site_access_not_scopable_for_role`, `site_access_roles_must_match`, `site_not_in_workspace`, `site_role_id_invalid`, `site_role_id_not_allowed`, `site_role_id_required`, `site_specific_access_disabled`, `site_specific_access_not_entitled`, `time_range_too_wide`, `too_many_requests`, `unsupported_bot_provider`, `unsupported_version`, `unsupported_webhook_trigger_type`, `user_limit_reached`, `user_not_found`, `users_not_enabled`, `validation_error`, `workspace_invite_not_found`, `workspace_member_managed_by_scim`, `workspace_member_not_found`, `workspace_member_not_removable`, `workspace_role_not_grantable`
- `message` (string, optional) — Error message
- `externalReference` (string, optional) — Link to more information
- `details` (list of OptimizeOptimizeIdOptimizationsOptimizationIdGoalsGetResponsesContentApplicationJsonSchemaDetailsItems, optional) — Array of errors

### 429 Too Many Requests Error

The rate limit of the provided access_token has been reached. Please have your application respect the X-RateLimit-Remaining header we include on API responses.

- `code` (enum, optional) — Error code
  - Allowed values: `aeo_input_validation`, `analyze_filter_conflict`, `analyze_input_validation`, `analyze_unsupported_filter`, `bad_request`, `batch_too_large`, `before_historical_floor`, `billing_provider_unavailable`, `branch_merge_conflict`, `branch_merge_in_progress`, `branch_not_found`, `branch_publish_failed`, `branch_sync_pending`, `branch_task_not_found`, `branch_update_in_progress`, `brand_not_configured`, `cannot_invite_self`, `cannot_remove_self`, `cannot_update_user_role`, `client_seats_unavailable`, `collection_not_found`, `competitors_not_configured`, `conflict`, `conflicting_scope_filters`, `default_site_role_required`, `duplicate_collection`, `duplicate_member_in_request`, `duplicate_site_in_request`, `duplicate_user_email`, `ecommerce_not_enabled`, `end_time_too_recent`, `enterprise_provisioning_upstream_error`, `enterprise_self_provisioning_not_entitled`, `forbidden`, `forms_require_republish`, `incompatible_webhook_filter`, `insufficient_permissions`, `insufficient_seats`, `internal_error`, `invalid_auth_version`, `invalid_credentials`, `invalid_domain`, `invalid_resolution`, `invalid_site_role`, `invalid_time_range`, `invalid_user_email`, `invalid_workspace_role`, `invite_expired`, `invite_role_conflict`, `item_not_found`, `managed_by_scim`, `member_already_has_access`, `member_has_no_site_access`, `member_is_paying_client`, `member_not_found`, `member_not_removable`, `member_role_conflict`, `missing_scopes`, `no_domains`, `no_members_or_invites`, `not_authorized`, `not_enterprise_plan_site`, `not_enterprise_plan_workspace`, `optimize_before_historical_floor`, `optimize_input_validation`, `optimize_invalid_interval`, `optimize_unknown_dimension`, `optimize_unknown_goal`, `optimize_unknown_optimization`, `optimize_unsupported_group_by`, `order_not_found`, `page_cannot_branch`, `resource_not_found`, `service_unavailable`, `site_access_not_applicable_to_member`, `site_access_not_scopable_for_role`, `site_access_roles_must_match`, `site_not_in_workspace`, `site_role_id_invalid`, `site_role_id_not_allowed`, `site_role_id_required`, `site_specific_access_disabled`, `site_specific_access_not_entitled`, `time_range_too_wide`, `too_many_requests`, `unsupported_bot_provider`, `unsupported_version`, `unsupported_webhook_trigger_type`, `user_limit_reached`, `user_not_found`, `users_not_enabled`, `validation_error`, `workspace_invite_not_found`, `workspace_member_managed_by_scim`, `workspace_member_not_found`, `workspace_member_not_removable`, `workspace_role_not_grantable`
- `message` (string, optional) — Error message
- `externalReference` (string, optional) — Link to more information
- `details` (list of OptimizeOptimizeIdOptimizationsOptimizationIdGoalsGetResponsesContentApplicationJsonSchemaDetailsItems, optional) — Array of errors

### 500 Internal Server Error

We had a problem with our server. Try again later.

- `code` (enum, optional) — Error code
  - Allowed values: `aeo_input_validation`, `analyze_filter_conflict`, `analyze_input_validation`, `analyze_unsupported_filter`, `bad_request`, `batch_too_large`, `before_historical_floor`, `billing_provider_unavailable`, `branch_merge_conflict`, `branch_merge_in_progress`, `branch_not_found`, `branch_publish_failed`, `branch_sync_pending`, `branch_task_not_found`, `branch_update_in_progress`, `brand_not_configured`, `cannot_invite_self`, `cannot_remove_self`, `cannot_update_user_role`, `client_seats_unavailable`, `collection_not_found`, `competitors_not_configured`, `conflict`, `conflicting_scope_filters`, `default_site_role_required`, `duplicate_collection`, `duplicate_member_in_request`, `duplicate_site_in_request`, `duplicate_user_email`, `ecommerce_not_enabled`, `end_time_too_recent`, `enterprise_provisioning_upstream_error`, `enterprise_self_provisioning_not_entitled`, `forbidden`, `forms_require_republish`, `incompatible_webhook_filter`, `insufficient_permissions`, `insufficient_seats`, `internal_error`, `invalid_auth_version`, `invalid_credentials`, `invalid_domain`, `invalid_resolution`, `invalid_site_role`, `invalid_time_range`, `invalid_user_email`, `invalid_workspace_role`, `invite_expired`, `invite_role_conflict`, `item_not_found`, `managed_by_scim`, `member_already_has_access`, `member_has_no_site_access`, `member_is_paying_client`, `member_not_found`, `member_not_removable`, `member_role_conflict`, `missing_scopes`, `no_domains`, `no_members_or_invites`, `not_authorized`, `not_enterprise_plan_site`, `not_enterprise_plan_workspace`, `optimize_before_historical_floor`, `optimize_input_validation`, `optimize_invalid_interval`, `optimize_unknown_dimension`, `optimize_unknown_goal`, `optimize_unknown_optimization`, `optimize_unsupported_group_by`, `order_not_found`, `page_cannot_branch`, `resource_not_found`, `service_unavailable`, `site_access_not_applicable_to_member`, `site_access_not_scopable_for_role`, `site_access_roles_must_match`, `site_not_in_workspace`, `site_role_id_invalid`, `site_role_id_not_allowed`, `site_role_id_required`, `site_specific_access_disabled`, `site_specific_access_not_entitled`, `time_range_too_wide`, `too_many_requests`, `unsupported_bot_provider`, `unsupported_version`, `unsupported_webhook_trigger_type`, `user_limit_reached`, `user_not_found`, `users_not_enabled`, `validation_error`, `workspace_invite_not_found`, `workspace_member_managed_by_scim`, `workspace_member_not_found`, `workspace_member_not_removable`, `workspace_role_not_grantable`
- `message` (string, optional) — Error message
- `externalReference` (string, optional) — Link to more information
- `details` (list of OptimizeOptimizeIdOptimizationsOptimizationIdGoalsGetResponsesContentApplicationJsonSchemaDetailsItems, optional) — Array of errors

## Types

### OptimizeOptimizeIdOptimizationsOptimizationIdGoalsGetResponsesContentApplicationJsonSchemaGoalsItems

A goal. Results are measured against goals. If a visitor takes the action defined in a goal, that counts as a conversion.

- `goalId` (string, required) — The goal ID. Pass it as `goalId` to choose the goal a report measures.
- `name` (string, required) — The goal's name.
- `isPrimary` (boolean, required) — `true` for a target goal, a goal Optimize uses to measure success. An interval usually has one target goal, but it can have several or none. Other goals are used only for reporting.
- `metricType` (enum, required) — What the goal measures. - `conversion`: A goal without a monetary value. Results show its conversions. - `value`: A goal with a monetary value. Results also show the value tied to each conversion.
  - Allowed values: `conversion`, `value`
- `scope` (enum, required) — The unit the goal counts conversions in. - `pageview`: A page view is recorded any time a visitor loads a site page. - `user`: A unique visitor who browses your site and sees your variation. A visitor who browses multiple times counts as one user. - `session`: A period of continuous activity by a unique visitor. If the visitor returns after 30 minutes or more of inactivity, a new session begins.
  - Allowed values: `pageview`, `user`, `session`
- `countingMethod` (enum, required) — How many conversions the goal counts. - `unique`: One conversion is counted per session or user, depending on the goal's `scope`. - `cumulative`: All conversions are counted per session or user, depending on the goal's `scope`.
  - Allowed values: `unique`, `cumulative`

### OptimizeOptimizeIdOptimizationsOptimizationIdGoalsGetResponsesContentApplicationJsonSchemaCurrentGoalsItems

A goal as it's set up on the optimization now. It has no `isPrimary`, because target goals are set per interval.

- `goalId` (string, required) — The goal ID. Pass it as `goalId` to choose the goal a report measures, in any interval.
- `name` (string, required) — The goal's name.
- `metricType` (enum, required) — What the goal measures. - `conversion`: A goal without a monetary value. Results show its conversions. - `value`: A goal with a monetary value. Results also show the value tied to each conversion.
  - Allowed values: `conversion`, `value`
- `scope` (enum, required) — The unit the goal counts conversions in. - `pageview`: A page view is recorded any time a visitor loads a site page. - `user`: A unique visitor who browses your site and sees your variation. A visitor who browses multiple times counts as one user. - `session`: A period of continuous activity by a unique visitor. If the visitor returns after 30 minutes or more of inactivity, a new session begins.
  - Allowed values: `pageview`, `user`, `session`
- `countingMethod` (enum, required) — How many conversions the goal counts. - `unique`: One conversion is counted per session or user, depending on the goal's `scope`. - `cumulative`: All conversions are counted per session or user, depending on the goal's `scope`.
  - Allowed values: `unique`, `cumulative`
- `source` (enum, required) — Where the goal comes from. - `site`: A site goal. Site goals apply to every optimization on the site, so each optimization has them without anyone adding them. - `existing`: A goal created outside this optimization that was added to it or chosen as a target goal. It isn't a site goal, and other optimizations can use it too. - `optimization`: A goal created in this optimization, such as the AutoGoal that Optimize creates with each optimization. Only this optimization has it.
  - Allowed values: `site`, `existing`, `optimization`

### OptimizeOptimizeIdOptimizationsOptimizationIdGoalsGetResponsesContentApplicationJsonSchemaDetailsItems

## Examples

**Response**

```json
{
  "intervalStart": "2026-09-01T00:00:00.000Z",
  "intervalEnd": "2026-09-15T00:00:00.000Z",
  "goals": [
    {
      "goalId": "198042421",
      "name": "Towel purchase",
      "isPrimary": true,
      "metricType": "value",
      "scope": "session",
      "countingMethod": "unique"
    },
    {
      "goalId": "198042422",
      "name": "Newsletter signup",
      "isPrimary": false,
      "metricType": "conversion",
      "scope": "user",
      "countingMethod": "unique"
    },
    {
      "goalId": "198042423",
      "name": "Guide entries read",
      "isPrimary": false,
      "metricType": "conversion",
      "scope": "pageview",
      "countingMethod": "cumulative"
    }
  ],
  "currentGoals": [
    {
      "goalId": "198042421",
      "name": "Towel purchase",
      "metricType": "value",
      "scope": "session",
      "countingMethod": "unique",
      "source": "site"
    },
    {
      "goalId": "198042425",
      "name": "Book club signup",
      "metricType": "conversion",
      "scope": "user",
      "countingMethod": "unique",
      "source": "existing"
    },
    {
      "goalId": "198042422",
      "name": "Newsletter signup",
      "metricType": "conversion",
      "scope": "user",
      "countingMethod": "unique",
      "source": "optimization"
    },
    {
      "goalId": "198042423",
      "name": "Guide entries read",
      "metricType": "conversion",
      "scope": "pageview",
      "countingMethod": "cumulative",
      "source": "optimization"
    }
  ]
}
```

**SDK Code**

```python Goals
import requests

url = "https://api.webflow.com/v2/optimize/117420042/optimizations/417200971/goals"

querystring = {"intervalStart":"2026-09-01T00:00:00Z","intervalEnd":"2026-09-15T00:00:00Z"}

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript Goals
const url = 'https://api.webflow.com/v2/optimize/117420042/optimizations/417200971/goals?intervalStart=2026-09-01T00%3A00%3A00Z&intervalEnd=2026-09-15T00%3A00%3A00Z';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Goals
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.webflow.com/v2/optimize/117420042/optimizations/417200971/goals?intervalStart=2026-09-01T00%3A00%3A00Z&intervalEnd=2026-09-15T00%3A00%3A00Z"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Goals
require 'uri'
require 'net/http'

url = URI("https://api.webflow.com/v2/optimize/117420042/optimizations/417200971/goals?intervalStart=2026-09-01T00%3A00%3A00Z&intervalEnd=2026-09-15T00%3A00%3A00Z")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java Goals
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.webflow.com/v2/optimize/117420042/optimizations/417200971/goals?intervalStart=2026-09-01T00%3A00%3A00Z&intervalEnd=2026-09-15T00%3A00%3A00Z")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Goals
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.webflow.com/v2/optimize/117420042/optimizations/417200971/goals?intervalStart=2026-09-01T00%3A00%3A00Z&intervalEnd=2026-09-15T00%3A00%3A00Z', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp Goals
using RestSharp;

var client = new RestClient("https://api.webflow.com/v2/optimize/117420042/optimizations/417200971/goals?intervalStart=2026-09-01T00%3A00%3A00Z&intervalEnd=2026-09-15T00%3A00%3A00Z");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Goals
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.webflow.com/v2/optimize/117420042/optimizations/417200971/goals?intervalStart=2026-09-01T00%3A00%3A00Z&intervalEnd=2026-09-15T00%3A00%3A00Z")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```