REST APIPolicyPolicy Builder

GET

Lists all policy rules for an organization.

Authorization: Organization admins can access their organization's rules. BitGo admins have access to all organizations.

Path Params

  • organizationId string required
    The organization ID

    matches ^[0-9a-f]{32}$

Query Params

  • touchpoints string
    The Touchpoints of the returned policy rules. One or more may be provided. For example, the Transfer from a Wallet Touchpoint. See also the List scope Touchpoints API.
  • status string enum
    Statuses of the returned policy rules, one or more may be provided.
    PENDINGACTIVEINACTIVEINACTIVE_HIDDENDENIEDPENDING_APPROVALUNLOCK_PENDING
  • page integer
    Page number (1-based)

    >= 1

    Defaults to 1

  • pageSize integer
    Number of results per page

    >= 1 · <= 500

    Defaults to 20

Responses

200
List of organization policy rules

Response Body

object

Paginated list of Policy Rules.
  • nextBatchPrevId string required
    The value to pass as the prevId to the API for getting the next page.
  • rules array of objects
    A list of Policy Rules matching the search criteria.
    rules object
    • id string required
      Id of the Policy Rule. This identifier is not unique in isolation, it must be paired with an specific Policy Rule Version number to uniquely identified a particular version of a Policy Rule. A UUID.
    • uniqueId string required
      The uniqueId of the Policy Rule version. A UUID.
    • name string required
      Human readable name of the rule.
    • status string enum required

      Indicates if the Policy Rule is considered in Evaluations.

      • ACTIVE - Will be Evaluated.
      • INACTIVE - Will NOT be Evaluated.
      • DENIED - The requested policy rule change was Denied.
      • PENDING_APPROVAL - This version of the policy rule is Pending Approval before it can be activated.
      • UNLOCK_PENDING - This version of the policy rule is created when a request to unlock a policy is initiated.
      ACTIVEINACTIVEDENIEDPENDING_APPROVALUNLOCK_PENDING
    • version integer
      The Policy Rule Version, an integer that is incremented each time the Policy Rule changes.

      Defaults to 1

    • adminOnly boolean required
      true, if the Policy Rule is a BitGo internal rule. Typically, this allows setting Global Policy Rules across enterprises.
    • touchpointId string required
      The id of the Touchpoint associated with the Policy Rule. A UUID.
    • touchpointLabel string required
      Label of the Touchpoint associated with the Policy Rule. For example the Transfer from a Wallet Touchpoint.
    • scopeId string required
      The id of the Scope associated with the Policy Rule. A UUID.
    • scopeLabel string required
      Label of the Scope associated with the Policy Rule. For example the All Wallets Scope.
    • clauses array of objects required
      List of Policy Rule Clauses: a combination of Conditions and Actions.
      clauses object
      • actions array of objects

        ANY OF

        • name string enum required
          Name of the associated Action.
          approvals.always.deny
      • conditions array of objects

        ANY OF

        • name string enum required
          Name of the condition.
          transfer.amount
        • parameters object required
          Data required to evaluate the condition.
          parameters object
          • operator string enum required
            The comparison operator to use when comparing the transfer amount with the given limit
            >>=<<=
          • amount string required
            The transfer amount is compared with this limit.
          • coin string required
            This condition only applies to transfers of this currency (USD applies to all transfers).
        • operator string enum
          Boolean operators that join Conditions, and/or Actions. Must be null on the last Condition or Action, or if there is only one Condition or Action, must be non-null on all others.
          ANDOR
    • filteringConditions array of objects required
      List of Filtering Conditions that must trigger for this Policy Rule to be Evaluated.

      ANY OF

      • name string enum required
        Name of the condition.
        wallet.type
      • parameters object required
        Required data needed to evaluate the Filtering Condition.
        parameters object
        • walletType array of string enums required
          hotcustodialtrading
    • locked boolean required
      true, if the Policy Rule is locked, false otherwise.
    • lockType string enum required

      Indicates how the Policy Rule is locked.

      • LOCK_AFTER_DATE - Will lock after the lockDate set on the Policy Rule.
      • PERMANENT - Is permanently locked.
      LOCK_AFTER_DATEPERMANENT
    • lockDate string date-time
      The date after which the Policy Rule will be locked. Only applicable if the Policy Rule is locked with LOCK_AFTER_DATE.
    • enterpriseId string
      The id of the Enterprise this Policy Rule belongs to.
    • organizationId string
      The id of the Organization this Policy Rule belongs to.
    • lastTriggeredDate string date-time
      The date when the Policy Rule was last triggered. Only applicable if the Policy Rule is locked with LOCK_AFTER_DATE.
    • lastTriggeredEvaluationId string
      The id of the Evaluation that last triggered the Policy Rule. A UUID.
    • createdBy string required
      The id of the user who created the Policy Rule or the string "BitGo".
    • modifiedBy string required
      The id of the user who last modified the Policy Rule or the string "BitGo".
    • createdDate string date-time required
      The date when the Policy Rule was created. A timestamp.
    • modifiedDate string date-time required
      The date when the Policy Rule was last modified. A timestamp.
    • lockModifiedBy string
      The id of the user who last modified the lock of the Policy Rule.
    • evaluationId string
      The id of the Evaluation that was done when this Policy Rule version was requested to be created, modified or deleted. A UUID.
401
Unauthorized

Response Body

object

  • code string
  • message string
  • status integer
404
The specified resource was not found

Response Body

object

  • code string
  • message string
  • status integer
500
Server Error - Transient error please try again

Response Body

object

  • code string
  • message string
  • status integer