> 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/edge-worker-i-ds/post-ids/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://akamai.ferndocs.com/_mcp/server. # Create a new EdgeWorker ID POST https://{hostname}/edgeworkers/v1/ids Content-Type: application/json Register a new EdgeWorker within a particular group. Reference: https://akamai.ferndocs.com/edge-workers/api/edge-workers-api/edge-worker-i-ds/post-ids ## Request ### 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. - `groupId` (integer, required) — Identifies a group to assign to the EdgeWorker. - `name` (string, required) — A name you assign to the EdgeWorker. - `resourceTierId` (integer, required) — Unique identifier of a resource tier. The resource tier is write-once data. To change the resource tier you need to [Clone an EdgeWorker ID](https://techdocs.akamai.com/edgeworkers/reference/post-id-clone). - `description` (string, optional) — Description of the EdgeWorker. ## Response ### 201 This section describes attributes of an EdgeWorker registration. - `groupId` (integer, required) — Group identified by the user who created the EdgeWorker. - `name` (string, required) — Name given by the user who created the EdgeWorker. - `resourceTierId` (integer, required) — Resource tier selected when the EdgeWorker was created. - `accountId` (string, optional) — Identifier for the account under which the EdgeWorker was created. - `createdBy` (string, optional) — Username of the person who created the EdgeWorker. - `createdTime` (datetime, optional) — ISO 8601 timestamp indicating when the EdgeWorker was created. - `description` (string, optional) — Description of the EdgeWorker. - `edgeWorkerId` (integer, optional) — Unique identifier of the EdgeWorker. - `lastModifiedBy` (string, optional) — Username of the person who most recently updated the EdgeWorker. - `lastModifiedTime` (datetime, optional) — ISO 8601 timestamp indicating when the EdgeWorker was most recently modified. ## Examples **Request** ```json { "groupId": 72297, "name": "Ew_42", "resourceTierId": 100, "description": "Geo-blocking EdgeWorker" } ``` **Response** ```json { "groupId": 72297, "name": "Ew_42", "resourceTierId": 200, "accountId": "A-CCT7890", "createdBy": "jsmith", "createdTime": "2020-10-15T14:49:40Z", "description": "Geo-blocking EdgeWorker", "edgeWorkerId": 42, "lastModifiedBy": "jsmith", "lastModifiedTime": "2020-10-15T15:21:15Z" } ``` **SDK Code** ```python import requests url = "https://{hostname}/edgeworkers/v1/ids" querystring = {"accountSwitchKey":"{{accountSwitchKey}}"} payload = { "groupId": 72297, "name": "Ew_42", "resourceTierId": 100, "description": "Geo-blocking EdgeWorker" } 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?accountSwitchKey=%7B%7BaccountSwitchKey%7D%7D'; const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"groupId":72297,"name":"Ew_42","resourceTierId":100,"description":"Geo-blocking EdgeWorker"}' }; 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?accountSwitchKey=%7B%7BaccountSwitchKey%7D%7D" payload := strings.NewReader("{\n \"groupId\": 72297,\n \"name\": \"Ew_42\",\n \"resourceTierId\": 100,\n \"description\": \"Geo-blocking EdgeWorker\"\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?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 \"groupId\": 72297,\n \"name\": \"Ew_42\",\n \"resourceTierId\": 100,\n \"description\": \"Geo-blocking EdgeWorker\"\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?accountSwitchKey=%7B%7BaccountSwitchKey%7D%7D") .header("Content-Type", "application/json") .body("{\n \"groupId\": 72297,\n \"name\": \"Ew_42\",\n \"resourceTierId\": 100,\n \"description\": \"Geo-blocking EdgeWorker\"\n}") .asString(); ``` ```php request('POST', 'https://{hostname}/edgeworkers/v1/ids?accountSwitchKey=%7B%7BaccountSwitchKey%7D%7D', [ 'body' => '{ "groupId": 72297, "name": "Ew_42", "resourceTierId": 100, "description": "Geo-blocking EdgeWorker" }', 'headers' => [ 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://{hostname}/edgeworkers/v1/ids?accountSwitchKey=%7B%7BaccountSwitchKey%7D%7D"); var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"groupId\": 72297,\n \"name\": \"Ew_42\",\n \"resourceTierId\": 100,\n \"description\": \"Geo-blocking EdgeWorker\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["Content-Type": "application/json"] let parameters = [ "groupId": 72297, "name": "Ew_42", "resourceTierId": 100, "description": "Geo-blocking EdgeWorker" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://{hostname}/edgeworkers/v1/ids?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() ```