MOLOCO Role API

The Role API from MOLOCO — 2 operation(s) for role.

Operations 2

POST /cm/v1/auth/roles/grant Grant the role to the user #
POST /cm/v1/auth/roles/revoke Revoke the role from the user #

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-role-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-role-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Moloco Role API
  version: '1.10'
  contact:
    name: Moloco Inc.
    url: https://www.moloco.com
  description: 'Operations tagged Role across 2 of this provider''s published API definitions: moloco-ads-campaign-management-api.json, moloco-ads-campaign-management-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.moloco.cloud
security:
- Bearer: []
tags:
- name: Role
paths:
  /cm/v1/auth/roles/grant:
    post:
      summary: Grant the role to the user
      description: Grant the Role to the user.
      operationId: DspApi_GrantRole
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/messagesGrantRoleResponse'
        default:
          description: Error. Detailed cause can be found in the `details` field.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/messagesGrantRoleError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/messagesGrantRoleRequest'
        required: true
      tags:
      - Role
    servers:
    - url: https://api.moloco.cloud
  /cm/v1/auth/roles/revoke:
    post:
      summary: Revoke the role from the user
      description: Revoke the role from the user
      operationId: DspApi_RevokeRole
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/messagesRevokeRoleResponse'
        default:
          description: Error. Detailed cause can be found in the `details` field.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/messagesRevokeRoleError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/messagesRevokeRoleRequest'
        required: true
      tags:
      - Role
    servers:
    - url: https://api.moloco.cloud
components:
  schemas:
    messagesRevokeRoleErrorAPIErrorInfoErrorReason:
      type: string
      enum:
      - ERROR_REASON_UNKNOWN
      - USER_DOES_NOT_HAVE_REQUIRED_ROLE
      - USER_NOT_REGISTERED_TO_WORKPLACE
      - USER_ALREADY_HAS_ROLE
      - USER_NO_ROLE_TO_REVOKE
      default: ERROR_REASON_UNKNOWN
      description: " - USER_DOES_NOT_HAVE_REQUIRED_ROLE: The user doesn't have role to invite other user.\n - USER_NOT_REGISTERED_TO_WORKPLACE: The user is not registered to workplace.\n - USER_ALREADY_HAS_ROLE: The user has already role bound to the resource.\n - USER_NO_ROLE_TO_REVOKE: The user doesn't have a role to revoke."
    messagesRevokeRoleErrorAPIErrorInfo:
      type: object
      properties:
        reason:
          $ref: '#/components/schemas/messagesRevokeRoleErrorAPIErrorInfoErrorReason'
        error_log_id:
          type: string
        context:
          type: object
          additionalProperties:
            type: string
    dspRole:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/dspRoleType'
          description: The role types users can have.
        workplace_id:
          type: string
          description: The workplace bound to the role.
        ad_account_id:
          type: string
          description: The ad account id bound to role.
        exchange_id:
          type: string
          description: The exchange id bound to role.
      description: 'Role that user can have.

        Role is bound to resource.'
    dspRoleType:
      type: string
      enum:
      - WORKPLACE_OWNER
      - AD_ACCOUNT_OWNER
      - AD_ACCOUNT_MEMBER
      - AD_ACCOUNT_VIEWER
      default: UNKNOWN_TYPE
      description: " - WORKPLACE_OWNER: Workplace owner represents a user who can do anything in a given workplace.\n - AD_ACCOUNT_OWNER: Ad account owner represents a user who can do anything in a given ad account.\n - AD_ACCOUNT_MEMBER: Ad account member can view all users of the Ad Account.\nCan invite new users as Ad Account Member or Ad Account Viewer\nCan edit your own information (ex: name)\nCan create and edit ad campaigns\n - AD_ACCOUNT_VIEWER: Ad account Viewer role offers a limited set of permissions that allows users\nonly to read the basic information of the resources."
    messagesRevokeRoleRequest:
      type: object
      properties:
        user_id:
          type: string
          description: The user ID.
        role:
          $ref: '#/components/schemas/dspRole'
          description: The role which will be revoked from user.
      required:
      - user_id
      - role
    messagesGrantRoleRequest:
      type: object
      properties:
        user_id:
          type: string
          description: The user ID.
        role:
          $ref: '#/components/schemas/dspRole'
          description: The role which will be granted to user.
      required:
      - user_id
      - role
    messagesGrantRoleResponse:
      type: object
    messagesRevokeRoleError:
      type: object
      properties:
        code:
          type: integer
          format: int32
        message:
          type: string
        details:
          type: array
          items:
            type: object
            $ref: '#/components/schemas/messagesRevokeRoleErrorAPIErrorInfo'
    messagesGrantRoleErrorAPIErrorInfoErrorReason:
      type: string
      enum:
      - ERROR_REASON_UNKNOWN
      - USER_DOES_NOT_HAVE_REQUIRED_ROLE
      - USER_NOT_REGISTERED_TO_WORKPLACE
      - USER_ALREADY_HAS_ROLE
      default: ERROR_REASON_UNKNOWN
      description: " - USER_DOES_NOT_HAVE_REQUIRED_ROLE: The user doesn't have role to invite other user.\n - USER_NOT_REGISTERED_TO_WORKPLACE: The user is not registered to workplace.\n - USER_ALREADY_HAS_ROLE: The user has already role bound to the resource."
    messagesGrantRoleError:
      type: object
      properties:
        code:
          type: integer
          format: int32
        message:
          type: string
        details:
          type: array
          items:
            type: object
            $ref: '#/components/schemas/messagesGrantRoleErrorAPIErrorInfo'
    messagesRevokeRoleResponse:
      type: object
    messagesGrantRoleErrorAPIErrorInfo:
      type: object
      properties:
        reason:
          $ref: '#/components/schemas/messagesGrantRoleErrorAPIErrorInfoErrorReason'
        error_log_id:
          type: string
        context:
          type: object
          additionalProperties:
            type: string
  securitySchemes:
    Bearer:
      type: apiKey
      name: Authorization
      in: header
x-refined-from:
- moloco-ads-campaign-management-api.json
- moloco-ads-campaign-management-openapi.yml
x-readme:
  explorer-enabled: true