MTN Group Organizations API

The Organizations API from MTN Group — 3 operation(s) for organizations.

Operations 5

POST /organizations/{id}/invitations Create invitations to organization
GET /organizations/{id}/invitations Get all invitations to organization
DELETE /organizations/{id}/invitations/{invitationId} Delete invitations by Invitation ID
POST /organizations/{id}/members/roles/{userId} Assign one or more roles to a member of an organization
DELETE /organizations/{id}/members/roles/{userId} Remove one or more roles from a given user in the context of the provided organization

Documentation

📖
Documentation
https://developers.mtn.com/products/account-decisioning
📖
APIReference
https://developers.mtn.com/products/account-decisioning
📖
Documentation
https://developers.mtn.com/products/tmf-customer-bill-management
📖
APIReference
https://developers.mtn.com/products/tmf-customer-bill-management
📖
Documentation
https://developers.mtn.com/products/mtn-customer-loans-api-v1
📖
APIReference
https://developers.mtn.com/products/mtn-customer-loans-api-v1
📖
Documentation
https://developers.mtn.com/products/subscriber-details
📖
APIReference
https://developers.mtn.com/products/subscriber-details
📖
Documentation
https://developers.mtn.com/products/subscriber-type
📖
APIReference
https://developers.mtn.com/products/subscriber-type
📖
Documentation
https://developers.mtn.com/products/provisioning
📖
APIReference
https://developers.mtn.com/products/provisioning
📖
Documentation
https://developers.mtn.com/products/unified-balance-v1
📖
APIReference
https://developers.mtn.com/products/unified-balance-v1
📖
Documentation
https://developers.mtn.com/products/tmf-resourceinventorymanagement-tmf639
📖
APIReference
https://developers.mtn.com/products/tmf-resourceinventorymanagement-tmf639
📖
Documentation
https://developers.mtn.com/products/sales-management
📖
APIReference
https://developers.mtn.com/products/sales-management
📖
Documentation
https://developers.mtn.com/products/service-activation-and-configuration
📖
APIReference
https://developers.mtn.com/products/service-activation-and-configuration
📖
Documentation
https://developers.mtn.com/products/service-ordering
📖
APIReference
https://developers.mtn.com/products/service-ordering
📖
Documentation
https://developers.mtn.com/products/bss-tt-oauth-v1
📖
APIReference
https://developers.mtn.com/products/bss-tt-oauth-v1
📖
Documentation
https://developers.mtn.com/products/balance-management-v1
📖
APIReference
https://developers.mtn.com/products/balance-management-v1
📖
Documentation
https://developers.mtn.com/products/callmeback-v1
📖
APIReference
https://developers.mtn.com/products/callmeback-v1
📖
Documentation
https://developers.mtn.com/products/callmeback-v2
📖
APIReference
https://developers.mtn.com/products/callmeback-v2
📖
Documentation
https://developers.mtn.com/products/rcs-communication
📖
APIReference
https://developers.mtn.com/products/rcs-communication
📖
Documentation
https://developers.mtn.com/products/communication-management-v1
📖
APIReference
https://developers.mtn.com/products/communication-management-v1
📖
Documentation
https://developers.mtn.com/products/tmf681-communication-management
📖
APIReference
https://developers.mtn.com/products/tmf681-communication-management
📖
Documentation
https://developers.mtn.com/products/ayo-preapproval
📖
APIReference
https://developers.mtn.com/products/ayo-preapproval
📖
Documentation
https://developers.mtn.com/products/content-push
📖
APIReference
https://developers.mtn.com/products/content-push
📖
Documentation
https://developers.mtn.com/products/mtn-customer-bill-management
📖
APIReference
https://developers.mtn.com/products/mtn-customer-bill-management
📖
Documentation
https://developers.mtn.com/products/customer-billing-token-v1
📖
APIReference
https://developers.mtn.com/products/customer-billing-token-v1
📖
Documentation
https://developers.mtn.com/products/mtn-nigeria-data-gifting-v1
📖
APIReference
https://developers.mtn.com/products/mtn-nigeria-data-gifting-v1
📖
Documentation
https://developers.mtn.com/products/mtn-nigeria-customer-datashare
📖
APIReference
https://developers.mtn.com/products/mtn-nigeria-customer-datashare
📖
Documentation
https://developers.mtn.com/products/customer-delivery-booking
📖
APIReference
https://developers.mtn.com/products/customer-delivery-booking
📖
Documentation
https://developers.mtn.com/products/customer-identification-v1
📖
APIReference
https://developers.mtn.com/products/customer-identification-v1
📖
Documentation
https://developers.mtn.com/products/kyc-consent
📖
APIReference
https://developers.mtn.com/products/kyc-consent
📖
Documentation
https://developers.mtn.com/products/customer-loyalty-management
📖
APIReference
https://developers.mtn.com/products/customer-loyalty-management
📖
Documentation
https://developers.mtn.com/products/customer-management-coe-za-preprod
📖
APIReference
https://developers.mtn.com/products/customer-management-coe-za-preprod
📖
Documentation
https://developers.mtn.com/products/customer-pin-management-v2
📖
APIReference
https://developers.mtn.com/products/customer-pin-management-v2
📖
Documentation
https://developers.mtn.com/products/customer-promotion
📖
APIReference
https://developers.mtn.com/products/customer-promotion
📖
Documentation
https://developers.mtn.com/products/customer-survey
📖
APIReference
https://developers.mtn.com/products/customer-survey
📖
Documentation
https://developers.mtn.com/products/customer-data-transfer-ng-prod
📖
APIReference
https://developers.mtn.com/products/customer-data-transfer-ng-prod
📖
Documentation
https://developers.mtn.com/products/mtn-customer-datatransfer
📖
APIReference
https://developers.mtn.com/products/mtn-customer-datatransfer
📖
Documentation
https://developers.mtn.com/products/device-swap-v1
📖
APIReference
https://developers.mtn.com/products/device-swap-v1
📖
Documentation
https://developers.mtn.com/products/tmf-720-digital-identity-management
📖
APIReference
https://developers.mtn.com/products/tmf-720-digital-identity-management
📖
Documentation
https://developers.mtn.com/products/digital-partner-management
📖
APIReference
https://developers.mtn.com/products/digital-partner-management
📖
Documentation
https://developers.mtn.com/products/document-managment
📖
APIReference
https://developers.mtn.com/products/document-managment
📖
Documentation
https://developers.mtn.com/products/tmf-document-management-tmf667
📖
APIReference
https://developers.mtn.com/products/tmf-document-management-tmf667
📖
Documentation
https://developers.mtn.com/products/tmf688-event-management
📖
APIReference
https://developers.mtn.com/products/tmf688-event-management
📖
Documentation
https://developers.mtn.com/products/eec-token-management
📖
APIReference
https://developers.mtn.com/products/eec-token-management
📖
Documentation
https://developers.mtn.com/products/insurance
📖
APIReference
https://developers.mtn.com/products/insurance
📖
Documentation
https://developers.mtn.com/products/iot-device-management
📖
APIReference
https://developers.mtn.com/products/iot-device-management
📖
Documentation
https://developers.mtn.com/products/hcm-v1
📖
APIReference
https://developers.mtn.com/products/hcm-v1
📖
Documentation
https://developers.mtn.com/products/logback-v1
📖
APIReference
https://developers.mtn.com/products/logback-v1
📖
Documentation
https://developers.mtn.com/products/tmf-loyalty-management-tmf658
📖
APIReference
https://developers.mtn.com/products/tmf-loyalty-management-tmf658
📖
Documentation
https://developers.mtn.com/products/rcs-capability
📖
APIReference
https://developers.mtn.com/products/rcs-capability
📖
Documentation
https://developers.mtn.com/products/medallia-sms-v2
📖
APIReference
https://developers.mtn.com/products/medallia-sms-v2
📖
Documentation
https://developers.mtn.com/products/advertising-v2
📖
APIReference
https://developers.mtn.com/products/advertising-v2
📖
Documentation
https://developers.mtn.com/products/mtn-advertising-api-v1
📖
APIReference
https://developers.mtn.com/products/mtn-advertising-api-v1
📖
Documentation
https://developers.mtn.com/products/mobile-customer-information
📖
APIReference
https://developers.mtn.com/products/mobile-customer-information
📖
Documentation
https://developers.mtn.com/products/withdrawals-v1
📖
APIReference
https://developers.mtn.com/products/withdrawals-v1
📖
Documentation
https://developers.mtn.com/products/momo-verification
📖
APIReference
https://developers.mtn.com/products/momo-verification
📖
Documentation
https://developers.mtn.com/products/ayoaccountholderinfo
📖
APIReference
https://developers.mtn.com/products/ayoaccountholderinfo
📖
Documentation
https://developers.mtn.com/products/agent-profile
📖
APIReference
https://developers.mtn.com/products/agent-profile
📖
Documentation
https://developers.mtn.com/products/customer-account-management-v1
📖
APIReference
https://developers.mtn.com/products/customer-account-management-v1
📖
Documentation
https://developers.mtn.com/products/mtn-customer-kyc-api-v1-product
📖
APIReference
https://developers.mtn.com/products/mtn-customer-kyc-api-v1-product
📖
Documentation
https://developers.mtn.com/products/customer-kyc-verification
📖
APIReference
https://developers.mtn.com/products/customer-kyc-verification
📖
Documentation
https://developers.mtn.com/products/loans-v2
📖
APIReference
https://developers.mtn.com/products/loans-v2
📖
Documentation
https://developers.mtn.com/products/mtn-customer-locations-api-v1
📖
APIReference
https://developers.mtn.com/products/mtn-customer-locations-api-v1
📖
Documentation
https://developers.mtn.com/products/customer-management
📖
APIReference
https://developers.mtn.com/products/customer-management
📖
Documentation
https://developers.mtn.com/products/mtn-customer-plans-api-v2
📖
APIReference
https://developers.mtn.com/products/mtn-customer-plans-api-v2
📖
Documentation
https://developers.mtn.com/products/mtn-customer-profiles-api-v2-product
📖
APIReference
https://developers.mtn.com/products/mtn-customer-profiles-api-v2-product
📖
Documentation
https://developers.mtn.com/products/risk-management
📖
APIReference
https://developers.mtn.com/products/risk-management
📖
Documentation
https://developers.mtn.com/products/mtn-customer-score
📖
APIReference
https://developers.mtn.com/products/mtn-customer-score
📖
Documentation
https://developers.mtn.com/products/simverification
📖
APIReference
https://developers.mtn.com/products/simverification
📖
Documentation
https://developers.mtn.com/products/mtn-subscription-api-v2
📖
APIReference
https://developers.mtn.com/products/mtn-subscription-api-v2
📖
Documentation
https://developers.mtn.com/products/g2m
📖
APIReference
https://developers.mtn.com/products/g2m
📖
Documentation
https://developers.mtn.com/products/oauth-v1
📖
APIReference
https://developers.mtn.com/products/oauth-v1
📖
Documentation
https://developers.mtn.com/products/merchant-provisioning-v1
📖
APIReference
https://developers.mtn.com/products/merchant-provisioning-v1
📖
Documentation
https://developers.mtn.com/products/mtn-sms-api-v1
📖
APIReference
https://developers.mtn.com/products/mtn-sms-api-v1
📖
Documentation
https://developers.mtn.com/products/ussd
📖
APIReference
https://developers.mtn.com/products/ussd
📖
Documentation
https://developers.mtn.com/products/mtn-product-offering-api-v2
📖
APIReference
https://developers.mtn.com/products/mtn-product-offering-api-v2
📖
Documentation
https://developers.mtn.com/products/mtn-product-offering-api-v3
📖
APIReference
https://developers.mtn.com/products/mtn-product-offering-api-v3
📖
Documentation
https://developers.mtn.com/products/mtn-ng-retailer-productivity-tracking-v1
📖
APIReference
https://developers.mtn.com/products/mtn-ng-retailer-productivity-tracking-v1
📖
Documentation
https://developers.mtn.com/products/tmf633-shopping-cart-management
📖
APIReference
https://developers.mtn.com/products/tmf633-shopping-cart-management
📖
Documentation
https://developers.mtn.com/products/siebel
📖
APIReference
https://developers.mtn.com/products/siebel
📖
Documentation
https://developers.mtn.com/products/tmf-party-management
📖
APIReference
https://developers.mtn.com/products/tmf-party-management
📖
Documentation
https://developers.mtn.com/products/tmf-usage-management-tmf635
📖
APIReference
https://developers.mtn.com/products/tmf-usage-management-tmf635
📖
Documentation
https://developers.mtn.com/products/usage-management
📖
APIReference
https://developers.mtn.com/products/usage-management
📖
Documentation
https://developers.mtn.com/products/mtnid-getinfo
📖
APIReference
https://developers.mtn.com/products/mtnid-getinfo
📖
Documentation
https://developers.mtn.com/products/notification-production
📖
APIReference
https://developers.mtn.com/products/notification-production
📖
Documentation
https://developers.mtn.com/products/notification-v2
📖
APIReference
https://developers.mtn.com/products/notification-v2
📖
Documentation
https://developers.mtn.com/products/order-fulfillment
📖
APIReference
https://developers.mtn.com/products/order-fulfillment
📖
Documentation
https://developers.mtn.com/products/tmf-party-interaction-tmf683
📖
APIReference
https://developers.mtn.com/products/tmf-party-interaction-tmf683
📖
Documentation
https://developers.mtn.com/products/mtn-party-management
📖
APIReference
https://developers.mtn.com/products/mtn-party-management
📖
Documentation
https://developers.mtn.com/products/rwanda-party-management
📖
APIReference
https://developers.mtn.com/products/rwanda-party-management
📖
Documentation
https://developers.mtn.com/products/payment-methods-management-sa
📖
APIReference
https://developers.mtn.com/products/payment-methods-management-sa
📖
Documentation
https://developers.mtn.com/products/payments-v1
📖
APIReference
https://developers.mtn.com/products/payments-v1
📖
Documentation
https://developers.mtn.com/products/tmf-prepay-balance-management-tmf654
📖
APIReference
https://developers.mtn.com/products/tmf-prepay-balance-management-tmf654
📖
Documentation
https://developers.mtn.com/products/product-catalog-coe
📖
APIReference
https://developers.mtn.com/products/product-catalog-coe
📖
Documentation
https://developers.mtn.com/products/product-catalog-management-v1
📖
APIReference
https://developers.mtn.com/products/product-catalog-management-v1
📖
Documentation
https://developers.mtn.com/products/product-catalogue-management
📖
APIReference
https://developers.mtn.com/products/product-catalogue-management
📖
Documentation
https://developers.mtn.com/products/tmf-product-catalog-tmf620
📖
APIReference
https://developers.mtn.com/products/tmf-product-catalog-tmf620
📖
Documentation
https://developers.mtn.com/products/product-ordering-coe
📖
APIReference
https://developers.mtn.com/products/product-ordering-coe
📖
Documentation
https://developers.mtn.com/products/tmf-product-ordering-tmf622
📖
APIReference
https://developers.mtn.com/products/tmf-product-ordering-tmf622
📖
Documentation
https://developers.mtn.com/products/resource-config-v1
📖
APIReference
https://developers.mtn.com/products/resource-config-v1
📖
Documentation
https://developers.mtn.com/products/tmf-resource-ordering-tmf652
📖
APIReference
https://developers.mtn.com/products/tmf-resource-ordering-tmf652
📖
Documentation
https://developers.mtn.com/products/tmf-service-activation-tmf678
📖
APIReference
https://developers.mtn.com/products/tmf-service-activation-tmf678
📖
Documentation
https://developers.mtn.com/products/job-card-management
📖
APIReference
https://developers.mtn.com/products/job-card-management
📖
Documentation
https://developers.mtn.com/products/ticket
📖
APIReference
https://developers.mtn.com/products/ticket
📖
Documentation
https://developers.mtn.com/products/mtn-sms-interface
📖
APIReference
https://developers.mtn.com/products/mtn-sms-interface
📖
Documentation
https://developers.mtn.com/products/sms-v3-api
📖
APIReference
https://developers.mtn.com/products/sms-v3-api
📖
Documentation
https://developers.mtn.com/products/sim-management-staging
📖
APIReference
https://developers.mtn.com/products/sim-management-staging
📖
Documentation
https://developers.mtn.com/products/sim-swap-verification-v1
📖
APIReference
https://developers.mtn.com/products/sim-swap-verification-v1
📖
Documentation
https://developers.mtn.com/products/subscriber-management
📖
APIReference
https://developers.mtn.com/products/subscriber-management
📖
Documentation
https://developers.mtn.com/products/taxation-v1
📖
APIReference
https://developers.mtn.com/products/taxation-v1
📖
Documentation
https://developers.mtn.com/products/tmf-trouble-ticket-tmf621
📖
APIReference
https://developers.mtn.com/products/tmf-trouble-ticket-tmf621
📖
Documentation
https://developers.mtn.com/products/tmf629-customer-management
📖
APIReference
https://developers.mtn.com/products/tmf629-customer-management
📖
Documentation
https://developers.mtn.com/products/tmf637-product-inventory
📖
APIReference
https://developers.mtn.com/products/tmf637-product-inventory
📖
Documentation
https://developers.mtn.com/products/account-management-coe
📖
APIReference
https://developers.mtn.com/products/account-management-coe
📖
Documentation
https://developers.mtn.com/products/tmf-payment-management-tmf676
📖
APIReference
https://developers.mtn.com/products/tmf-payment-management-tmf676
📖
Documentation
https://developers.mtn.com/products/resource-pool-management
📖
APIReference
https://developers.mtn.com/products/resource-pool-management
📖
Documentation
https://developers.mtn.com/products/tmf-usage-consumption-tmf677
📖
APIReference
https://developers.mtn.com/products/tmf-usage-consumption-tmf677
📖
Documentation
https://developers.mtn.com/products/usage-consumption
📖
APIReference
https://developers.mtn.com/products/usage-consumption

Specifications

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/mtn-group-organizations-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

mtn-group-organizations-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Digital Identity Management Organizations API
  description: '## TMF API Reference: TMF720 - Digital Identity Management


    Digital Identity Management API goal is to provide the ability to manage a digital identity. This digital identity allows to identify an individual, a resource, or a partyRole (a specific role - or set of roles - for a given individual). A digital identity is associated with credential/authentification method.'
  version: 4.0.0
servers:
- url: https://serverRoot/tmf-api/digitalIdentityManagement/v4/
security:
- ApiKeyAuth: []
- OAuth2: []
tags:
- name: Organizations
paths:
  /organizations/{id}/invitations:
    post:
      tags:
      - Organizations
      summary: Create invitations to organization
      description: Creates an invitation for a user to join an organization.
      parameters:
      - name: transactionId
        in: header
        description: Unique ID of the transaction.
        required: false
        schema:
          type: string
      - name: bearerToken
        description: Bearer token for Auth0 authentication
        required: true
        in: query
        schema:
          type: string
      - name: id
        in: path
        description: The ID of the organization.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Invitation created
          content:
            application/json;charset=utf-8:
              schema:
                $ref: '#/components/schemas/InvitationRespObject'
        '400':
          description: Bad Request
          content:
            application/json;charset=utf-8:
              schema:
                $ref: '#/components/schemas/Error400'
        '401':
          description: Unauthorized
          content:
            application/json;charset=utf-8:
              schema:
                $ref: '#/components/schemas/Error401'
        '404':
          description: Not Found
          content:
            application/json;charset=utf-8:
              schema:
                $ref: '#/components/schemas/Error404'
        '405':
          description: Method Not allowed
          content:
            application/json;charset=utf-8:
              schema:
                $ref: '#/components/schemas/Error405'
        '500':
          description: Internal Server Error
          content:
            application/json;charset=utf-8:
              schema:
                $ref: '#/components/schemas/Error500'
      requestBody:
        content:
          application/json;charset=utf-8:
            schema:
              $ref: '#/components/schemas/InvitationReqObject'
        required: true
    get:
      tags:
      - Organizations
      summary: Get all invitations to organization
      description: Retrieves all invitations to an organization.
      parameters:
      - name: transactionId
        in: header
        description: Unique ID of the transaction.
        required: false
        schema:
          type: string
      - name: bearerToken
        description: Bearer token for Auth0 authentication
        required: true
        in: query
        schema:
          type: string
      - name: id
        in: path
        description: The ID of the organization.
        required: true
        schema:
          type: string
      - name: page
        in: query
        description: Page index of the results to return. First page is 0.
        required: false
        schema:
          type: string
      - name: per_page
        in: query
        description: Number of results per page. Defaults to 50.
        required: false
        schema:
          type: string
      - name: totals
        in: query
        description: If true, the query response will include the total number of items that match the query.
        required: false
        schema:
          type: boolean
      - name: fields
        in: query
        description: A comma-separated list of fields to include or exclude from the result (depending on the value of `include_fields`). Eg. "id,name". Leave empty to retrieve all fields.
        required: false
        schema:
          type: string
      - name: include_fields
        in: query
        description: Whether the fields specified are to be included in the result, defaults to true.
        required: false
        schema:
          type: boolean
      - name: sort
        in: query
        description: The field to sort the results by.
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            application/json;charset=utf-8:
              schema:
                $ref: '#/components/schemas/InvitationRespObject'
        '400':
          description: Bad Request
          content:
            application/json;charset=utf-8:
              schema:
                $ref: '#/components/schemas/Error400'
        '401':
          description: Unauthorized
          content:
            application/json;charset=utf-8:
              schema:
                $ref: '#/components/schemas/Error401'
        '404':
          description: Not Found
          content:
            application/json;charset=utf-8:
              schema:
                $ref: '#/components/schemas/Error404'
        '405':
          description: Method Not allowed
          content:
            application/json;charset=utf-8:
              schema:
                $ref: '#/components/schemas/Error405'
        '500':
          description: Internal Server Error
          content:
            application/json;charset=utf-8:
              schema:
                $ref: '#/components/schemas/Error500'
  /organizations/{id}/invitations/{invitationId}:
    delete:
      tags:
      - Organizations
      summary: Delete invitations by Invitation ID
      description: Delete invitations by Invitation ID
      parameters:
      - name: transactionId
        in: header
        description: Unique ID of the transaction.
        required: false
        schema:
          type: string
      - name: bearerToken
        description: Bearer token for Auth0 authentication
        required: true
        in: query
        schema:
          type: string
      - name: id
        in: path
        description: The ID of the organization.
        required: true
        schema:
          type: string
      - name: invitationId
        in: path
        description: The invitation ID that needs to be deleted
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Invitation Deleted
          content:
            application/json;charset=utf-8:
              schema:
                $ref: '#/components/schemas/SendInvitaionResponse'
        '400':
          description: Bad Request
          content:
            application/json;charset=utf-8:
              schema:
                $ref: '#/components/schemas/Error400'
        '401':
          description: Unauthorized
          content:
            application/json;charset=utf-8:
              schema:
                $ref: '#/components/schemas/Error401'
        '404':
          description: Not Found
          content:
            application/json;charset=utf-8:
              schema:
                $ref: '#/components/schemas/Error404'
        '405':
          description: Method Not allowed
          content:
            application/json;charset=utf-8:
              schema:
                $ref: '#/components/schemas/Error405'
        '500':
          description: Internal Server Error
          content:
            application/json;charset=utf-8:
              schema:
                $ref: '#/components/schemas/Error500'
  /organizations/{id}/members/roles/{userId}:
    post:
      summary: Assign one or more roles to a member of an organization
      tags:
      - Organizations
      description: This endpoint assigns one or more roles to a member of an organization.
      parameters:
      - name: id
        in: path
        description: The ID of the organization.
        required: true
        schema:
          type: string
      - name: userId
        in: path
        description: The ID of the user.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Roles successfully associated with user
          content:
            application/json;charset=utf-8:
              schema:
                $ref: '#/components/schemas/SendInvitaionResponse'
        '400':
          description: Bad Request
          content:
            application/json;charset=utf-8:
              schema:
                $ref: '#/components/schemas/Error400'
        '401':
          description: Unauthorized
          content:
            application/json;charset=utf-8:
              schema:
                $ref: '#/components/schemas/Error401'
        '404':
          description: Not Found
          content:
            application/json;charset=utf-8:
              schema:
                $ref: '#/components/schemas/Error404'
        '405':
          description: Method Not allowed
          content:
            application/json;charset=utf-8:
              schema:
                $ref: '#/components/schemas/Error405'
        '500':
          description: Internal Server Error
          content:
            application/json;charset=utf-8:
              schema:
                $ref: '#/components/schemas/Error500'
      requestBody:
        content:
          application/json;charset=utf-8:
            schema:
              $ref: '#/components/schemas/RoleRequest'
        required: true
    delete:
      summary: Remove one or more roles from a given user in the context of the provided organization
      tags:
      - Organizations
      description: This endpoint deletes one or more roles of a member in an organization.
      parameters:
      - name: id
        in: path
        description: The ID of the organization.
        required: true
        schema:
          type: string
      - name: userId
        in: path
        description: The ID of the user.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Roles successfully deleted from user
          content:
            application/json;charset=utf-8:
              schema:
                $ref: '#/components/schemas/SendInvitaionResponse'
        '400':
          description: Bad Request
          content:
            application/json;charset=utf-8:
              schema:
                $ref: '#/components/schemas/Error400'
        '401':
          description: Unauthorized
          content:
            application/json;charset=utf-8:
              schema:
                $ref: '#/components/schemas/Error401'
        '404':
          description: Not Found
          content:
            application/json;charset=utf-8:
              schema:
                $ref: '#/components/schemas/Error404'
        '405':
          description: Method Not allowed
          content:
            application/json;charset=utf-8:
              schema:
                $ref: '#/components/schemas/Error405'
        '500':
          description: Internal Server Error
          content:
            application/json;charset=utf-8:
              schema:
                $ref: '#/components/schemas/Error500'
      requestBody:
        content:
          application/json;charset=utf-8:
            schema:
              $ref: '#/components/schemas/RoleRequest'
        required: true
components:
  schemas:
    MTNIDOrgAppMetadataObject:
      type: object
      additionalProperties: false
      properties:
        orgInvite:
          type: object
          properties:
            accountAlreadyExists:
              type: boolean
              description: true if "Search Users by Email" API returned a user and false if it did not
            profileUpdateRequired:
              type: boolean
              example: true
            profileUpdated:
              type: boolean
              example: false
            profile:
              type: object
              properties:
                givenName:
                  type: string
                  example: given_name
                familyName:
                  type: string
                  example: family_name
                name:
                  type: string
                  example: name
        dpoMetadata:
          type: object
          allOf:
          - $ref: '#/components/schemas/DPOMetadataObject'
    Error404:
      properties:
        status:
          type: integer
          description: Status code from target system to indicate transaction status
          example: 404
        message:
          type: string
          description: details
          example: no match found
    RoleRequest:
      properties:
        roles:
          type: array
          items:
            type: string
            example:
            - rol_123
            - rol_456
    Error400:
      properties:
        statusCode:
          type: integer
          description: Status code from target system to indicate transaction status
        statusMessage:
          type: string
          description: Status message from target system to indicate transaction status.
        supportMessage:
          type: string
          description: detail message from target system to indicate transaction status.
        transactionId:
          type: string
          description: This is the same transactionId that is sent in the request
    InvitationRespObject:
      type: object
      properties:
        statusCode:
          type: integer
          description: Status code from target system to indicate transaction status
        statusMessage:
          type: string
          description: Status message from target system to indicate transaction status.
        supportMessage:
          type: string
          description: Any additional message from backend
        transactionId:
          type: string
          description: This is the same transactionId that is sent in the request
        data:
          type: array
          items:
            properties:
              id:
                type: string
                description: The ID of the invitation.
                example: uinv_Z6a66ldcD64NmjMu
              organizationId:
                type: string
                description: The ID of the organization.
              roles:
                type: array
                items:
                  type: string
              invitationUrl:
                type: string
                description: The invitation url to be send to the invitee.
                format: strict-https-uri
                example: https://app.mtn.com/login?invitation=XuVv8ywghwfX2hzl6cwLZncxI98lI2kV&organization={{AUTH0_ORG_ID}}&organization_name={{AUTH0_ORG_NAME}}
              createdAt:
                type: string
                format: date-time
                description: The ISO 8601 formatted timestamp representing the creation time of the invitation.
              expiresAt:
                type: string
                format: date-time
                description: The ISO 8601 formatted timestamp representing the expiration time of the invitation.
              ticketId:
                type: string
                description: The id of the invitation ticket.
                example: XuVv8ywghwfX2hzl6cwLZncxI98lI2kV
              invitation:
                type: object
                allOf:
                - $ref: '#/components/schemas/InvitationObject'
    InvitationReqObject:
      additionalProperties: false
      allOf:
      - $ref: '#/components/schemas/InvitationObject'
      - type: object
        properties:
          sendInvitationEmail:
            type: boolean
            description: Whether the user will receive an invitation email (true) or no email (false), true by default
            example: true
          ttlSec:
            type: integer
            description: 'Number of seconds for which the invitation is valid before expiration. If unspecified or set to 0, this value defaults to 604800 seconds (7 days). Max value: 2592000 seconds (30 days).

              '
            example: 86400
          roles:
            type: array
            description: List of roles IDs to associated with the user.
            items:
              type: string
            example:
            - rol_123
    Error401:
      properties:
        error:
          type: string
          description: error message from target system to indicate transaction status.
          example: missing_authorization
        error_description:
          type: string
          description: detailed error message from target system to indicate transaction status.
          example: Missing Authorization header
    Error405:
      properties:
        timestamp:
          type: string
          format: date-time
          description: Timestamp that the error occurred
          example: '2021-07-21T17:32:28Z'
        status:
          type: integer
          description: Status code from target system to indicate transaction status
          example: 405
        error:
          type: string
          description: error message
          example: Method Not Allowed
        message:
          type: string
          description: details
        path:
          type: string
          description: The path that caused the error
    InvitationObject:
      type: object
      properties:
        invitee:
          type: object
          description: The user being invited.
          properties:
            email:
              type: string
              format: email
              description: The email address of the user being invited.
        inviter:
          type: object
          description: The user sending the invitation.
          properties:
            name:
              type: string
              minLength: 1
              maxLength: 300
              description: The name of the user sending the invitation.
        clientId:
          type: string
          description: The ID of the client (application) for which the invitation is being sent.
        connectionId:
          type: string
          description: The ID of the connection to use for the invitation.
        appMetadata:
          type: object
          description: Metadata associated with the user that impacts the user's core functionality and is editable by the application but not the user
          allOf:
          - $ref: '#/components/schemas/InvitationReqAppMetadataObject'
        userMetadata:
          type: object
          description: Metadata related to the user.
        ttlSec:
          type: integer
          description: 'Number of seconds for which the invitation is valid before expiration. If unspecified or set to 0, this value defaults to 604800 seconds (7 days). Max value: 2592000 seconds (30 days).

            '
          example: 86400
        roles:
          type: array
          description: List of roles IDs to associated with the user.
          items:
            type: string
          example:
          - rol_123
        sendInvitationEmail:
          type: boolean
          description: Whether the user will receive an invitation email (true) or no email (false), true by default
          example: true
      required:
      - invitee
      - inviter
      - clientId
    Error500:
      properties:
        statusMessage:
          type: string
          description: More details and corrective actions related to the error which can be shown to a client
          example: Internal Server Error
        statusCode:
          type: string
          description: This is the MADAPI Canonical Error Code (it is 4 characters long and it is not the HTTP Status Code which is 3 characters long). Back-end system errors are mapped to specific canonical error codes which are returned. More information on these mappings can be found on the MADAPI Confluence Page 'Response Codes'
          example: '3001'
    InvitationReqAppMetadataObject:
      type: object
      allOf:
      - $ref: '#/components/schemas/MTNIDOrgAppMetadataObject'
    DPOMetadataObject:
      type: object
      additionalProperties: false
      properties:
        services:
          type: array
          items:
            type: object
            properties:
              asset:
                type: string
                example: partner
              assetId:
                type: string
                description: Permanent or temporary Partner ID
                example: '23456'
              roles:
                type: array
                items:
                  type: string
                  example: Admin
              metadata:
                type: object
                properties:
                  tempId:
                    type: string
                    description: Temporary Partner ID
                    example: '56353'
                  status:
                    type: string
                    example: Enabled
                  termsAccepted:
                    type: boolean
                    description: Whether the terms have been accepted
                    example: false
    SendInvitaionResponse:
      properties:
        statusCode:
          type: integer
          description: Status code from target system to indicate transaction status
        statusMessage:
          type: string
          description: Status message from target system to indicate transaction status.
        supportMessage:
          type: string
          description: detail message from target system to indicate transaction status.
        transactionId:
          type: string
          description: This is the same transactionId that is sent in the request
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      name: X-API-Key
      in: header
    OAuth2:
      type: oauth2
      flows:
        clientCredentials:
          scopes: {}
          tokenUrl: https://api.mtn.com/v1/oauth/access_token