Skip to main content

Key scope

Project restriction

The Project field limits an API key to a specific project:

  • Any—the key has access to all projects in the account
  • A specific project—the key works only with the selected project's data

The restriction behaves differently depending on the method. In listing methods it is a filter: the response is successful but contains only the project's data. In methods that address a specific invoice or wallet, a request for another project's object is rejected with Restricted project.

MethodKey restricted to a project
billing/balancesAccount-level data; the restriction does not apply
billing/historyThe project's operations plus account-level operations—top-ups and bonuses
billing/tariffsFee rate and turnover only for the key's project
invoices/listResults only for the key's project
payments/listResults only for the key's project
statistics/invoicesCalculated only for the key's project
statistics/paymentsCalculated only on the key's project invoices
invoices/createprojectId in the request must match the key's project
invoices/cancelAnother project's invoice is inaccessible
invoices/bindPaymentAnother project's invoice is inaccessible

Scope restriction

The scope defines which API methods the key can use. It is a required, multi-select field.

A call to a method outside the key's scope is rejected with Restricted scope.

Combining restrictions

The project and scope restrictions work together. For example, if a key is limited to invoice methods and tied to a specific project, then:

  • Only invoice methods are available
  • Data is filtered to the specified project only
  • Requests for payments or statistics are rejected
  • Requests for other projects' data are rejected