> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://akamai.ferndocs.com/edge-workers/api/edge-workers-api/revisions/post-revision-unpin/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://akamai.ferndocs.com/_mcp/server. # Unpin an active revision POST https://{hostname}/edgeworkers/v1/ids/{edgeWorkerId}/revisions/{revisionId}/unpin Content-Type: application/json __Beta__ Enable dynamic activation for an EdgeWorker revision on Akamai's staging or production network. To learn more about Flexible composition refer to the [EdgeWorkers guide](https://techdocs.akamai.com/edgeworkers/docs/flexible-composition). Reference: https://akamai.ferndocs.com/edge-workers/api/edge-workers-api/revisions/post-revision-unpin ## Request ### Path parameters - `edgeWorkerId` (string, required) - `revisionId` (string, required) ### Query parameters - `accountSwitchKey` (string, optional) — For customers who manage more than one account, this [runs the operation from another account](https://techdocs.akamai.com/developer/docs/manage-many-accounts-with-one-api-client). The Identity and Access Management API provides a [list of available account switch keys](https://techdocs.akamai.com/iam-api/reference/get-client-account-switch-keys). ### Body (application/json) This endpoint expects an object. - `unpinNote` (string, optional) — Note to specify why you're unpinning the revision. ## Response ### 200 Provides details for the unpinned EdgeWorker revision. - `accountId` (string, required) — Identifier for the account under which the EdgeWorker was created. - `activationId` (integer, required) — Unique identifier of the activation. - `createdTime` (datetime, required) — ISO 8601 timestamp indicating when the revision was created. - `edgeWorkerId` (integer, required) — Unique identifier of the EdgeWorker. - `lastModifiedTime` (datetime, required) — ISO 8601 timestamp indicating when the revision was most recently modified. - `network` (enum, required) — The network on which the revision is activated, either `PRODUCTION` or `STAGING`. - Allowed values: `STAGING`, `PRODUCTION` - `pinnedBy` (string, required) — Username of the person who pinned the revision. - `pinnedTime` (datetime, required) — ISO 8601 timestamp indicating when the revision was pinned. - `revisionActivationStatus` (enum, required) — The activation status of the EdgeWorker revision, either `PRESUBMIT`, `PENDING`, `IN_PROGRESS`, `COMPLETE`, `CANCELLED`, `ABORTED`, `ERROR`, `DELETED_BY_AKAMAI`, `EXPIRED`, or `INVALID_COMBINED_BUNDLE`. - Allowed values: `PRESUBMIT`, `PENDING`, `IN_PROGRESS`, `ABORTED`, `ERROR`, `COMPLETE`, `DELETED_BY_AKAMAI`, `EXPIRED`, `CANCELLED`, `INVALID_COMBINED_BUNDLE` - `revisionId` (string, required) — Unique identifier of the revision. - `unpinnedBy` (string, required) — Username of the person who unpinned the revision. - `unpinnedTime` (datetime, required) — ISO 8601 timestamp indicating when the revision was unpinned. - `version` (string, required) — Unique identifier of the version. - `note` (string, optional) — Note to explain why you're reactivating the revision. - `pinNote` (string, optional) — Note to explain why you're pinning the revision. - `revisionActivatedBy` (string, optional) — Username of the person who reactivated the revision. - `revisionActivatedTime` (datetime, optional) — ISO 8601 timestamp indicating when the revision was most recently reactivated. - `unpinNote` (string, optional) — Note to explain why you're unpinning the revision. ## Examples **Request** ```json { "unpinNote": "Unpin to re-enable dynamic activation" } ``` **Response** ```json { "accountId": "A-CCT5678", "activationId": 5, "createdTime": "2023-07-13T19:20:01Z", "edgeWorkerId": 42, "lastModifiedTime": "2023-08-14T17:20:09Z", "network": "STAGING", "pinnedBy": "jsmith", "pinnedTime": "2023-08-14T17:17:43Z", "revisionActivationStatus": "COMPLETE", "revisionId": "5-1", "unpinnedBy": "jsmith", "unpinnedTime": "2023-08-14T18:09:13Z", "version": "0.4", "pinNote": "Disable dynamic activation during moratorium", "revisionActivatedBy": "jsmith", "revisionActivatedTime": "2023-08-14T17:17:43Z", "unpinNote": "Unpin to re-enable dynamic activation" } ``` **SDK Code** ```python import requests url = "https://{hostname}/edgeworkers/v1/ids/edgeWorkerId/revisions/revisionId/unpin" querystring = {"accountSwitchKey":"{{accountSwitchKey}}"} payload = { "unpinNote": "Unpin to re-enable dynamic activation" } headers = {"Content-Type": "application/json"} response = requests.post(url, json=payload, headers=headers, params=querystring) print(response.json()) ``` ```javascript const url = 'https://{hostname}/edgeworkers/v1/ids/edgeWorkerId/revisions/revisionId/unpin?accountSwitchKey=%7B%7BaccountSwitchKey%7D%7D'; const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"unpinNote":"Unpin to re-enable dynamic activation"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://{hostname}/edgeworkers/v1/ids/edgeWorkerId/revisions/revisionId/unpin?accountSwitchKey=%7B%7BaccountSwitchKey%7D%7D" payload := strings.NewReader("{\n \"unpinNote\": \"Unpin to re-enable dynamic activation\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://{hostname}/edgeworkers/v1/ids/edgeWorkerId/revisions/revisionId/unpin?accountSwitchKey=%7B%7BaccountSwitchKey%7D%7D") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Content-Type"] = 'application/json' request.body = "{\n \"unpinNote\": \"Unpin to re-enable dynamic activation\"\n}" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://{hostname}/edgeworkers/v1/ids/edgeWorkerId/revisions/revisionId/unpin?accountSwitchKey=%7B%7BaccountSwitchKey%7D%7D") .header("Content-Type", "application/json") .body("{\n \"unpinNote\": \"Unpin to re-enable dynamic activation\"\n}") .asString(); ``` ```php request('POST', 'https://{hostname}/edgeworkers/v1/ids/edgeWorkerId/revisions/revisionId/unpin?accountSwitchKey=%7B%7BaccountSwitchKey%7D%7D', [ 'body' => '{ "unpinNote": "Unpin to re-enable dynamic activation" }', 'headers' => [ 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://{hostname}/edgeworkers/v1/ids/edgeWorkerId/revisions/revisionId/unpin?accountSwitchKey=%7B%7BaccountSwitchKey%7D%7D"); var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"unpinNote\": \"Unpin to re-enable dynamic activation\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["Content-Type": "application/json"] let parameters = ["unpinNote": "Unpin to re-enable dynamic activation"] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://{hostname}/edgeworkers/v1/ids/edgeWorkerId/revisions/revisionId/unpin?accountSwitchKey=%7B%7BaccountSwitchKey%7D%7D")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data 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() ```