---
updatedAt: 2026-09-23T12:29:56.000Z
---

# List content provider codes

Lists all content provider codes assigned to the IoT product.

# OpenAPI definition

```json
{
  "externalDocs": {
    "description": "See documentation for Akamai's IoT OTA Updates API",
    "url": "https://techdocs.akamai.com/iot-ota-updates/reference"
  },
  "info": {
    "license": {
      "name": "Apache 2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0.html"
    },
    "title": "CP codes",
    "version": "v1"
  },
  "openapi": "3.0.0",
  "paths": {
    "/cpcodes": {
      "get": {
        "description": "Lists all content provider codes assigned to the IoT product.",
        "externalDocs": {
          "description": "See documentation for this operation in Akamai's IoT OTA Updates API",
          "url": "https://techdocs.akamai.com/iot-ota-updates/reference/get-cpcodes"
        },
        "operationId": "get-cpcodes",
        "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"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": [
                  {
                    "id": 100001,
                    "name": "cp code 100001"
                  },
                  {
                    "id": 100002,
                    "name": "cp code 100002"
                  }
                ],
                "schema": {
                  "description": "Specifies a collection of content provider codes.",
                  "items": {
                    "additionalProperties": false,
                    "description": "Specifies a content provider code.",
                    "properties": {
                      "id": {
                        "description": "The identifier of the content provider code.",
                        "minimum": 1,
                        "type": "integer"
                      },
                      "name": {
                        "description": "The name of the content provider code.",
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "name"
                    ],
                    "type": "object",
                    "x-akamai": {
                      "file-path": "schemas/cpcode.yaml"
                    }
                  },
                  "minItems": 0,
                  "type": "array",
                  "x-akamai": {
                    "file-path": "schemas/cpcodes-200.yaml"
                  }
                }
              }
            },
            "description": "The response lists CP codes."
          },
          "401": {
            "content": {
              "application/problem+json": {
                "example": {
                  "code": "expired_token",
                  "incidentId": "18aa3ad2-66b7-0b4f-a9d7-81dad72eed6c",
                  "solution": "request_token",
                  "title": "Token is expired"
                },
                "schema": {
                  "additionalProperties": true,
                  "description": "Specifies an error response returned by the IoT OTA Updates API.",
                  "properties": {
                    "code": {
                      "description": "The unique code for an error.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "incidentId": {
                      "description": "A logging key useful when communicating about problems with Technical Support representatives.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "solution": {
                      "description": "A human-readable solution to a problem.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "title": {
                      "description": "A human-readable summary of the problem type.",
                      "minLength": 1,
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "title"
                  ],
                  "type": "object",
                  "x-akamai": {
                    "file-path": "schemas/unauthorized.yaml"
                  }
                }
              }
            },
            "description": "[Unauthorized](https://techdocs.akamai.com/iot-ota-updates/reference/401).",
            "x-akamai": {
              "file-path": "errors/401.yaml"
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "example": {
                  "code": "weeperf.ota.access.denied",
                  "incidentId": "f5e53705-0764-4afe-aff3-823dc15c818a",
                  "title": "Access Denied",
                  "type": "/ota-api/error-types/weeperf.ota.access.denied"
                },
                "schema": {
                  "additionalProperties": true,
                  "description": "Specifies an error response returned by the IoT OTA Updates API.",
                  "properties": {
                    "code": {
                      "description": "The unique code for an error.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "detail": {
                      "description": "A human-readable explanation specific to the problem.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "details": {
                      "description": "For errors with more than one detected problem, this represents a list of Problem Details objects. Each object provides details of a specific problem.",
                      "items": {
                        "additionalProperties": true,
                        "description": "Specifies nested details of an error response.",
                        "properties": {
                          "code": {
                            "description": "The unique code for an error.",
                            "minLength": 1,
                            "type": "string"
                          },
                          "data": {
                            "description": "An object map with details about rejected values.",
                            "type": "object"
                          },
                          "field": {
                            "description": "A request parameter, path variable, or request body field that caused an error.",
                            "minLength": 1,
                            "type": "string"
                          },
                          "message": {
                            "description": "A human-readable summary of the problem type.",
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "message"
                        ],
                        "type": "object",
                        "x-akamai": {
                          "file-path": "schemas/http-problem-details-nested.yaml"
                        }
                      },
                      "minItems": 1,
                      "type": "array"
                    },
                    "incidentId": {
                      "description": "A logging key useful when communicating about problems with Technical Support representatives.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "instance": {
                      "description": "A non-navigable URI that identifies each error instance.",
                      "format": "uri",
                      "type": "string"
                    },
                    "status": {
                      "description": "The HTTP error code.",
                      "minimum": 0,
                      "type": "integer"
                    },
                    "title": {
                      "description": "A human-readable summary of the problem type.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "type": {
                      "description": "A non-navigable URI that identifies each error case.",
                      "format": "uri",
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title"
                  ],
                  "type": "object",
                  "x-akamai": {
                    "file-path": "schemas/http-problem-details.yaml"
                  }
                }
              }
            },
            "description": "[Forbidden](https://techdocs.akamai.com/iot-ota-updates/reference/403).",
            "x-akamai": {
              "file-path": "errors/403.yaml"
            }
          },
          "405": {
            "content": {
              "application/problem+json": {
                "example": {
                  "code": "METHOD_NOT_ALLOWED",
                  "incidentId": "865ed61f-6f9a-40a2-b11d-c8dc4292dd33",
                  "title": "Request method 'POST' is not supported",
                  "type": "/ota-api/error-types/METHOD_NOT_ALLOWED"
                },
                "schema": {
                  "additionalProperties": true,
                  "description": "Specifies an error response returned by the IoT OTA Updates API.",
                  "properties": {
                    "code": {
                      "description": "The unique code for an error.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "detail": {
                      "description": "A human-readable explanation specific to the problem.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "details": {
                      "description": "For errors with more than one detected problem, this represents a list of Problem Details objects. Each object provides details of a specific problem.",
                      "items": {
                        "additionalProperties": true,
                        "description": "Specifies nested details of an error response.",
                        "properties": {
                          "code": {
                            "description": "The unique code for an error.",
                            "minLength": 1,
                            "type": "string"
                          },
                          "data": {
                            "description": "An object map with details about rejected values.",
                            "type": "object"
                          },
                          "field": {
                            "description": "A request parameter, path variable, or request body field that caused an error.",
                            "minLength": 1,
                            "type": "string"
                          },
                          "message": {
                            "description": "A human-readable summary of the problem type.",
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "message"
                        ],
                        "type": "object",
                        "x-akamai": {
                          "file-path": "schemas/http-problem-details-nested.yaml"
                        }
                      },
                      "minItems": 1,
                      "type": "array"
                    },
                    "incidentId": {
                      "description": "A logging key useful when communicating about problems with Technical Support representatives.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "instance": {
                      "description": "A non-navigable URI that identifies each error instance.",
                      "format": "uri",
                      "type": "string"
                    },
                    "status": {
                      "description": "The HTTP error code.",
                      "minimum": 0,
                      "type": "integer"
                    },
                    "title": {
                      "description": "A human-readable summary of the problem type.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "type": {
                      "description": "A non-navigable URI that identifies each error case.",
                      "format": "uri",
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title"
                  ],
                  "type": "object",
                  "x-akamai": {
                    "file-path": "schemas/http-problem-details.yaml"
                  }
                }
              }
            },
            "description": "[Method not allowed](https://techdocs.akamai.com/iot-ota-updates/reference/405).",
            "x-akamai": {
              "file-path": "errors/405.yaml"
            }
          },
          "406": {
            "content": {
              "application/problem+json": {
                "example": {
                  "code": "NOT_ACCEPTABLE",
                  "incidentId": "859ec7b7-7cea-423c-83a5-3238609d6a08",
                  "title": "No acceptable representation",
                  "type": "/ota-api/error-types/NOT_ACCEPTABLE"
                },
                "schema": {
                  "additionalProperties": true,
                  "description": "Specifies an error response returned by the IoT OTA Updates API.",
                  "properties": {
                    "code": {
                      "description": "The unique code for an error.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "detail": {
                      "description": "A human-readable explanation specific to the problem.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "details": {
                      "description": "For errors with more than one detected problem, this represents a list of Problem Details objects. Each object provides details of a specific problem.",
                      "items": {
                        "additionalProperties": true,
                        "description": "Specifies nested details of an error response.",
                        "properties": {
                          "code": {
                            "description": "The unique code for an error.",
                            "minLength": 1,
                            "type": "string"
                          },
                          "data": {
                            "description": "An object map with details about rejected values.",
                            "type": "object"
                          },
                          "field": {
                            "description": "A request parameter, path variable, or request body field that caused an error.",
                            "minLength": 1,
                            "type": "string"
                          },
                          "message": {
                            "description": "A human-readable summary of the problem type.",
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "message"
                        ],
                        "type": "object",
                        "x-akamai": {
                          "file-path": "schemas/http-problem-details-nested.yaml"
                        }
                      },
                      "minItems": 1,
                      "type": "array"
                    },
                    "incidentId": {
                      "description": "A logging key useful when communicating about problems with Technical Support representatives.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "instance": {
                      "description": "A non-navigable URI that identifies each error instance.",
                      "format": "uri",
                      "type": "string"
                    },
                    "status": {
                      "description": "The HTTP error code.",
                      "minimum": 0,
                      "type": "integer"
                    },
                    "title": {
                      "description": "A human-readable summary of the problem type.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "type": {
                      "description": "A non-navigable URI that identifies each error case.",
                      "format": "uri",
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title"
                  ],
                  "type": "object",
                  "x-akamai": {
                    "file-path": "schemas/http-problem-details.yaml"
                  }
                }
              }
            },
            "description": "[Not acceptable](https://techdocs.akamai.com/iot-ota-updates/reference/406).",
            "x-akamai": {
              "file-path": "errors/406.yaml"
            }
          },
          "500": {
            "content": {
              "application/problem+json": {
                "example": {
                  "code": "INTERNAL_OTA_ERROR",
                  "incidentId": "d42412df-2b9b-434b-8480-e88143b338c8",
                  "title": "Internal OTA Error",
                  "type": "/ota-api/error-types/INTERNAL_OTA_ERROR"
                },
                "schema": {
                  "additionalProperties": true,
                  "description": "Specifies an error response returned by the IoT OTA Updates API.",
                  "properties": {
                    "code": {
                      "description": "The unique code for an error.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "detail": {
                      "description": "A human-readable explanation specific to the problem.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "details": {
                      "description": "For errors with more than one detected problem, this represents a list of Problem Details objects. Each object provides details of a specific problem.",
                      "items": {
                        "additionalProperties": true,
                        "description": "Specifies nested details of an error response.",
                        "properties": {
                          "code": {
                            "description": "The unique code for an error.",
                            "minLength": 1,
                            "type": "string"
                          },
                          "data": {
                            "description": "An object map with details about rejected values.",
                            "type": "object"
                          },
                          "field": {
                            "description": "A request parameter, path variable, or request body field that caused an error.",
                            "minLength": 1,
                            "type": "string"
                          },
                          "message": {
                            "description": "A human-readable summary of the problem type.",
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "message"
                        ],
                        "type": "object",
                        "x-akamai": {
                          "file-path": "schemas/http-problem-details-nested.yaml"
                        }
                      },
                      "minItems": 1,
                      "type": "array"
                    },
                    "incidentId": {
                      "description": "A logging key useful when communicating about problems with Technical Support representatives.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "instance": {
                      "description": "A non-navigable URI that identifies each error instance.",
                      "format": "uri",
                      "type": "string"
                    },
                    "status": {
                      "description": "The HTTP error code.",
                      "minimum": 0,
                      "type": "integer"
                    },
                    "title": {
                      "description": "A human-readable summary of the problem type.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "type": {
                      "description": "A non-navigable URI that identifies each error case.",
                      "format": "uri",
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title"
                  ],
                  "type": "object",
                  "x-akamai": {
                    "file-path": "schemas/http-problem-details.yaml"
                  }
                }
              }
            },
            "description": "[Internal server error](https://techdocs.akamai.com/iot-ota-updates/reference/500).",
            "x-akamai": {
              "file-path": "errors/500.yaml"
            }
          }
        },
        "summary": "List content provider codes",
        "tags": [
          "CP codes"
        ]
      },
      "x-akamai": {
        "file-path": "paths/cp-codes.yaml",
        "path-for-file": "/cpcodes"
      }
    }
  },
  "servers": [
    {
      "url": "https://{hostname}/ota/v1"
    }
  ],
  "tags": [
    {
      "description": "Get information about CP codes assigned to the IoT product.",
      "name": "CP codes"
    }
  ],
  "x-akamai": {
    "auth-type": "EDGE_GRID",
    "file-path": "01-cpcodes.yaml"
  },
  "x-readme": {
    "explorer-enabled": false,
    "samples-languages": [
      "curl",
      "python",
      "node"
    ]
  }
}
```