---
title: Get Impressions Usage Summary
slug: feature-experimentation/api/get-impressions-usage-summary
docTags: 
createdAt: 2026-10-01T19:58:02.336Z
---

{
  "id": "A_QXZWJqiqzHKzj34ZeEf",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://api.optimizely.com/v2/billing/usage/{account_id}/summary",
    "servers": [
      {
        "url": "https://api.optimizely.com/v2/billing/usage/{account_id}/summary"
      }
    ],
    "name": "Get Impressions Usage Summary",
    "description": "Get Impressions Usage Summary by account id",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "account_id",
          "type": "integer<int64>",
          "description": "The account ID of the customer",
          "format": "int64"
        }
      ],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "apiKey",
          "name": "apiKey",
          "kind": "optional",
          "type": "http",
          "scheme": "bearer"
        },
        {
          "id": "OAuth2",
          "name": "OAuth2",
          "kind": "optional",
          "type": "oauth2",
          "description": "<p>Write applications that authenticate with the REST API via OAuth 2.0. Or, to authenticate using a personal token, see <a href=\"https://docs.developers.optimizely.com/web/docs/personal-token\" target=\"_blank\">https://docs.developers.optimizely.com/web/docs/personal-token</a></p>",
          "oauth2Flows": {
            "authorizationCode": {
              "authorizationUrl": "https://app.optimizely.com/oauth2/authorize",
              "tokenUrl": "https://app.optimizely.com/oauth2/token",
              "scopes": {
                "all": "Full access to your account"
              }
            }
          },
          "requiredScopes": [
            "read",
            "write"
          ]
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Return Impression Usage Summary for account",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "ImpressionsUsageSummary",
            "schema": [
              {
                "name": "allowance",
                "kind": "required",
                "type": "integer<int64>",
                "description": "Total allowance purchased for the account.",
                "example": 25000000,
                "format": "int64"
              },
              {
                "name": "end_date",
                "kind": "required",
                "type": "string<date>",
                "description": "Current subscription end date.",
                "format": "date",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}"
              },
              {
                "name": "last_update_date",
                "kind": "required",
                "type": "string<date>",
                "description": "Last impressions usage updated date.",
                "format": "date",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}"
              },
              {
                "name": "start_date",
                "kind": "required",
                "type": "string<date>",
                "description": "Current subscription start date.",
                "format": "date",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}"
              },
              {
                "name": "usage",
                "kind": "required",
                "type": "integer<int64>",
                "description": "Usage for the account.",
                "example": 16360512,
                "format": "int64"
              },
              {
                "name": "usage_percentage",
                "kind": "required",
                "type": "number",
                "description": "Utilised usage percentage.",
                "example": 65,
                "minimum": 0,
                "maximum": 100
              }
            ],
            "modelRef": "#/components/schemas/ImpressionsUsageSummary",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Invalid ID",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "Error",
            "schema": [
              {
                "name": "code",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "message",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "messages",
                "kind": "optional",
                "type": "object",
                "description": "",
                "example": "",
                "schema": []
              },
              {
                "name": "uuid",
                "kind": "optional",
                "type": "string<uuid>",
                "description": "",
                "format": "uuid"
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "Invalid credentials",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "Error",
            "schema": [
              {
                "name": "code",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "message",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "messages",
                "kind": "optional",
                "type": "object",
                "description": "",
                "example": "",
                "schema": []
              },
              {
                "name": "uuid",
                "kind": "optional",
                "type": "string<uuid>",
                "description": "",
                "format": "uuid"
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "403",
        "description": "You do not have permission to account",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "Error",
            "schema": [
              {
                "name": "code",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "message",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "messages",
                "kind": "optional",
                "type": "object",
                "description": "",
                "example": "",
                "schema": []
              },
              {
                "name": "uuid",
                "kind": "optional",
                "type": "string<uuid>",
                "description": "",
                "format": "uuid"
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "404",
        "description": "Impression Usage Summary not found",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "Error",
            "schema": [
              {
                "name": "code",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "message",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "messages",
                "kind": "optional",
                "type": "object",
                "description": "",
                "example": "",
                "schema": []
              },
              {
                "name": "uuid",
                "kind": "optional",
                "type": "string<uuid>",
                "description": "",
                "format": "uuid"
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "default",
        "description": "Unexpected error",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "Error",
            "schema": [
              {
                "name": "code",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "message",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "messages",
                "kind": "optional",
                "type": "object",
                "description": "",
                "example": "",
                "schema": []
              },
              {
                "name": "uuid",
                "kind": "optional",
                "type": "string<uuid>",
                "description": "",
                "format": "uuid"
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "lCpkWo8RP2l13UnGMfz5i",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://api.optimizely.com/v2/billing/usage/{account_id}/summary \\\n     --header 'accept: application/json'"
        },
        {
          "id": "k5MdVSda18C5GtDLbFcry",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.optimizely.com/v2/billing/usage/{account_id}/summary\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "-1HbxhSkemp6_WOqTDg0O",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.optimizely.com/v2/billing/usage/{account_id}/summary\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "nXx45e2QidbNgVpNHa7CW",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.optimizely.com/v2/billing/usage/{account_id}/summary\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "lCpkWo8RP2l13UnGMfz5i"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// Return Impression Usage Summary for account\n{\n  \"allowance\": 25000000,\n  \"end_date\": \"\",\n  \"last_update_date\": \"\",\n  \"start_date\": \"\",\n  \"usage\": 16360512,\n  \"usage_percentage\": 65\n}"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// Invalid ID\n{\n  \"code\": \"\",\n  \"message\": \"\",\n  \"messages\": {},\n  \"uuid\": \"\"\n}"
        },
        {
          "id": "response-2-401",
          "language": "401",
          "code": "// Invalid credentials\n{\n  \"code\": \"\",\n  \"message\": \"\",\n  \"messages\": {},\n  \"uuid\": \"\"\n}"
        },
        {
          "id": "response-3-403",
          "language": "403",
          "code": "// You do not have permission to account\n{\n  \"code\": \"\",\n  \"message\": \"\",\n  \"messages\": {},\n  \"uuid\": \"\"\n}"
        },
        {
          "id": "response-4-404",
          "language": "404",
          "code": "// Impression Usage Summary not found\n{\n  \"code\": \"\",\n  \"message\": \"\",\n  \"messages\": {},\n  \"uuid\": \"\"\n}"
        },
        {
          "id": "response-5-default",
          "language": "default",
          "code": "// Unexpected error\n{\n  \"code\": \"\",\n  \"message\": \"\",\n  \"messages\": {},\n  \"uuid\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}