{
  "components": {
    "securitySchemes": {
      "accountSid_authToken": {
        "scheme": "basic",
        "type": "http"
      },
      "access_token_bearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "access_token"
      }
    },
    "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"
          }
        }
      },
      "EncryptionKeyRequest": {
        "type": "object",
        "properties": {
          "owner_id": {
            "type": "string",
            "description": "The ID of the owner requesting the encryption key."
          },
          "namespace": {
            "type": "string",
            "description": "The namespace for the encryption key."
          }
        },
        "required": [
          "owner_id",
          "namespace"
        ]
      },
      "EncryptionKeyResponse": {
        "type": "object",
        "properties": {
          "sid": {
            "type": "string",
            "description": "The unique identifier for the encryption key."
          },
          "friendlyName": {
            "type": "string",
            "description": "A user-friendly name for the encryption key."
          },
          "ownerId": {
            "type": "string",
            "description": "The ID of the owner of the encryption key."
          },
          "namespace": {
            "type": "string",
            "description": "The namespace associated with the encryption key."
          },
          "version": {
            "type": "integer",
            "description": "The version of the encryption key."
          },
          "status": {
            "type": "integer",
            "description": "The status of the encryption key (e.g., active or inactive)."
          },
          "key": {
            "type": "string",
            "format": "byte",
            "description": "The encryption key in byte format."
          },
          "dateCreated": {
            "type": "string",
            "format": "date-time",
            "description": "The timestamp when the encryption key was created."
          },
          "dateUpdated": {
            "type": "string",
            "format": "date-time",
            "description": "The timestamp when the encryption key was last updated."
          }
        },
        "required": [
          "sid",
          "ownerId",
          "namespace",
          "version",
          "status",
          "key",
          "dateCreated",
          "dateUpdated"
        ]
      },
      "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",
            "format": "int32"
          },
          "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
          }
        }
      },
      "iam.v2.counter_response": {
        "type": "object",
        "properties": {
          "accountSid": {
            "type": "string",
            "pattern": "^AC[0-9a-fA-F]{32}$",
            "nullable": true
          },
          "counterKey": {
            "type": "string",
            "nullable": true
          },
          "maxQuota": {
            "type": "integer",
            "minimum": 0,
            "nullable": true
          },
          "dailyThroughputQuota": {
            "type": "integer",
            "minimum": 0,
            "nullable": true
          },
          "totalUsed": {
            "type": "integer",
            "description": "The total amount used against the quota",
            "minimum": 0
          },
          "dailyThroughputUsed": {
            "type": "integer",
            "minimum": 0,
            "nullable": true
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "description": "The timestamp when the counter expires"
          },
          "lastUpdatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "The timestamp when the counter was last updated"
          }
        }
      },
      "iam.v2.counter_list_response": {
        "type": "object",
        "properties": {
          "counters": {
            "type": "array",
            "description": "List of counters",
            "items": {
              "$ref": "#/components/schemas/iam.v2.counter_response"
            }
          }
        }
      }
    }
  },
  "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"
      }
    },
    "/v2/EncryptionKeys": {
      "servers": [
        {
          "url": "https://iam.twilio.com"
        }
      ]
    },
    "/v2/EncryptionKeys/{encryptionKeySid}/deactivate": {
      "servers": [
        {
          "url": "https://iam.twilio.com"
        }
      ]
    },
    "/v2/EncryptionKeys/{encryptionKeySid}": {
      "servers": [
        {
          "url": "https://iam.twilio.com"
        }
      ]
    },
    "/v2/Entitlements/Accounts/{accountSid}/Counters": {
      "servers": [
        {
          "url": "https://iam.twilio.com"
        }
      ]
    },
    "/v2/Entitlements/Accounts/{accountSid}/Counters/{counterKey}": {
      "servers": [
        {
          "url": "https://iam.twilio.com"
        }
      ]
    }
  },
  "servers": [
    {
      "url": "https://iam.twilio.com"
    }
  ],
  "tags": [
    {
      "name": "IamV2Authenticate"
    },
    {
      "name": "IamV2Initiate"
    },
    {
      "name": "IamV2RefreshToken"
    },
    {
      "name": "IamV2RoleAssignment"
    },
    {
      "name": "IamV2ValidateToken"
    },
    {
      "name": "IamV2Version"
    }
  ],
  "security": [
    {
      "accountSid_authToken": []
    }
  ]
}