Search + K

Command Palette

Search for a command to run...

Sign In

Delete Custom Code

DELETE /pages/{page_id}/custom_code
Copy endpoint
https://api.webflow.com/v2

Remove all scripts from a page applied by the App. This endpoint will not remove scripts from the site's registered scripts.

To remove individual scripts applied by the App, use the Add/Update Custom Code endpoint.

Access to this endpoint requires a bearer token obtained from an OAuth Code Grant Flow.

Required scope | custom_code:write

Parameters

path Path Parameters

Name Type
page_id required

Unique identifier for a Page

string

Responses

204

Request was successful. No Content is returned.

unknown

Client Errors

400 application/json

Request body was incorrectly formatted.

{
code?: "bad_request" | "collection_not_found" | "conflict" | "duplicate_collection" | "duplicate_user_email" | "ecommerce_not_enabled" | "forbidden" | "forms_require_republish" | "incompatible_webhook_filter" | "internal_error" | "invalid_auth_version" | "invalid_credentials" | "invalid_domain" | "invalid_user_email" | "item_not_found" | "missing_scopes" | "no_domains" | "not_authorized" | "not_enterprise_plan_site" | "not_enterprise_plan_workspace" | "order_not_found" | "resource_not_found" | "too_many_requests" | "unsupported_version" | "unsupported_webhook_trigger_type" | "user_limit_reached" | "user_not_found" | "users_not_enabled" | "validation_error";
message?: string;
externalReference?: string;
details?: unknown[];
}
401 application/json

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

{
code?: "bad_request" | "collection_not_found" | "conflict" | "duplicate_collection" | "duplicate_user_email" | "ecommerce_not_enabled" | "forbidden" | "forms_require_republish" | "incompatible_webhook_filter" | "internal_error" | "invalid_auth_version" | "invalid_credentials" | "invalid_domain" | "invalid_user_email" | "item_not_found" | "missing_scopes" | "no_domains" | "not_authorized" | "not_enterprise_plan_site" | "not_enterprise_plan_workspace" | "order_not_found" | "resource_not_found" | "too_many_requests" | "unsupported_version" | "unsupported_webhook_trigger_type" | "user_limit_reached" | "user_not_found" | "users_not_enabled" | "validation_error";
message?: string;
externalReference?: string;
details?: unknown[];
}
404 application/json

Requested resource not found

{
code?: "bad_request" | "collection_not_found" | "conflict" | "duplicate_collection" | "duplicate_user_email" | "ecommerce_not_enabled" | "forbidden" | "forms_require_republish" | "incompatible_webhook_filter" | "internal_error" | "invalid_auth_version" | "invalid_credentials" | "invalid_domain" | "invalid_user_email" | "item_not_found" | "missing_scopes" | "no_domains" | "not_authorized" | "not_enterprise_plan_site" | "not_enterprise_plan_workspace" | "order_not_found" | "resource_not_found" | "too_many_requests" | "unsupported_version" | "unsupported_webhook_trigger_type" | "user_limit_reached" | "user_not_found" | "users_not_enabled" | "validation_error";
message?: string;
externalReference?: string;
details?: unknown[];
}
429 application/json

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?: "bad_request" | "collection_not_found" | "conflict" | "duplicate_collection" | "duplicate_user_email" | "ecommerce_not_enabled" | "forbidden" | "forms_require_republish" | "incompatible_webhook_filter" | "internal_error" | "invalid_auth_version" | "invalid_credentials" | "invalid_domain" | "invalid_user_email" | "item_not_found" | "missing_scopes" | "no_domains" | "not_authorized" | "not_enterprise_plan_site" | "not_enterprise_plan_workspace" | "order_not_found" | "resource_not_found" | "too_many_requests" | "unsupported_version" | "unsupported_webhook_trigger_type" | "user_limit_reached" | "user_not_found" | "users_not_enabled" | "validation_error";
message?: string;
externalReference?: string;
details?: unknown[];
}

Server Errors

500 application/json

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

{
code?: "bad_request" | "collection_not_found" | "conflict" | "duplicate_collection" | "duplicate_user_email" | "ecommerce_not_enabled" | "forbidden" | "forms_require_republish" | "incompatible_webhook_filter" | "internal_error" | "invalid_auth_version" | "invalid_credentials" | "invalid_domain" | "invalid_user_email" | "item_not_found" | "missing_scopes" | "no_domains" | "not_authorized" | "not_enterprise_plan_site" | "not_enterprise_plan_workspace" | "order_not_found" | "resource_not_found" | "too_many_requests" | "unsupported_version" | "unsupported_webhook_trigger_type" | "user_limit_reached" | "user_not_found" | "users_not_enabled" | "validation_error";
message?: string;
externalReference?: string;
details?: unknown[];
}