MOLOCO Spending Limit API

The SpendingLimit API from MOLOCO — 8 operation(s) for spendinglimit.

Operations 9

GET /rmp/mgmt/v1/platforms/{platform_id}/ad-accounts/{ad_account_id}/credits ListCredits #
PUT /rmp/mgmt/v1/platforms/{platform_id}/ad-accounts/{ad_account_id}/credits/{credit_id}/top-up/{request_id} TopUpCredits #
POST /rmp/mgmt/v1/platforms/{platform_id}/ad-accounts/{ad_account_id}/credits/{credit_id}/transaction-history QuerySpendingLimitCreditHistory #
PUT /rmp/mgmt/v1/platforms/{platform_id}/ad-accounts/{ad_account_id}/credits/{credit_id}/withdraw/{request_id} WithdrawCredits #
GET /rmp/mgmt/v1/platforms/{platform_id}/ad-accounts/{ad_account_id}/spending-limits ListSpendingLimits #
GET /rmp/mgmt/v1/platforms/{platform_id}/ad-accounts/{ad_account_id}/spending-limits/{spending_limit_id} ReadSpendingLimit #
PUT /rmp/mgmt/v1/platforms/{platform_id}/ad-accounts/{ad_account_id}/spending-limits/{spending_limit_id} UpdateSpendingLimit #
POST /rmp/mgmt/v1/platforms/{platform_id}/credits-bulk/read QueryCredits #
POST /rmp/mgmt/v1/platforms/{platform_id}/spending-limits-bulk/read QuerySpendingLimits #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/moloco-spendinglimit-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

moloco-spendinglimit-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Moloco Spending Limit API
  version: '1.0'
  contact:
    name: Moloco Inc.
    url: https://www.molocoads.com
  description: 'Operations tagged SpendingLimit across 2 of this provider''s published API definitions: mcm-management-api.json, moloco-commerce-media-management-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://<platform>-mgmt.mcm-api.moloco.com
security:
- ApiKeyAuth: []
tags:
- name: SpendingLimit
paths:
  /rmp/mgmt/v1/platforms/{platform_id}/ad-accounts/{ad_account_id}/credits:
    get:
      summary: ListCredits
      description: ' List credits of the ad account that has spending limit.'
      operationId: RmpManagementApi_ListCredits
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicListCreditsResponse'
        '400':
          description: Bad request. Detailed cause can be found in the response message.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicRepresentedError'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicRepresentedError'
        '403':
          description: Permission denied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicRepresentedError'
        '404':
          description: Not found. One or more required resources do not exist.You can see the details in the response message.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicRepresentedError'
        '500':
          description: Internal server error. Detailed cause can be found in the response message.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicRepresentedError'
      parameters:
      - name: platform_id
        description: The Platform id.
        in: path
        required: true
        schema:
          type: string
      - name: ad_account_id
        description: The AdAccount id.
        in: path
        required: true
        schema:
          type: string
      tags:
      - SpendingLimit
    servers:
    - url: https://<platform>-mgmt.mcm-api.moloco.com
  /rmp/mgmt/v1/platforms/{platform_id}/ad-accounts/{ad_account_id}/credits/{credit_id}/top-up/{request_id}:
    put:
      summary: TopUpCredits
      description: Top up an amount of money (VAT exclusive) to the credits balance.
      operationId: RmpManagementApi_TopUpCredit
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicTopUpCreditResponse'
        '400':
          description: Bad request. Detailed cause can be found in the response message.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicRepresentedError'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicRepresentedError'
        '403':
          description: Permission denied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicRepresentedError'
        '404':
          description: Not found. One or more required resources do not exist.You can see the details in the response message.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicRepresentedError'
        '500':
          description: Internal server error. Detailed cause can be found in the response message.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicRepresentedError'
      parameters:
      - name: platform_id
        description: The Platform id.
        in: path
        required: true
        schema:
          type: string
      - name: ad_account_id
        description: The AdAccount id.
        in: path
        required: true
        schema:
          type: string
      - name: credit_id
        description: The Credit id.
        in: path
        required: true
        schema:
          type: string
      - name: request_id
        description: The TopUp request Id. For retries, the same request_id should used again to prevent multiple requests.
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                top_up:
                  $ref: '#/components/schemas/rmpcommonMoneyMicro'
                comment:
                  type: string
                  description: A comment for transaction. Optional.
              description: TopUpCredit request.
              required:
              - top_up
              additionalProperties: true
        required: true
      tags:
      - SpendingLimit
    servers:
    - url: https://<platform>-mgmt.mcm-api.moloco.com
  /rmp/mgmt/v1/platforms/{platform_id}/ad-accounts/{ad_account_id}/credits/{credit_id}/transaction-history:
    post:
      summary: QuerySpendingLimitCreditHistory
      description: Query spending limit credits history.
      operationId: RmpManagementApi_QuerySpendingLimitCreditHistory
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicQuerySpendingLimitCreditHistoryResponse'
        '400':
          description: Bad request. Detailed cause can be found in the response message.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicRepresentedError'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicRepresentedError'
        '403':
          description: Permission denied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicRepresentedError'
        '404':
          description: Not found. One or more required resources do not exist.You can see the details in the response message.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicRepresentedError'
        '500':
          description: Internal server error. Detailed cause can be found in the response message.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicRepresentedError'
      parameters:
      - name: platform_id
        description: Identifier of the platform who requests management api. It is passed as a path parameter.
        in: path
        required: true
        schema:
          type: string
      - name: ad_account_id
        description: Ad Account ID.
        in: path
        required: true
        schema:
          type: string
      - name: credit_id
        description: Credit ID.
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                start_time:
                  type: string
                  format: date-time
                  description: Start time in RFC3339 format, e.g. "2017-04-01T12:34:56+00:00"
                end_time:
                  type: string
                  format: date-time
                  description: End time in RFC3339 format, e.g. "2017-05-01-T21:09:08+00:00"
                cursor:
                  type: string
                  description: Cursor for pagination. Required after the first request.
                limit:
                  type: integer
                  format: int64
                  default: '10'
                  description: 'Number of items to be returned. Default: 10, Maximum value: 5000'
                order_by:
                  $ref: '#/components/schemas/v1ChangeLogOrderBy'
              additionalProperties: true
        required: true
      tags:
      - SpendingLimit
    servers:
    - url: https://<platform>-mgmt.mcm-api.moloco.com
  /rmp/mgmt/v1/platforms/{platform_id}/ad-accounts/{ad_account_id}/credits/{credit_id}/withdraw/{request_id}:
    put:
      summary: WithdrawCredits
      description: Withdraw an amount of money (VAT exclusive) from the credits balance of the ad account.
      operationId: RmpManagementApi_WithdrawCredit
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicWithdrawCreditResponse'
        '400':
          description: Bad request. Detailed cause can be found in the response message.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicRepresentedError'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicRepresentedError'
        '403':
          description: Permission denied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicRepresentedError'
        '404':
          description: Not found. One or more required resources do not exist.You can see the details in the response message.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicRepresentedError'
        '500':
          description: Internal server error. Detailed cause can be found in the response message.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicRepresentedError'
      parameters:
      - name: platform_id
        description: The Platform id.
        in: path
        required: true
        schema:
          type: string
      - name: ad_account_id
        description: The AdAccount id.
        in: path
        required: true
        schema:
          type: string
      - name: credit_id
        description: The Credit id.
        in: path
        required: true
        schema:
          type: string
      - name: request_id
        description: The Withdraw request Id. For retries, the same request_id should be used again to prevent multiple requests.
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                withdraw:
                  $ref: '#/components/schemas/rmpcommonMoneyMicro'
                comment:
                  type: string
                  description: A comment for transaction. Optional.
              description: WithdrawCredit request.
              required:
              - withdraw
              additionalProperties: true
        required: true
      tags:
      - SpendingLimit
    servers:
    - url: https://<platform>-mgmt.mcm-api.moloco.com
  /rmp/mgmt/v1/platforms/{platform_id}/ad-accounts/{ad_account_id}/spending-limits:
    get:
      summary: ListSpendingLimits
      description: List all spending limits of an ad account. Currently, an ad account can have a single spending limit.
      operationId: RmpManagementApi_ListSpendingLimits
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicListSpendingLimitsResponse'
        '400':
          description: Bad request. Detailed cause can be found in the response message.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicRepresentedError'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicRepresentedError'
        '403':
          description: Permission denied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicRepresentedError'
        '404':
          description: Not found. One or more required resources do not exist.You can see the details in the response message.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicRepresentedError'
        '500':
          description: Internal server error. Detailed cause can be found in the response message.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicRepresentedError'
      parameters:
      - name: platform_id
        description: The Platform id.
        in: path
        required: true
        schema:
          type: string
      - name: ad_account_id
        description: The AdAccount id.
        in: path
        required: true
        schema:
          type: string
      tags:
      - SpendingLimit
    servers:
    - url: https://<platform>-mgmt.mcm-api.moloco.com
  /rmp/mgmt/v1/platforms/{platform_id}/ad-accounts/{ad_account_id}/spending-limits/{spending_limit_id}:
    get:
      summary: ReadSpendingLimit
      description: Read spending limit of the ad account.
      operationId: RmpManagementApi_ReadSpendingLimit
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicReadSpendingLimitResponse'
        '400':
          description: Bad request. Detailed cause can be found in the response message.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicRepresentedError'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicRepresentedError'
        '403':
          description: Permission denied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicRepresentedError'
        '404':
          description: Not found. One or more required resources do not exist.You can see the details in the response message.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicRepresentedError'
        '500':
          description: Internal server error. Detailed cause can be found in the response message.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicRepresentedError'
      parameters:
      - name: platform_id
        description: The Platform id.
        in: path
        required: true
        schema:
          type: string
      - name: ad_account_id
        description: The AdAccount id.
        in: path
        required: true
        schema:
          type: string
      - name: spending_limit_id
        description: The Spend Limit id.
        in: path
        required: true
        schema:
          type: string
      tags:
      - SpendingLimit
    put:
      summary: UpdateSpendingLimit
      description: Update a spending limit.
      operationId: RmpManagementApi_UpdateSpendingLimit
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicUpdateSpendingLimitResponse'
        '400':
          description: Bad request. Detailed cause can be found in the response message.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicRepresentedError'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicRepresentedError'
        '403':
          description: Permission denied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicRepresentedError'
        '404':
          description: Not found. One or more required resources do not exist.You can see the details in the response message.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicRepresentedError'
        '500':
          description: Internal server error. Detailed cause can be found in the response message.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicRepresentedError'
      parameters:
      - name: platform_id
        description: The Platform id.
        in: path
        required: true
        schema:
          type: string
      - name: ad_account_id
        description: The AdAccount id.
        in: path
        required: true
        schema:
          type: string
      - name: spending_limit_id
        description: The Spend Limit id.
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                update_amount:
                  $ref: '#/components/schemas/rmpcommonMoneyMicro'
              description: UpdateSpendingLimit request.
              additionalProperties: true
        required: true
      tags:
      - SpendingLimit
    servers:
    - url: https://<platform>-mgmt.mcm-api.moloco.com
  /rmp/mgmt/v1/platforms/{platform_id}/credits-bulk/read:
    post:
      summary: QueryCredits
      description: Query all credits for the platform using spending limit.
      operationId: RmpManagementApi_QueryCredits
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicQueryCreditsResponse'
        '400':
          description: Bad request. Detailed cause can be found in the response message.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicRepresentedError'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicRepresentedError'
        '403':
          description: Permission denied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicRepresentedError'
        '404':
          description: Not found. One or more required resources do not exist.You can see the details in the response message.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicRepresentedError'
        '500':
          description: Internal server error. Detailed cause can be found in the response message.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicRepresentedError'
      parameters:
      - name: platform_id
        description: The Platform id.
        in: path
        required: true
        schema:
          type: string
      tags:
      - SpendingLimit
    servers:
    - url: https://<platform>-mgmt.mcm-api.moloco.com
  /rmp/mgmt/v1/platforms/{platform_id}/spending-limits-bulk/read:
    post:
      summary: QuerySpendingLimits
      description: Query all spending limits for the platform.
      operationId: RmpManagementApi_QuerySpendingLimits
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicQuerySpendingLimitsResponse'
        '400':
          description: Bad request. Detailed cause can be found in the response message.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicRepresentedError'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicRepresentedError'
        '403':
          description: Permission denied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicRepresentedError'
        '404':
          description: Not found. One or more required resources do not exist.You can see the details in the response message.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicRepresentedError'
        '500':
          description: Internal server error. Detailed cause can be found in the response message.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/publicRepresentedError'
      parameters:
      - name: platform_id
        description: The Platform id.
        in: path
        required: true
        schema:
          type: string
      tags:
      - SpendingLimit
    servers:
    - url: https://<platform>-mgmt.mcm-api.moloco.com
components:
  schemas:
    v1SpendingLimitCreditHistoryMoneyMicroByAccount:
      type: object
      properties:
        credits:
          $ref: '#/components/schemas/rmpcommonMoneyMicro'
      additionalProperties: true
    v1SpendingLimit:
      type: object
      properties:
        id:
          type: string
          description: The id of the Wallet. Must be left unset for the Wallet creation request. Must be set for the other requests.
        title:
          type: string
          description: A friendly name for the spending limit.
        ad_account_id:
          type: string
          description: The id of the AdAccount for this spending limit.
        spent_since_reset:
          $ref: '#/components/schemas/rmpcommonMoneyMicro'
        remaining_since_reset:
          $ref: '#/components/schemas/rmpcommonMoneyMicro'
        spending_limit_micro:
          $ref: '#/components/schemas/v1SpendingLimitMicro'
        reset_timestamps:
          $ref: '#/components/schemas/v1SpendingLimitResetTimestamps'
        created_at:
          type: string
          format: date-time
          description: Created timestamp. API user should not touch this field; it is set internally.
          readOnly: true
        updated_at:
          type: string
          format: date-time
          description: Updated timestamp. Set internally during creation, but required during update.
      description: Definition of a SpendingLimit.
      required:
      - id
      - ad_account_id
      - spent_since_reset
      - remaining_since_reset
      - spending_limit_micro
      - reset_timestamps
      - created_at
      - updated_at
      additionalProperties: true
    RepresentedErrorDetail:
      type: object
      properties:
        type:
          type: string
          description: The type of the metadata.
        category:
          $ref: '#/components/schemas/commonErrorCategory'
        metadata:
          type: object
          description: The metadata of the responded error.
          additionalProperties: true
      required:
      - type
      - category
      additionalProperties: true
    v1SpendingLimitCreditHistoryMetadata:
      type: object
      properties:
        comment:
          type: string
          description: A comment for transaction. Optional.
      additionalProperties: true
    publicQuerySpendingLimitsResponse:
      type: object
      properties:
        result:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/publicSpendingLimits'
          description: Map of spending limits keyed by an ad account id.
      description: QuerySpendingLimits response.
      required:
      - result
      additionalProperties: true
    publicListSpendingLimitsResponse:
      type: object
      properties:
        spending_limits:
          type: array
          items:
            $ref: '#/components/schemas/v1SpendingLimit'
          description: List of spending limits.
      description: ListSpendingLimits response.
      required:
      - spending_limits
      additionalProperties: true
    commonErrorCategory:
      type: string
      enum:
      - DEFAULT_ERROR_CATEGORY
      - INPUT_VALIDATION
      - CHARACTER_LIMIT_EXCEEDED
      - TIMESTAMP_MISMATCH
      - FEATURE_NOT_ALLOWED
      - REINVITE_NOT_ALLOWED
      - LAST_OWNER_REVOKE_NOT_ALLOWED
      - LAST_OWNER_DELETE_NOT_ALLOWED
      - SSO_USER_JOIN_REQUEST_NOT_ALLOWED
      - MFA_VERIFICATION_FAILED
      - INSUFFICIENT_SPENDING_LIMIT
      - AD_ACCOUNT_ALREADY_OWNED
      - INSUFFICIENT_WALLET_BALANCE
      - INSUFFICIENT_SPEND_CAP_BUDGET
      - MAX_SPEND_CAP_COUNT_REACHED
      - MAX_CAMPAIGNS_COUNT_PER_SPEND_CAP_REACHED
      - MAX_CAMPAIGN_COUNT_REACHED
      - MODIFY_ARCHIVED_CAMPAIGN_NOT_ALLOWED
      - INVALID_CAMPAIGN_STATUS_FOR_ARCHIVE
      - INVALID_MANAGED_CPT_CAMPAIGN_SCHEDULE
      - INACTIVE_AD_ACCOUNT
      - DUPLICATE_AUDIENCE
      - INVALID_RESERVED_TIME_LINE_ITEM_SCHEDULE
      - EXCEED_MAX_IMAGE_SIZE
      - MAX_LABEL_COUNT_REACHED
      - MAX_LABEL_VALUE_COUNT_REACHED
      - MAX_LABEL_VALUE_RELATIONSHIP_COUNT_REACHED
      - PLATFORM_INSIGHT_UNAVAILABLE
      - MAX_CUSTOM_TARGETING_KEY_COUNT_REACHED
      - INVALID_CUSTOM_TARGETING
      default: DEFAULT_ERROR_CATEGORY
      title: "- INPUT_VALIDATION: INPUT_VALIDATION: reserved for 1 ~ 99\n - TIMESTAMP_MISMATCH: TIMESTAMP_MISSMATCH: reserved for 100 ~ 199\n - FEATURE_NOT_ALLOWED: General policy: 1000 ~ 1999\n - REINVITE_NOT_ALLOWED: User policy: 2000 ~ 2999\n - INSUFFICIENT_SPENDING_LIMIT: Account policy: 3000 ~ 3999\nThis policy includes ad manager account, ad account, and wallet related policies\n - MAX_CAMPAIGN_COUNT_REACHED: Campaign policy: 4000 ~ 4999\n - INVALID_RESERVED_TIME_LINE_ITEM_SCHEDULE: Returned when a RESERVED_TIME line item's schedule overlaps an existing enabled RD booking on the same inventory.\n - EXCEED_MAX_IMAGE_SIZE: Asset policy: 5000 ~ 5999\n - MAX_LABEL_COUNT_REACHED: Labeling policy: 6000 ~ 6999\n - PLATFORM_INSIGHT_UNAVAILABLE: Insight metric policy: 7000 ~ 7999\n - MAX_CUSTOM_TARGETING_KEY_COUNT_REACHED: Custom Targeting policy: 8000 ~ 8999"
    v1SpendingLimitCreditHistoryType:
      type: string
      enum:
      - UNKNOWN_TYPE
      - FUNDED
      - REFUNDED
      - SPENT
      default: UNKNOWN_TYPE
    publicTopUpCreditResponse:
      type: object
      properties:
        credit:
          $ref: '#/components/schemas/v1Credit'
      description: TopUpCredit response.
      additionalProperties: true
    v1SpendingLimitCreditHistory:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/v1SpendingLimitCreditHistoryType'
        transaction_status:
          $ref: '#/components/schemas/v1SpendingLimitCreditHistoryTransactionStatus'
        budget_change:
          $ref: '#/components/schemas/v1SpendingLimitCreditHistoryMoneyMicroByAccount'
        balance:
          $ref: '#/components/schemas/v1SpendingLimitCreditHistoryMoneyMicroByAccount'
        posted_at:
          type: string
          format: date-time
          description: Posted timestamp of the transaction.
        transaction_date:
          type: string
          description: Transaction date. e.g., 2006-01-02
        metadata:
          $ref: '#/components/schemas/v1SpendingLimitCreditHistoryMetadata'
        changed_by:
          $ref: '#/components/schemas/v1SpendingLimitCreditHistoryChangedBy'
      required:
      - type
      - transaction_status
      - budget_change
      - balance
      - posted_at
      - transaction_date
      additionalProperties: true
    v1SpendingLimitCreditHistoryTransactionStatus:
      type: string
      enum:
      - UNKNOWN_TRANSACTION_STATUS
      - PENDING
      - POSTED
      default: UNKNOWN_TRANSACTION_STATUS
    v1SpendingLimitCreditHistoryChangedBy:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        email:
          type: string
        role:
          $ref: '#/components/schemas/v1RoleName'
      additionalProperties: true
    publicListCreditsResponse:
      type: object
      properties:
        credits:
          type: array
          items:
            $ref: '#/components/schemas/v1Credit'
          description: List of Credits info.
      description: ListCredits Response.
      required:
      - credits
      additionalProperties: true
    publicQueryCreditsResponse:
      type: object
      properties:
        result:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/publicCredits'
          description: Map of credits keyed by an ad account id.
      description: QueryCreditsResponse Response.
      required:
      - result
      additionalProperties: true
    commonOrderByDirection:
      type: string
      enum:
      - UNKNOWN_ORDER_BY_DIRECTION
      - ASC
      - DESC
      default: UNKNOWN_ORDER_BY_DIRECTION
    v1ChangeLogOrderByOrderByColumn:
      type: string
      enum:
      - UNKNOWN_ORDER_BY_COLUMN
      - UPDATED_AT
      default: UNKNOWN_ORDER_BY_COLUMN
    publicRepresentedError:
      type: object
      properties:
        code:
          type: integer
          format: int32
          description: The status code, which should be an enum value of google.rpc.Code.(https://developers.google.com/actions-center/reference/grpc-api/status_codes)
        message:
          type: string
          description: The detailed message of responded error.
        details:
          type: array
          items:
            $ref: '#/components/schemas/RepresentedErrorDetail'
          description: The detailed information of responded error. Please refer to the error category section in guides for more detailed information.(https://rmp-docs.moloco.com/docs/management-api-error-categories)
      title: Overridden from grpc status(https://github.com/grpc/grpc/blob/master/src/proto/grpc/status/status.proto)
      required:
      - code
      - message
      - details
      additionalProperties: true
    v1SpendingLimitMicro:
      type: object
      properties:
        last_spending_limit:
          $ref: '#/components/schemas/rmpcommonMoneyMicro'
        next_spending_limit:
          $ref: '#/components/schemas/rmpcommonMoneyMicro'
      description: Definition of a SpendingLimitMicro.
      required:
      - last_spending_limit
      - next_spending_limit
      additionalProperties: true
    publicCredits:
      type: object
      properties:
        credits:
          type: array
          items:
            $ref: '#/components/schemas/v1Credit'
          description: List of Credits.
      description: QueryCredits response.
      required:
      - credits
      additionalProperties: true
    publicWithdrawCreditResponse:
      type: object
      properties:
        credit:
          $ref: '#/components/schemas/v1Credit'
      description: WithdrawCredit response.
      additionalProperties: true
    v1RoleName:
      type: string
      enum:
      - UNKNOWN_ROLE_NAME
      - PLATFORM_OWNER
      - PLATFORM_USER
      - AD_ACCOUNT_OWNER
      - AD_ACCOUNT_USER
      - AD_ACCOUNT_AGENCY
      - CREATIVE_REVIEWER
      default: UNKNOWN_ROLE_NAME
    publicReadSpendingLimitResponse:
      type: object
      properties:
        spending_limit:
          $ref: '#/components/schemas/v1SpendingLimit'
      description: ReadSpendingLimit response.
      required:
      - spending_limit
      additionalProperties: true
    publicSpe

# --- truncated at 32 KB (36 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/moloco/refs/heads/main/openapi/moloco-spendinglimit-api-openapi.yml