---
updatedAt: 2026-03-01T18:46:50.000Z
agentTools:
  siteIndex: https://techdocs.akamai.com/llms.txt
  projectIndex: https://techdocs.akamai.com/key-traffic-mgmt/llms.txt
---

# Move keys

"Moves keys from one collection to another, either an existing one or a new one. If you specify a `destinationCollectionId`
in the request, the operation moves the keys to the existing collection. \n"

# OpenAPI definition

```json
{
  "externalDocs": {
    "description": "See documentation for Akamai's API Keys and Traffic Management API",
    "url": "https://techdocs.akamai.com/key-traffic-mgmt/reference"
  },
  "info": {
    "license": {
      "name": "Apache 2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0.html"
    },
    "title": "Keys",
    "version": "2"
  },
  "openapi": "3.0.0",
  "paths": {
    "/keys/move": {
      "post": {
        "description": "\"Moves keys from one collection to another, either an existing one or a new one. If you specify a `destinationCollectionId`\nin the request, the operation moves the keys to the existing collection. \\n\"",
        "externalDocs": {
          "description": "See documentation for this operation in Akamai's API Keys and Traffic Management API",
          "url": "https://techdocs.akamai.com/key-traffic-mgmt/reference/post-keys-move"
        },
        "operationId": "post-keys-move",
        "parameters": [
          {
            "description": "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).",
            "in": "query",
            "name": "accountSwitchKey",
            "required": false,
            "schema": {
              "example": "1-5C0YLB:1-8BYUX",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "keyIds": [
                  6897346
                ],
                "newCollectionContractId": "C-0N7RAC7",
                "newCollectionGroupId": 1234567,
                "newCollectionName": "New collection"
              },
              "schema": {
                "oneOf": [
                  {
                    "additionalProperties": false,
                    "description": "Specifies keys to move from one collection to another.",
                    "properties": {
                      "destinationCollectionId": {
                        "description": "Identifies the existing destination collection. Run the [List key collections](https://techdocs.akamai.com/key-traffic-mgmt/reference/get-collections) operation to select one.",
                        "format": "int64",
                        "minimum": 0,
                        "type": "integer"
                      },
                      "keyIds": {
                        "description": "Identifies the keys to move. Run the [List keys](https://techdocs.akamai.com/key-traffic-mgmt/reference/get-keys) operation to get them.",
                        "items": {
                          "format": "int64",
                          "minimum": 0,
                          "type": "integer"
                        },
                        "minItems": 1,
                        "type": "array"
                      }
                    },
                    "required": [
                      "keyIds",
                      "destinationCollectionId"
                    ],
                    "title": "Move to the existing collection",
                    "type": "object"
                  },
                  {
                    "additionalProperties": false,
                    "description": "Specifies keys to move from one collection to another.",
                    "properties": {
                      "keyIds": {
                        "description": "Identifies the keys to move. Run the [List keys](https://techdocs.akamai.com/key-traffic-mgmt/reference/get-keys) operation to get them.",
                        "items": {
                          "format": "int64",
                          "minimum": 0,
                          "type": "integer"
                        },
                        "minItems": 1,
                        "type": "array"
                      },
                      "newCollectionContractId": {
                        "description": "Identifies the contract you assign to the new collection. To get this value, run the [List contracts](https://techdocs.akamai.com/contract-api/reference/get-contract-ids) operation in Contract API.",
                        "minLength": 1,
                        "type": "string"
                      },
                      "newCollectionDescription": {
                        "description": "Description for the new destination collection. Appears as `null` in responses until you specify it.",
                        "maxLength": 4000,
                        "minLength": 0,
                        "nullable": true,
                        "type": "string"
                      },
                      "newCollectionGroupId": {
                        "description": "Identifies the group where to place the new collection. To get this value, run the [List contracts](https://techdocs.akamai.com/contract-api/reference/get-contract-ids) operation in Contract API.",
                        "format": "int64",
                        "minimum": 0,
                        "type": "integer"
                      },
                      "newCollectionName": {
                        "description": "Name you assign to the new destination collection.",
                        "maxLength": 200,
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "keyIds",
                      "newCollectionName",
                      "newCollectionContractId",
                      "newCollectionGroupId"
                    ],
                    "title": "Move to a new collection",
                    "type": "object"
                  }
                ],
                "x-akamai": {
                  "file-path": "schemas/keys-move.yaml"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "destinationCollectionId": 51235,
                  "movedKeyIds": [
                    6897346
                  ]
                },
                "schema": {
                  "additionalProperties": false,
                  "description": "Specifies moved keys from one collection to another.",
                  "properties": {
                    "destinationCollectionId": {
                      "description": "Identifies the existing destination collection.",
                      "format": "int64",
                      "minimum": 0,
                      "type": "integer"
                    },
                    "movedKeyIds": {
                      "description": "Identifies the moved keys.",
                      "items": {
                        "format": "int64",
                        "minimum": 0,
                        "type": "integer"
                      },
                      "minItems": 1,
                      "type": "array"
                    }
                  },
                  "required": [
                    "movedKeyIds",
                    "destinationCollectionId"
                  ],
                  "type": "object",
                  "x-akamai": {
                    "file-path": "schemas/keys-move-summary.yaml"
                  }
                }
              }
            },
            "description": "The response reflects the set of API keys you moved."
          },
          "400": {
            "content": {
              "application/problem+json": {
                "example": {
                  "detail": "The request you submitted is invalid. Modify the request and try again.",
                  "errors": [
                    {
                      "detail": "The 'groupId' field must contain a not-null value.",
                      "title": "Null field",
                      "type": "/apikey-manager-api/error-types/not-null"
                    }
                  ],
                  "instance": "2c3a7d43-cd2f-4ac0-8d44-7cea20203513",
                  "status": 400,
                  "title": "Validation error",
                  "type": "/apikey-manager-api/error-types/validation-error"
                },
                "schema": {
                  "additionalProperties": true,
                  "description": "Represents error data in the [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) Problem Details format.",
                  "properties": {
                    "detail": {
                      "description": "Detailed error message.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "errors": {
                      "description": "Further nested problem objects.",
                      "items": {
                        "additionalProperties": true,
                        "description": "Represents error data in the [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) Problem Details format.",
                        "properties": {
                          "detail": {
                            "description": "Diagnostic instructions to locate and fix the problem.",
                            "minLength": 1,
                            "type": "string"
                          },
                          "instance": {
                            "description": "Unique value generated with each API call.",
                            "minLength": 1,
                            "type": "string"
                          },
                          "status": {
                            "description": "HTTP status code that categorizes this error case.",
                            "maximum": 600,
                            "minimum": 100,
                            "type": "integer"
                          },
                          "title": {
                            "description": "Summary of each error case.",
                            "minLength": 1,
                            "type": "string"
                          },
                          "type": {
                            "description": "Identifies each error case.",
                            "format": "uri",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "title",
                          "detail"
                        ],
                        "type": "object",
                        "x-akamai": {
                          "file-path": "schemas/problem-nested.yaml"
                        }
                      },
                      "minItems": 0,
                      "type": "array",
                      "uniqueItems": true
                    },
                    "instance": {
                      "description": "Non-referenceable URI indicating an error instance.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "status": {
                      "description": "HTTP status code of the error response.",
                      "maximum": 600,
                      "minimum": 100,
                      "type": "integer"
                    },
                    "title": {
                      "description": "Title of the error response.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "type": {
                      "description": "URL for the error type description.",
                      "format": "uri",
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "detail",
                    "instance"
                  ],
                  "type": "object",
                  "x-akamai": {
                    "file-path": "schemas/problem.yaml"
                  }
                }
              }
            },
            "description": "[Bad request](https://techdocs.akamai.com/key-traffic-mgmt/reference/400). The request contains invalid data.",
            "x-akamai": {
              "file-path": "errors/400.yaml"
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "example": {
                  "detail": "You are not authorized to perform this action. Try logging in again.",
                  "instance": "5ca8ba84-1319-4399-b106-f34812ed9c57",
                  "status": 401,
                  "title": "Unauthorized",
                  "type": "/apikey-manager-api/error-types/unauthorized"
                },
                "schema": {
                  "additionalProperties": true,
                  "description": "Represents error data in the [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) Problem Details format.",
                  "properties": {
                    "detail": {
                      "description": "Detailed error message.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "errors": {
                      "description": "Further nested problem objects.",
                      "items": {
                        "additionalProperties": true,
                        "description": "Represents error data in the [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) Problem Details format.",
                        "properties": {
                          "detail": {
                            "description": "Diagnostic instructions to locate and fix the problem.",
                            "minLength": 1,
                            "type": "string"
                          },
                          "instance": {
                            "description": "Unique value generated with each API call.",
                            "minLength": 1,
                            "type": "string"
                          },
                          "status": {
                            "description": "HTTP status code that categorizes this error case.",
                            "maximum": 600,
                            "minimum": 100,
                            "type": "integer"
                          },
                          "title": {
                            "description": "Summary of each error case.",
                            "minLength": 1,
                            "type": "string"
                          },
                          "type": {
                            "description": "Identifies each error case.",
                            "format": "uri",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "title",
                          "detail"
                        ],
                        "type": "object",
                        "x-akamai": {
                          "file-path": "schemas/problem-nested.yaml"
                        }
                      },
                      "minItems": 0,
                      "type": "array",
                      "uniqueItems": true
                    },
                    "instance": {
                      "description": "Non-referenceable URI indicating an error instance.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "status": {
                      "description": "HTTP status code of the error response.",
                      "maximum": 600,
                      "minimum": 100,
                      "type": "integer"
                    },
                    "title": {
                      "description": "Title of the error response.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "type": {
                      "description": "URL for the error type description.",
                      "format": "uri",
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "detail",
                    "instance"
                  ],
                  "type": "object",
                  "x-akamai": {
                    "file-path": "schemas/problem.yaml"
                  }
                }
              }
            },
            "description": "[Unauthorized](https://techdocs.akamai.com/key-traffic-mgmt/reference/401). You are not authorized to perform the action.",
            "x-akamai": {
              "file-path": "errors/401.yaml"
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "example": {
                  "detail": "You have insufficient permissions to perform this action. Ensure that you have the correct permissions...",
                  "instance": "c656aade-8352-407c-9d8c-49a38b942e64",
                  "status": 403,
                  "title": "Forbidden",
                  "type": "/apikey-manager-api/error-types/forbidden"
                },
                "schema": {
                  "additionalProperties": true,
                  "description": "Represents error data in the [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) Problem Details format.",
                  "properties": {
                    "detail": {
                      "description": "Detailed error message.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "errors": {
                      "description": "Further nested problem objects.",
                      "items": {
                        "additionalProperties": true,
                        "description": "Represents error data in the [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) Problem Details format.",
                        "properties": {
                          "detail": {
                            "description": "Diagnostic instructions to locate and fix the problem.",
                            "minLength": 1,
                            "type": "string"
                          },
                          "instance": {
                            "description": "Unique value generated with each API call.",
                            "minLength": 1,
                            "type": "string"
                          },
                          "status": {
                            "description": "HTTP status code that categorizes this error case.",
                            "maximum": 600,
                            "minimum": 100,
                            "type": "integer"
                          },
                          "title": {
                            "description": "Summary of each error case.",
                            "minLength": 1,
                            "type": "string"
                          },
                          "type": {
                            "description": "Identifies each error case.",
                            "format": "uri",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "title",
                          "detail"
                        ],
                        "type": "object",
                        "x-akamai": {
                          "file-path": "schemas/problem-nested.yaml"
                        }
                      },
                      "minItems": 0,
                      "type": "array",
                      "uniqueItems": true
                    },
                    "instance": {
                      "description": "Non-referenceable URI indicating an error instance.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "status": {
                      "description": "HTTP status code of the error response.",
                      "maximum": 600,
                      "minimum": 100,
                      "type": "integer"
                    },
                    "title": {
                      "description": "Title of the error response.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "type": {
                      "description": "URL for the error type description.",
                      "format": "uri",
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "detail",
                    "instance"
                  ],
                  "type": "object",
                  "x-akamai": {
                    "file-path": "schemas/problem.yaml"
                  }
                }
              }
            },
            "description": "[Forbidden](https://techdocs.akamai.com/key-traffic-mgmt/reference/403). You don't have permission to the resource.",
            "x-akamai": {
              "file-path": "errors/403.yaml"
            }
          },
          "404": {
            "content": {
              "application/problem+json": {
                "example": {
                  "detail": "The system couldn't find a resource with ID '1'. Provide a valid ID and try again.",
                  "instance": "25e8a2a1-696f-4a64-8001-531d97c17229",
                  "status": 404,
                  "title": "Resource not found",
                  "type": "/apikey-manager-api/error-types/resource-not-found"
                },
                "schema": {
                  "additionalProperties": true,
                  "description": "Represents error data in the [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) Problem Details format.",
                  "properties": {
                    "detail": {
                      "description": "Detailed error message.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "errors": {
                      "description": "Further nested problem objects.",
                      "items": {
                        "additionalProperties": true,
                        "description": "Represents error data in the [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) Problem Details format.",
                        "properties": {
                          "detail": {
                            "description": "Diagnostic instructions to locate and fix the problem.",
                            "minLength": 1,
                            "type": "string"
                          },
                          "instance": {
                            "description": "Unique value generated with each API call.",
                            "minLength": 1,
                            "type": "string"
                          },
                          "status": {
                            "description": "HTTP status code that categorizes this error case.",
                            "maximum": 600,
                            "minimum": 100,
                            "type": "integer"
                          },
                          "title": {
                            "description": "Summary of each error case.",
                            "minLength": 1,
                            "type": "string"
                          },
                          "type": {
                            "description": "Identifies each error case.",
                            "format": "uri",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "title",
                          "detail"
                        ],
                        "type": "object",
                        "x-akamai": {
                          "file-path": "schemas/problem-nested.yaml"
                        }
                      },
                      "minItems": 0,
                      "type": "array",
                      "uniqueItems": true
                    },
                    "instance": {
                      "description": "Non-referenceable URI indicating an error instance.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "status": {
                      "description": "HTTP status code of the error response.",
                      "maximum": 600,
                      "minimum": 100,
                      "type": "integer"
                    },
                    "title": {
                      "description": "Title of the error response.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "type": {
                      "description": "URL for the error type description.",
                      "format": "uri",
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "detail",
                    "instance"
                  ],
                  "type": "object",
                  "x-akamai": {
                    "file-path": "schemas/problem.yaml"
                  }
                }
              }
            },
            "description": "[Not found](https://techdocs.akamai.com/key-traffic-mgmt/reference/404). The resource doesn't exist.",
            "x-akamai": {
              "file-path": "errors/404.yaml"
            }
          },
          "405": {
            "content": {
              "application/problem+json": {
                "example": {
                  "detail": "The request you submitted is invalid. Modify the request and try again.",
                  "instance": "007ca75f-5ef3-478b-8a63-ddbe30a5de83",
                  "status": 405,
                  "title": "Method Not Allowed",
                  "type": "/apikey-manager-api/error-types/bad-request"
                },
                "schema": {
                  "additionalProperties": true,
                  "description": "Represents error data in the [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) Problem Details format.",
                  "properties": {
                    "detail": {
                      "description": "Detailed error message.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "errors": {
                      "description": "Further nested problem objects.",
                      "items": {
                        "additionalProperties": true,
                        "description": "Represents error data in the [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) Problem Details format.",
                        "properties": {
                          "detail": {
                            "description": "Diagnostic instructions to locate and fix the problem.",
                            "minLength": 1,
                            "type": "string"
                          },
                          "instance": {
                            "description": "Unique value generated with each API call.",
                            "minLength": 1,
                            "type": "string"
                          },
                          "status": {
                            "description": "HTTP status code that categorizes this error case.",
                            "maximum": 600,
                            "minimum": 100,
                            "type": "integer"
                          },
                          "title": {
                            "description": "Summary of each error case.",
                            "minLength": 1,
                            "type": "string"
                          },
                          "type": {
                            "description": "Identifies each error case.",
                            "format": "uri",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "title",
                          "detail"
                        ],
                        "type": "object",
                        "x-akamai": {
                          "file-path": "schemas/problem-nested.yaml"
                        }
                      },
                      "minItems": 0,
                      "type": "array",
                      "uniqueItems": true
                    },
                    "instance": {
                      "description": "Non-referenceable URI indicating an error instance.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "status": {
                      "description": "HTTP status code of the error response.",
                      "maximum": 600,
                      "minimum": 100,
                      "type": "integer"
                    },
                    "title": {
                      "description": "Title of the error response.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "type": {
                      "description": "URL for the error type description.",
                      "format": "uri",
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "detail",
                    "instance"
                  ],
                  "type": "object",
                  "x-akamai": {
                    "file-path": "schemas/problem.yaml"
                  }
                }
              }
            },
            "description": "[Method not allowed](https://techdocs.akamai.com/key-traffic-mgmt/reference/405).",
            "x-akamai": {
              "file-path": "errors/405.yaml"
            }
          },
          "500": {
            "content": {
              "application/problem+json": {
                "example": {
                  "detail": "The server encountered an internal error. Try again in a while.",
                  "instance": "46f66985-bbe7-4a60-867a-5242be138ef2",
                  "status": 500,
                  "title": "Internal server error",
                  "type": "/apikey-manager-api/error-types/internal-server-error"
                },
                "schema": {
                  "additionalProperties": true,
                  "description": "Represents error data in the [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) Problem Details format.",
                  "properties": {
                    "detail": {
                      "description": "Detailed error message.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "errors": {
                      "description": "Further nested problem objects.",
                      "items": {
                        "additionalProperties": true,
                        "description": "Represents error data in the [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) Problem Details format.",
                        "properties": {
                          "detail": {
                            "description": "Diagnostic instructions to locate and fix the problem.",
                            "minLength": 1,
                            "type": "string"
                          },
                          "instance": {
                            "description": "Unique value generated with each API call.",
                            "minLength": 1,
                            "type": "string"
                          },
                          "status": {
                            "description": "HTTP status code that categorizes this error case.",
                            "maximum": 600,
                            "minimum": 100,
                            "type": "integer"
                          },
                          "title": {
                            "description": "Summary of each error case.",
                            "minLength": 1,
                            "type": "string"
                          },
                          "type": {
                            "description": "Identifies each error case.",
                            "format": "uri",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "title",
                          "detail"
                        ],
                        "type": "object",
                        "x-akamai": {
                          "file-path": "schemas/problem-nested.yaml"
                        }
                      },
                      "minItems": 0,
                      "type": "array",
                      "uniqueItems": true
                    },
                    "instance": {
                      "description": "Non-referenceable URI indicating an error instance.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "status": {
                      "description": "HTTP status code of the error response.",
                      "maximum": 600,
                      "minimum": 100,
                      "type": "integer"
                    },
                    "title": {
                      "description": "Title of the error response.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "type": {
                      "description": "URL for the error type description.",
                      "format": "uri",
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "detail",
                    "instance"
                  ],
                  "type": "object",
                  "x-akamai": {
                    "file-path": "schemas/problem.yaml"
                  }
                }
              }
            },
            "description": "[Internal server error](https://techdocs.akamai.com/key-traffic-mgmt/reference/500).",
            "x-akamai": {
              "file-path": "errors/500.yaml"
            }
          }
        },
        "summary": "Move keys",
        "tags": [
          "Keys"
        ]
      },
      "x-akamai": {
        "file-path": "paths/move.yaml",
        "path-info": "/keys/move"
      }
    }
  },
  "servers": [
    {
      "url": "https://{hostname}/apikey-manager-api/v2"
    }
  ],
  "x-akamai": {
    "auth-type": "EDGE_GRID",
    "file-path": "01-keys.yaml"
  },
  "x-readme": {
    "samples-languages": [
      "curl",
      "python",
      "node"
    ],
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```

# Sibling pages

* [Create keys](https://techdocs.akamai.com/key-traffic-mgmt/reference/post-keys.md)
* [List keys](https://techdocs.akamai.com/key-traffic-mgmt/reference/get-keys.md)
* [Assign keys](https://techdocs.akamai.com/key-traffic-mgmt/reference/post-keys-assign.md)
* [Export keys](https://techdocs.akamai.com/key-traffic-mgmt/reference/get-export-keys.md)
* [Generate keys](https://techdocs.akamai.com/key-traffic-mgmt/reference/post-keys-generate.md)
* [Restore revoked keys](https://techdocs.akamai.com/key-traffic-mgmt/reference/post-keys-restore.md)
* [Revoke keys](https://techdocs.akamai.com/key-traffic-mgmt/reference/post-keys-revoke.md)
* [Unassign keys](https://techdocs.akamai.com/key-traffic-mgmt/reference/post-keys-unassign.md)
* [Get a key](https://techdocs.akamai.com/key-traffic-mgmt/reference/get-key.md)
* [Edit a key](https://techdocs.akamai.com/key-traffic-mgmt/reference/put-key.md)