---
search:
  tags:
    - Workspace
    - GET
seo:
  description: >-
    Answers with the workspace's plan (free, payAsYouGo, or a plan priced by
    tiers of… Reference for the GET /api/v1/workspace/billing endpoint in the
    Peal API.
sidebar:
  label: Get the workspace's billing
  badge: GET
title: Get the workspace's billing
type: openapi-operation
---
Answers with the workspace's plan (`free`, `payAsYouGo`, or a plan priced by tiers of channels a subscription still holds), the subscription that buys it, what each limit allows its billing account, how much of it the workspace uses, and the plans it can be on. On a server that does not bill, nothing is limited. Needs billing:read.

`GET /api/v1/workspace/billing`

**Responses**

- `200` — Billing
- `400` — The request names no workspace, and its credential belongs to none: send the workspace's id in the \`Peal-Workspace\` header. Nothing was done.
- `401` — Sign in, or send an API key as a bearer token: the request has no valid credentials.
- `403` — The credentials are valid but do not allow this request. \`reason\` says why: the OAuth client was not given the scope the request takes (\`missingScope\`, with \`scope\` and \`permission\`: the user connects the client again and allows it), the member's role or the API key lacks a permission (\`missingPermission\`, with \`permission\`: an owner or an admin changes the role, or creates a key with it), only a person in their own session may do it (\`personRequired\`), the key or token belongs to another workspace (\`wrongWorkspace\`), the account is suspended (\`suspended\`), a browser sent the cookie from another site (\`untrustedOrigin\`), or the workspace requires two-step verification and the member's account does not have it on (\`twoStepRequired\`: they turn it on in the web app's account settings, and their sessions, applications and command line work again at once; API keys are never refused for it).
- `404` — No workspace with this id is open to the caller.
- `429` — This credential sent more than \`limit\` requests in \`windowSeconds\` seconds: nothing was done. Wait \`retryAfterSeconds\` seconds, as the \`Retry-After\` header says, then send the request again. Every answer to a key or a token carries the \`RateLimit-Policy\` and \`RateLimit\` headers, which say how many requests are left. \`policy\` says which limit applied: on a server that bills, a billing account without a payment method sends fewer (\`free\`), and \`withPaymentMethod\` is what a payment method gives.

Response example, 200:

```json
{
  "account": {
    "billingWorkspaceId": "string",
    "billingWorkspaceName": "string",
    "id": "string",
    "otherWorkspaces": [
      {
        "name": "string",
        "workspaceId": "string"
      }
    ],
    "partner": true,
    "payer": true,
    "transfer": {
      "expiresAt": "string",
      "offeredAt": "string",
      "offeredBy": "string",
      "toUserId": "string"
    },
    "workspaces": -9007199254740991
  },
  "accounts": {
    "accountDays": -9007199254740991,
    "connected": -9007199254740991,
    "estimate": {
      "amount": -9007199254740991,
      "currency": "string"
    },
    "nextAccount": {
      "amount": -9007199254740991,
      "currency": "string"
    },
    "pooled": -9007199254740991
  },
  "allowances": {
    "assistantRequests": -9007199254740991,
    "channels": -9007199254740991,
    "mediaStorage": -9007199254740991,
    "members": -9007199254740991,
    "scheduledPosts": -9007199254740991
  },
  "currency": "string",
  "enabled": true,
  "estimate": {
    "amount": -9007199254740991,
    "currency": "string"
  },
  "meters": [
    {
      "allowance": -9007199254740991,
      "billable": -9007199254740991,
      "ceiling": {
        "amount": -9007199254740991,
        "currency": "string"
      },
      "estimate": {
        "amount": -9007199254740991,
        "currency": "string"
      },
      "group": "assistant",
      "meter": "assistantRequests",
      "most": -9007199254740991,
      "price": {
        "cents": -9007199254740991,
        "per": -9007199254740991
      },
      "priceConfirmed": true,
      "resetsAt": "string",
      "used": -9007199254740991
    }
  ],
  "paymentFailed": true,
  "paymentMethod": true,
  "plan": "free",
  "plans": [
    {
      "allowances": {
        "assistantRequests": -9007199254740991,
        "channels": -9007199254740991,
        "mediaStorage": -9007199254740991,
        "members": -9007199254740991,
        "scheduledPosts": -9007199254740991
      },
      "plan": "free",
      "price": {
        "month": -9007199254740991,
        "year": -9007199254740991
      }
    }
  ],
  "rateCard": {
    "apiRequestsPerMinute": {
      "onRequest": -9007199254740991,
      "withoutPaymentMethod": -9007199254740991
    },
    "assistant": {
      "margin": -9007199254740991
    },
    "daysPerMonth": -9007199254740991,
    "displayVatRate": -9007199254740991,
    "meters": {
      "assistantImages": {
        "allowance": -9007199254740991,
        "allowanceWithout": -9007199254740991,
        "ceiling": -9007199254740991
      },
      "assistantRequests": {
        "allowance": -9007199254740991,
        "allowanceWithout": -9007199254740991,
        "ceiling": -9007199254740991
      },
      "managedAds": {
        "allowance": -9007199254740991,
        "allowanceWithout": -9007199254740991,
        "ceiling": -9007199254740991
      },
      "outboundMessages": {
        "allowance": -9007199254740991,
        "allowanceWithout": -9007199254740991,
        "ceiling": -9007199254740991
      },
      "xApi": {
        "allowance": -9007199254740991,
        "allowanceWithout": -9007199254740991,
        "ceiling": -9007199254740991
      }
    },
    "prices": {
      "usd": {
        "accounts": {
          "bands": [
            {
              "monthly": -9007199254740991,
              "upTo": -9007199254740991
            }
          ]
        },
        "meters": {
          "assistantImages": {
            "cents": -9007199254740991,
            "per": -9007199254740991
          },
          "assistantRequests": {
            "cents": -9007199254740991,
            "per": -9007199254740991
          },
          "managedAds": {
            "cents": -9007199254740991,
            "per": -9007199254740991
          },
          "outboundMessages": {
            "cents": -9007199254740991,
            "per": -9007199254740991
          },
          "xApi": {
            "cents": -9007199254740991,
            "per": -9007199254740991
          }
        }
      }
    },
    "storage": {
      "minimum": 0,
      "perAccount": 0,
      "withoutPaymentMethod": 0
    },
    "unverifiedCeiling": -9007199254740991,
    "x": {
      "defaultCeiling": -9007199254740991,
      "rates": {
        "dmCreate": -9007199254740991,
        "dmEventRead": -9007199254740991,
        "ownedRead": -9007199254740991,
        "postCreate": -9007199254740991,
        "postCreateWithUrl": -9007199254740991,
        "postRead": -9007199254740991,
        "userRead": -9007199254740991
      },
      "ratesReadOn": "string"
    }
  },
  "subscription": {
    "cancelAtPeriodEnd": true,
    "currentPeriodEnd": "string",
    "endsAt": "string",
    "interval": "month",
    "plan": "starter",
    "startedAt": "string",
    "status": "incomplete",
    "trialEnd": "string"
  },
  "trial": {
    "available": true,
    "days": -9007199254740991,
    "plan": "starter"
  },
  "upcomingInvoice": {
    "amount": -9007199254740991,
    "currency": "string"
  },
  "usage": {
    "assistantRequests": {
      "resetsAt": "string",
      "used": -9007199254740991
    },
    "channels": -9007199254740991,
    "mediaStorage": 0,
    "members": -9007199254740991,
    "scheduledPosts": {
      "resetsAt": "string",
      "used": -9007199254740991
    }
  },
  "vatRate": -9007199254740991,
  "withdrawableUntil": "string",
  "x": {
    "reads": true,
    "setAt": "string"
  }
}
```
