components:
  securitySchemes:
    accountSid_authToken:
      scheme: basic
      type: http
  schemas:
    AddDeviceAndSendChallengeRequest:
      type: object
      properties:
        challengeMethod:
          type: string
        phoneNumber:
          type: string
        token:
          type: string
      required:
      - challengeMethod
      - phoneNumber
      - token
    VerifyDeviceRequest:
      type: object
      properties:
        code:
          type: string
        state:
          type: string
        token:
          type: string
      required:
      - code
      - state
      - token
    JWTTokenRequest:
      type: object
      properties:
        token:
          type: string
      required:
      - token
    TwilioServiceErrorResponse:
      type: object
      properties:
        code:
          description: Twilio-specific error code
          type: integer
          format: int32
        message:
          description: Error message
          type: string
        params:
          description: Additional error parameters
          type: object
        more_info:
          description: Link to Error Code References
          type: string
        status:
          description: HTTP response status code
          type: integer
          format: int32
    ValidateIdentityRequest:
      type: object
      properties:
        token:
          type: string
      required:
      - token
    Validate2FAResetTokenRequest:
      type: object
      properties:
        token:
          type: string
      required:
      - token
    ValidateMfaResetBillingInfoRequest:
      type: object
      properties:
        accountSid:
          type: string
        billedAmount:
          type: integer
        billedDate:
          type: string
        countryCode:
          type: string
        creditCardHolderName:
          type: string
        currency:
          type: string
        lastFourDigitsOfCreditCard:
          type: string
        paymentMethod:
          type: string
        paypalAccountEmail:
          type: string
        phoneNumber:
          type: string
        token:
          type: string
      required:
      - accountSid
      - countryCode
      - paymentMethod
      - phoneNumber
      - token
    VerifyEmailResendRequest:
      type: object
      properties:
        state:
          type: string
      required:
      - state
    VerifyEmailVerifyRequest:
      type: object
      properties:
        code:
          type: string
        state:
          type: string
      required:
      - code
      - state
    VerifyEmailVerifyResponse:
      type: object
      properties:
        redirectUri:
          type: string
    VerifyEmailInitiateRequest:
      type: object
      properties:
        state:
          type: string
        token:
          type: string
      required:
      - state
      - token
    VerifyEmailInitiateResponse:
      type: object
      properties:
        emailAddress:
          type: string
        notificationSid:
          type: object
    iam.v2.create_permission_request:
      type: object
      properties:
        iam_permission_sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^IZ[0-9a-fA-F]{32}$
          nullable: true
        namespace:
          type: string
        product:
          type: string
        name:
          type: string
        action:
          type: string
        grants:
          type: array
          items:
            type: object
            properties:
              action:
                type: string
              resource:
                type: string
              categories:
                type: array
                items:
                  type: string
                  enum:
                  - API
                  - CONSOLE
                  - FLEXUI
                  - ONEADMIN
                  - AION
                  - OAUTH
                  - MONKEY
                  - NONE
          nullable: true
        type:
          type: integer
          nullable: true
        created_by:
          type: string
          nullable: true
        external_description:
          type: string
          nullable: true
        internal_description:
          type: string
          nullable: true
        risk_score:
          type: string
          nullable: true
    iam.v2.update_permission_request:
      type: object
      properties:
        grants:
          type: array
          items:
            type: object
            properties:
              action:
                type: string
              resource:
                type: string
              categories:
                type: array
                items:
                  type: string
                  enum:
                  - API
                  - CONSOLE
                  - FLEXUI
                  - ONEADMIN
                  - AION
                  - OAUTH
                  - MONKEY
                  - NONE
          nullable: false
        type:
          type: integer
          nullable: true
        external_description:
          type: string
          nullable: false
        internal_description:
          type: string
          nullable: false
        risk_score:
          type: string
          enum:
          - LOW
          - MEDIUM
          - HIGH
          nullable: true
    iam.v2.create_role_request:
      type: object
      properties:
        iam_role_sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^IX[0-9a-fA-F]{32}$
          nullable: true
        role_id:
          type: string
          nullable: true
        owner:
          type: string
          nullable: true
        friendly_name:
          type: string
          nullable: true
        lowest_level:
          type: string
          nullable: true
        type:
          type: integer
          nullable: true
        product_group:
          type: string
          nullable: true
        external_description:
          type: string
          nullable: true
        internal_description:
          type: string
          nullable: true
        policy:
          nullable: true
          type: object
          properties:
            format:
              type: integer
              nullable: true
            allow:
              type: array
              items:
                type: string
            deny:
              type: array
              items:
                type: string
    iam.v2.update_role_request:
      type: object
      properties:
        friendly_name:
          type: string
          nullable: true
        product_group:
          type: string
          nullable: true
        external_description:
          type: string
          nullable: true
        internal_description:
          type: string
          nullable: true
        policy:
          nullable: true
          type: object
          properties:
            format:
              type: integer
              nullable: true
            allow:
              type: array
              items:
                type: string
            deny:
              type: array
              items:
                type: string
    role_enum_scope_type:
      type: string
      enum:
      - ORGANIZATION
      - ACCOUNT
      - SUB_ACCOUNT
    iam.v2.twilio_service_error_response:
      type: object
      properties:
        code:
          type: integer
          format: int32
        message:
          type: string
        more_info:
          type: string
        status:
          type: integer
        params:
          type: object
    iam.v2.create_resource_request:
      type: object
      properties:
        namespace:
          type: string
        product:
          type: string
        name:
          type: string
        description:
          type: string
          nullable: true
    iam.v2.resources:
      type: object
      properties:
        date_created:
          type: string
          format: date-time
          nullable: true
        date_updated:
          type: string
          format: date-time
          nullable: true
        sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^IQ[0-9a-fA-F]{32}$
          nullable: true
        namespace:
          type: string
        product:
          type: string
        name:
          type: string
        description:
          type: string
          nullable: true
        team:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
info:
  title: Twilio - Iam
  description: This is the public Twilio REST API.
  termsOfService: https://www.twilio.com/legal/tos
  contact:
    name: Twilio Support
    url: https://support.twilio.com
    email: support@twilio.com
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.0.0
openapi: 3.0.1
paths:
  /v2/mfa/challenge/sms: {}
  /v2/mfa/device/add: {}
  /v2/mfa/challenge/voice: {}
  /v2/mfa/device/verify: {}
  /v2/mfa/validate: {}
  /v2/auth0/mfa-reset/validateBillingInformation: {}
  /v2/auth0/mfa-reset/validateIdentity: {}
  /v2/auth0/mfa-reset/validateToken: {}
  /v2/auth0/email-verification/initiate: {}
  /v2/auth0/email-verification/{notificationSid}/resend: {}
  /v2/auth0/email-verification/{notificationSid}/verify: {}
  /v2/internal/RoleAssignments:
    servers:
    - url: https://iam.twilio.com
    description: ''
    x-twilio:
      defaultOutputProperties: []
      pathType: list
servers:
- url: https://iam.twilio.com
tags:
- name: IamV2Authenticate
- name: IamV2Initiate
- name: IamV2RefreshToken
- name: IamV2RoleAssignment
- name: IamV2ValidateToken
- name: IamV2Version
security:
- accountSid_authToken: []
