Skip to content
Start here

List Apps

GET/accounts/{account_id}/magic/apps

Lists Apps associated with an account.

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
Accepted Permissions (at least one required)
Magic WAN WriteMagic WAN ReadMagic Transit ReadMagic Transit Write
Path ParametersExpand Collapse
account_id: string

Identifier

maxLength32
ReturnsExpand Collapse
errors: array of ResponseInfo { code, message, documentation_url, source }
code: number
minimum1000
message: string
documentation_url: optional string
source: optional { pointer }
pointer: optional string
messages: array of ResponseInfo { code, message, documentation_url, source }
code: number
minimum1000
message: string
documentation_url: optional string
source: optional { pointer }
pointer: optional string
result: array of { account_app_id, hostnames, ip_subnets, 3 more } or { managed_app_id, hostnames, ip_subnets, 3 more }
One of the following:
MagicAccountApp { account_app_id, hostnames, ip_subnets, 3 more }

Custom app defined for an account.

account_app_id: string

Magic account app ID.

hostnames: optional array of string

FQDNs to associate with traffic decisions.

ip_subnets: optional array of string

IPv4 CIDRs to associate with traffic decisions. (IPv6 CIDRs are currently unsupported)

name: optional string

Display name for the app.

source_subnets: optional array of string

IPv4 CIDRs to associate with traffic decisions. (IPv6 CIDRs are currently unsupported)

type: optional string

Category of the app.

MagicManagedApp { managed_app_id, hostnames, ip_subnets, 3 more }

Managed app defined by Cloudflare.

managed_app_id: string

Managed app ID.

hostnames: optional array of string

FQDNs to associate with traffic decisions.

ip_subnets: optional array of string

IPv4 CIDRs to associate with traffic decisions. (IPv6 CIDRs are currently unsupported)

name: optional string

Display name for the app.

source_subnets: optional array of string

IPv4 CIDRs to associate with traffic decisions. (IPv6 CIDRs are currently unsupported)

type: optional string

Category of the app.

success: true

Whether the API call was successful

List Apps

curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/magic/apps \
    -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": [
    {
      "account_app_id": "ac60d3d0435248289d446cedd870bcf4",
      "hostnames": [
        "auth.cloudflare.com"
      ],
      "ip_subnets": [
        "192.0.2.0/24"
      ],
      "name": "Cloudflare Dashboard",
      "source_subnets": [
        "192.0.2.0/24"
      ],
      "type": "Development"
    }
  ],
  "success": true
}
Returns Examples
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": [
    {
      "account_app_id": "ac60d3d0435248289d446cedd870bcf4",
      "hostnames": [
        "auth.cloudflare.com"
      ],
      "ip_subnets": [
        "192.0.2.0/24"
      ],
      "name": "Cloudflare Dashboard",
      "source_subnets": [
        "192.0.2.0/24"
      ],
      "type": "Development"
    }
  ],
  "success": true
}