{ "components": { "securitySchemes": { "accountSid_authToken": { "scheme": "basic", "type": "http" }, "access_token_bearer": { "type": "http", "scheme": "bearer", "bearerFormat": "access_token" }, "m2mOauth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "M2M Access Token" } }, "schemas": { "accounts_enum_status": { "type": "string", "enum": [ "active", "suspended", "closed" ] }, "accounts_enum_type": { "type": "string", "enum": [ "Trial", "Full" ] }, "iam.v1.get_keys": { "type": "object", "properties": { "sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^SK[0-9a-fA-F]{32}$", "nullable": true, "description": "The unique string that we created to identify the Key resource." }, "friendly_name": { "type": "string", "nullable": true, "description": "The string that you assigned to describe the resource." }, "date_created": { "type": "string", "format": "date-time-rfc-2822", "nullable": true, "description": "The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format." }, "date_updated": { "type": "string", "format": "date-time-rfc-2822", "nullable": true, "description": "The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format." }, "flags": { "type": "array", "items": { "type": "string" } } } }, "iam.v1.key": { "type": "object", "properties": { "sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^SK[0-9a-fA-F]{32}$", "nullable": true, "description": "The unique string that we created to identify the Key resource." }, "friendly_name": { "type": "string", "nullable": true, "description": "The string that you assigned to describe the resource.", "x-twilio": { "pii": { "handling": "standard", "deleteSla": 30 } } }, "date_created": { "type": "string", "format": "date-time-rfc-2822", "nullable": true, "description": "The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format." }, "date_updated": { "type": "string", "format": "date-time-rfc-2822", "nullable": true, "description": "The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format." }, "policy": { "nullable": true, "type": "object", "description": "The \\`Policy\\` object is a collection that specifies the allowed Twilio permissions for the restricted key.\nFor more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys)." } } }, "iam.v1.new_key": { "type": "object", "properties": { "sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^SK[0-9a-fA-F]{32}$", "nullable": true, "description": "The unique string that that we created to identify the NewKey resource. You will use this as the basic-auth `user` when authenticating to the API." }, "friendly_name": { "type": "string", "nullable": true, "description": "The string that you assigned to describe the resource.", "x-twilio": { "pii": { "handling": "standard", "deleteSla": 30 } } }, "date_created": { "type": "string", "format": "date-time-rfc-2822", "nullable": true, "description": "The date and time in GMT that the API Key was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format." }, "date_updated": { "type": "string", "format": "date-time-rfc-2822", "nullable": true, "description": "The date and time in GMT that the new API Key was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format." }, "secret": { "type": "string", "nullable": true, "description": "The secret your application uses to sign Access Tokens and to authenticate to the REST API (you will use this as the basic-auth `password`). **Note that for security reasons, this field is ONLY returned when the API Key is first created.**" }, "policy": { "nullable": true, "type": "object", "description": "Collection of allow assertions." } } }, "role_enum_scope_type": { "type": "string", "enum": [ "ORGANIZATION", "ACCOUNT", "SUB_ACCOUNT", "RESOURCE" ] }, "iam.v1.role_permission": { "type": "object", "properties": { "sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IZ[0-9a-fA-F]{32}$", "nullable": true, "description": "The unique string that identifies the Permission resource." }, "namespace": { "type": "string", "nullable": true, "description": "The namespace of the permission (e.g., twilio)." }, "product": { "type": "string", "nullable": true, "description": "The product the permission belongs to (e.g., iam)." }, "resource": { "type": "string", "nullable": true, "description": "The resource the permission applies to (e.g., roles)." }, "action": { "type": "string", "nullable": true, "description": "The action granted by the permission (e.g., read)." }, "externalDescription": { "type": "string", "nullable": true, "description": "The external description of the permission." } } }, "oauth.v1.token": { "type": "object", "properties": { "access_token": { "type": "string", "nullable": true, "description": "Token which carries the necessary information to access a Twilio resource directly." }, "refresh_token": { "type": "string", "nullable": true, "description": "Token which carries the information necessary to get a new access token." }, "id_token": { "type": "string", "nullable": true, "description": "Token which carries the information necessary of user profile." }, "token_type": { "type": "string", "nullable": true, "description": "Token type" }, "expires_in": { "type": "integer", "format": "int64", "nullable": true } } }, "iam.v1.account_search_account": { "type": "object", "properties": { "accountSid": { "type": "string", "nullable": true }, "accountPath": { "type": "string", "nullable": true }, "status": { "type": "integer", "default": 0 }, "dormant": { "type": "boolean", "nullable": true }, "trial": { "type": "boolean", "nullable": true }, "memberPlatform": { "type": "string", "nullable": true }, "friendlyName": { "type": "string", "nullable": true }, "subaccount": { "type": "boolean", "nullable": true } } }, "iam.v1.account_search_list_meta": { "type": "object", "properties": { "previousToken": { "type": "string", "nullable": true }, "nextToken": { "type": "string", "nullable": true }, "pageSize": { "type": "integer", "default": 0 }, "totalPages": { "type": "integer", "default": 0 }, "totalResults": { "type": "integer", "default": 0 } } }, "iam.v1.account_search_role_response": { "type": "array", "items": { "type": "object", "properties": { "roleSid": { "type": "string" }, "friendlyName": { "type": "string", "nullable": true }, "description": { "type": "string", "nullable": true } } } }, "iam.v1.account_search_request": { "type": "object", "properties": { "searchString": { "type": "string", "nullable": true }, "parentAccountId": { "type": "string", "nullable": true }, "status": { "type": "array", "items": { "type": "integer" }, "nullable": true }, "dormant": { "type": "boolean", "nullable": true }, "trial": { "type": "boolean", "nullable": true }, "subaccount": { "type": "boolean", "nullable": true } } }, "iam.v1.account_stats_response": { "type": "object", "properties": { "numberOfAccounts": { "type": "integer", "default": 0 } } }, "iam.v1.Organization": { "type": "object", "properties": { "organizationSid": { "pattern": "OR[0-9a-f]{32}", "type": "string", "format": "OrganizationSid", "example": "OR33f4f3aa6fffe840d000f8ef22e883db", "description": "Unique Twilio organization sid" }, "friendlyName": { "type": "string", "description": "Organization friendly name" }, "domainSignupType": { "type": "string", "enum": [ "INVITATION_ONLY", "AUTO_MEMBERSHIP", "NO_MEMBERSHIP" ], "description": "User sign-up type for Organization domains" }, "dateCreated": { "type": "string", "format": "date-time", "description": "Creation date of the organization" } } }, "iam.v1.OrganizationToJoin": { "type": "object", "properties": { "organizationSid": { "pattern": "OR[0-9a-f]{32}", "type": "string", "format": "OrganizationSid", "example": "OR33f4f3aa6fffe840d000f8ef22e883db", "description": "Unique Twilio organization sid" }, "name": { "type": "string", "description": "Friendly name of the organization" }, "ownerEmail": { "type": "string", "description": "Email address of the organization owner" }, "domainVerified": { "type": "boolean", "description": "Whether the organization has verified the domain" } } }, "iam.v1.RequestToJoinOrg": { "type": "object", "properties": { "notificationSid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^NF[0-9a-fA-F]{32}$" }, "userSid": { "type": "string", "pattern": "^US[0-9a-fA-F]{32}$", "format": "UserSid", "description": "SID of the requesting user" }, "email": { "type": "string", "maxLength": 160, "minLength": 2, "format": "email", "description": "Email address of the requesting user" }, "firstName": { "type": "string", "maxLength": 160, "minLength": 2, "description": "First name of the requesting user" }, "lastName": { "type": "string", "maxLength": 160, "minLength": 2, "description": "Last name of the requesting user" }, "dateCreated": { "type": "string", "format": "date-time", "description": "Date the join request was created" }, "scope": { "type": "string", "description": "The SID of the entity requested to join (OR\u2026, AC\u2026, etc)" }, "scopeType": { "type": "string", "description": "Type of the scope entity for the requested role", "enum": [ "organization", "account", "subaccount", "resource" ] }, "scopeName": { "type": "string", "description": "Scope Name e.g. Account or Organization friendly name" }, "roles": { "type": "array", "description": "The requested roles", "items": { "type": "object", "properties": { "roleSid": { "type": "string", "description": "SID of the requested role", "pattern": "^IX[0-9a-fA-F]{32}$", "format": "IamRoleSid" }, "roleName": { "type": "string", "description": "Name of the requested role" } } } }, "status": { "type": "string", "description": "Display status of the join request (e.g. Active, Expired), derived by the downstream service from the underlying notification's state and expiry. Does not map 1:1 to the notification's internal status." } } }, "iam.v1.RequestToJoinOrgRequest": { "type": "object", "required": [ "organizationSid", "roleSids" ], "properties": { "organizationSid": { "pattern": "OR[0-9a-f]{32}", "type": "string", "format": "OrganizationSid", "example": "OR33f4f3aa6fffe840d000f8ef22e883db", "description": "Unique Twilio sid of the organization to request to join" }, "roleSids": { "type": "array", "description": "SIDs of the requested roles", "items": { "type": "string", "pattern": "^IX[0-9a-fA-F]{32}$", "format": "IamRoleSid" }, "example": [ "IX8b69703c2a65ec199f061b0ae2974511" ] } } }, "iam.v1.RequestToJoinOrgResponse": { "type": "object", "properties": { "notificationSid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^NF[0-9a-fA-F]{32}$", "description": "SID of the created join-org request notification" } } }, "iam.v1.RequestToJoinOrgSelf": { "type": "object", "properties": { "notificationSid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^NF[0-9a-fA-F]{32}$" }, "scope": { "type": "string", "description": "The SID of the entity requested to join (OR\u2026, AC\u2026, etc)" }, "scopeType": { "type": "string", "description": "Type of the scope entity for the requested role", "enum": [ "organization", "account", "subaccount", "resource" ] }, "scopeName": { "type": "string", "description": "Scope Name e.g. Account or Organization friendly name" }, "roles": { "type": "array", "description": "The requested roles", "items": { "type": "object", "properties": { "roleSid": { "type": "string", "description": "SID of the requested role", "pattern": "^IX[0-9a-fA-F]{32}$", "format": "IamRoleSid" }, "roleName": { "type": "string", "description": "Name of the requested role" } } } }, "dateCreated": { "type": "string", "format": "date-time", "description": "Date the join request was created" }, "expirationDate": { "type": "string", "format": "date-time", "description": "Date the join request expires, if applicable" }, "status": { "type": "string", "description": "Display status of the join request (e.g. Active, Expired, Declined, Accepted), derived by the downstream service from the underlying notification's state and expiry. Does not map 1:1 to the notification's internal status." } } }, "iam.v1.AcceptRequestToJoinOrgResponse": { "type": "object", "properties": { "executionSid": { "type": "string", "pattern": "WX[0-9a-f]{32}", "format": "WorkflowExecutionSid", "example": "WXe0c97ff86651669fefcd6cc4ecd96e9a", "description": "The SID of the workflow that will handle accepting the join request" } } }, "iam.v1.OrganizationFeatures": { "type": "object", "properties": { "enabledFeatures": { "type": "array", "items": { "type": "string" }, "description": "List of features enabled for the organization", "example": [ "sso" ] } } }, "iam.v1.OrganizationUpdateRequest": { "type": "object", "properties": { "friendlyName": { "type": "string", "description": "Organization friendly name", "maxLength": 64 }, "domainSignupType": { "type": "string", "enum": [ "INVITATION_ONLY", "AUTO_MEMBERSHIP", "NO_MEMBERSHIP" ], "description": "User sign-up type for Organization domains" } } }, "iam.v1.CreateDomainResponse": { "type": "object", "properties": { "sid": { "description": "Unique Twilio domain sid", "type": "string", "pattern": "DN[0-9a-f]{32}", "format": "DomainVerificationSid", "example": "DN33f4f3aa6fffe840d000f8ef22e883db" }, "token": { "description": "Verification token for the domain", "type": "string", "minLength": 32, "maxLength": 32, "example": "c1b92294dfe76c592d5d77c24456aad2" } } }, "iam.v1.Domain": { "type": "object", "properties": { "sid": { "description": "Unique Twilio domain sid", "type": "string", "pattern": "DN[0-9a-f]{32}", "format": "DomainVerificationSid", "example": "DN33f4f3aa6fffe840d000f8ef22e883db" }, "name": { "description": "Name of the domain", "type": "string", "maxLength": 253 }, "token": { "description": "Verification token for the domain", "type": "string", "minLength": 32, "maxLength": 32, "example": "c1b92294dfe76c592d5d77c24456aad2" }, "status": { "description": "Status of the domain", "type": "string", "enum": [ "unverified", "verified", "verified-uncertain" ] }, "verificationType": { "description": "Type of verification used for the domain", "type": "string", "enum": [ "dns", "https", "manual" ] }, "dateCreated": { "description": "Creation date of the domain", "type": "string", "format": "date-time" }, "dateLastVerification": { "description": "Date where the domain was last verified", "type": "string", "format": "date-time" }, "daysLeftToReverify": { "description": "Days left to re-verify until this domain gets back into 'unverified' state. Only applicable to domains in 'verified-uncertain' state", "type": "integer", "example": 30 }, "verifiedByAnotherResource": { "description": "Whether the domain is verified by another resource. Only applicable to domains in 'verified' state", "type": "boolean" } } }, "iam.v1.Limit": { "type": "object", "properties": { "status": { "description": "Limit status", "type": "string", "enum": [ "LIMIT_REACHED", "LIMIT_REACHED_TRIAL_ACCOUNT_UNVERIFIED_DOMAIN", "OK" ] } } }, "iam.v1.ManagedUser": { "type": "object", "properties": { "organizationSid": { "pattern": "OR[0-9a-f]{32}", "type": "string", "format": "OrganizationSid", "example": "OR33f4f3aa6fffe840d000f8ef22e883db", "description": "Unique Twilio organization sid" }, "userSid": { "pattern": "US[0-9a-f]{32}", "type": "string", "format": "UserSid", "example": "USb51dccce9ac8e67b938253c7bcaa4f45", "description": "Unique Twilio user sid" }, "firstName": { "maxLength": 255, "minLength": 2, "type": "string", "description": "User first name" }, "lastName": { "maxLength": 255, "minLength": 0, "type": "string", "description": "User last name" }, "email": { "maxLength": 160, "minLength": 2, "type": "string", "format": "email", "description": "User email address" }, "status": { "type": "string", "enum": [ "active", "inactive", "suspended" ] }, "sso": { "type": "boolean", "description": "Whether the user has SSO enabled" }, "emailDomainVerified": { "type": "boolean", "description": "Whether the user's email domain is verified by the organization" }, "hasSocialConnection": { "type": "boolean", "description": "Whether the user has a social login connection, for example Google" } } }, "iam.v1.ManagedUserWithRoleAssignments": { "type": "object", "properties": { "organizationSid": { "pattern": "OR[0-9a-f]{32}", "type": "string", "format": "OrganizationSid", "example": "OR33f4f3aa6fffe840d000f8ef22e883db", "description": "Unique Twilio organization sid" }, "userSid": { "pattern": "US[0-9a-f]{32}", "type": "string", "format": "UserSid", "example": "USb51dccce9ac8e67b938253c7bcaa4f45", "description": "Unique Twilio user sid" }, "email": { "maxLength": 160, "minLength": 2, "type": "string", "format": "email", "description": "User email address" }, "name": { "maxLength": 512, "minLength": 3, "type": "string", "description": "User name" }, "status": { "type": "string", "enum": [ "active", "inactive", "suspended" ] }, "ssoEnabled": { "type": "boolean", "description": "Whether the user has SSO enabled" }, "roleAssignments": { "type": "array", "description": "List of role assignments for the user", "items": { "type": "object", "properties": { "sid": { "pattern": "IY[0-9a-f]{32}", "type": "string", "format": "IamRoleAssignmentSid", "description": "Unique identifier for the role assignment", "example": "IY1234567890abcdef1234567890abcdef" }, "roleSid": { "pattern": "IX[0-9a-f]{32}", "type": "string", "format": "IamRoleSid", "description": "Unique identifier for the role", "example": "IX1234567890abcdef1234567890abcdef" }, "roleName": { "type": "string", "description": "Name of this role" }, "scope": { "type": "string", "description": "SID of the entity that the role is scoped to (AC\u2026, OR\u2026, etc)" }, "scopeType": { "type": "string", "description": "Type of the scope entity", "enum": [ "organization", "account", "subaccount" ] }, "scopeName": { "type": "string", "description": "Scope Name e.g. Account or Organization friendly name" }, "dateCreated": { "type": "string", "format": "date-time", "description": "Date and time when the role assignment was created", "example": "2024-06-27T09:31:38.283Z" } } } } } }, "iam.v1.ImportUsersRun": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier for the import run", "example": "123e4567-e89b-12d3-a456-426614174000" }, "organizationSid": { "type": "string", "pattern": "OR[0-9a-f]{32}", "description": "Unique Twilio organization sid", "format": "OrganizationSid", "example": "OR33f4f3aa6fffe840d000f8ef22e883db" }, "status": { "type": "string", "description": "Status of the import run", "enum": [ "PENDING", "RUNNING", "FINISHED", "FAILED" ] }, "numUsersImported": { "type": "integer", "description": "Number of users successfully imported", "example": 100 }, "numUsersNotImported": { "type": "integer", "description": "Number of users that were not imported", "example": 5 }, "startDate": { "type": "string", "format": "date-time", "description": "Start date and time of the import run", "example": "2024-06-27T09:31:38.283Z" }, "finishDate": { "type": "string", "format": "date-time", "description": "Finish date and time of the import run", "example": "2024-06-27T09:31:38.283Z" } } }, "iam.v1.ImportUsersRunUser": { "type": "object", "properties": { "userSid": { "pattern": "US[0-9a-f]{32}", "type": "string", "format": "UserSid", "example": "USb51dccce9ac8e67b938253c7bcaa4f45", "description": "Unique Twilio user sid" }, "imported": { "type": "boolean", "description": "Whether the user was successfully imported" }, "details": { "type": "string", "description": "Additional details about the import result for this user, e.g. a failure reason" } } }, "iam.v1.ImportableUser": { "type": "object", "properties": { "sid": { "pattern": "US[0-9a-f]{32}", "type": "string", "format": "UserSid", "example": "USb51dccce9ac8e67b938253c7bcaa4f45", "description": "Unique Twilio user sid" }, "displayName": { "type": "string", "description": "Display name of the eligible user" }, "primaryEmailAddress": { "type": "string", "description": "Primary email address of the eligible user" } } }, "iam.v1.ImportUsersRequest": { "type": "object", "properties": { "userSids": { "type": "array", "items": { "pattern": "US[0-9a-f]{32}", "type": "string", "format": "UserSid" }, "description": "SIDs of the users to import" }, "domainSids": { "type": "array", "items": { "pattern": "DN[0-9a-f]{32}", "type": "string", "format": "DomainVerificationSid" }, "description": "SIDs of the organization domains whose eligible users should be imported" }, "notifyUsers": { "type": "boolean", "description": "Whether to notify imported users by email" } } }, "iam.v1.SocialConnection": { "type": "object", "properties": { "name": { "type": "string", "description": "Social Connection Name (e.g. google, github etc)" }, "dateCreated": { "type": "string", "format": "date-time", "description": "The creation date and time of the social connection" } } }, "iam.v1.User": { "type": "object", "properties": { "userSid": { "pattern": "US[0-9a-f]{32}", "type": "string", "format": "UserSid", "example": "USb51dccce9ac8e67b938253c7bcaa4f45", "description": "Unique Twilio user sid" }, "firstName": { "maxLength": 255, "minLength": 2, "type": "string", "description": "User first name" }, "lastName": { "maxLength": 255, "minLength": 0, "type": "string", "description": "User last name" }, "email": { "maxLength": 160, "minLength": 2, "type": "string", "format": "email", "description": "User email address" }, "emailVerified": { "type": "boolean", "description": "Whether the user email is verified or not" }, "sso": { "type": "boolean", "description": "Whether the user has SSO enabled" }, "organizationSid": { "pattern": "OR[0-9a-f]{32}", "type": "string", "format": "OrganizationSid", "example": "OR33f4f3aa6fffe840d000f8ef22e883db", "description": "Unique Twilio organization sid" }, "organizationFriendlyName": { "type": "string", "description": "Organization friendly name" }, "currentAccountSid": { "pattern": "AC[0-9a-f]{32}", "type": "string", "format": "AccountSid", "example": "AC33f4f3aa6fffe840d000f8ef22e883db", "description": "Unique Twilio account sid" }, "timeZone": { "type": "string", "description": "User time zone" }, "socialConnections": { "type": "array", "description": "List of social connections associated with the user", "items": { "$ref": "#/components/schemas/iam.v1.SocialConnection" } } } }, "iam.v1.UserPatchRequest": { "type": "object", "properties": { "firstName": { "maxLength": 255, "minLength": 2, "type": "string", "description": "User first name" }, "lastName": { "maxLength": 255, "minLength": 0, "type": "string", "description": "User last name" }, "timeZone": { "type": "string", "description": "The user's timezone in IANA Time Zone Database format", "example": "America/New_York" } } }, "iam.v1.UserPatchResponse": { "type": "object", "properties": { "userSid": { "pattern": "US[0-9a-f]{32}", "type": "string", "format": "UserSid", "example": "USb51dccce9ac8e67b938253c7bcaa4f45", "description": "Unique Twilio user sid" }, "firstName": { "maxLength": 255, "minLength": 2, "type": "string", "description": "User first name" }, "lastName": { "maxLength": 255, "minLength": 0, "type": "string", "description": "User last name" }, "timeZone": { "type": "string", "description": "The user's timezone in IANA Time Zone Database format", "example": "America/New_York" } } }, "iam.v1.EmailChangeInitiateRequest": { "type": "object", "properties": { "newEmail": { "maxLength": 160, "minLength": 2, "type": "string", "format": "email", "description": "The new email address" } } }, "iam.v1.EmailChangeInitiateResponse": { "type": "object", "properties": { "notificationSid": { "pattern": "NF[0-9a-f]{32}", "type": "string", "format": "IdentityNotificationSid", "example": "NFbfd75767416fbd8418bedafce743700a", "description": "Unique Twilio notification sid" } } }, "iam.v1.EmailChangeVerifyRequest": { "type": "object", "properties": { "notificationSid": { "pattern": "NF[0-9a-f]{32}", "type": "string", "format": "IdentityNotificationSid", "example": "NFbfd75767416fbd8418bedafce743700a", "description": "Unique Twilio notification sid" }, "code": { "maxLength": 32, "minLength": 2, "type": "string", "pattern": "^[A-Z0-9]{6}$", "description": "The verification code sent to the new email address" } } }, "iam.v1.EmailChangeResendRequest": { "type": "object", "properties": { "notificationSid": { "pattern": "NF[0-9a-f]{32}", "type": "string", "format": "IdentityNotificationSid", "example": "NFbfd75767416fbd8418bedafce743700a", "description": "Unique Twilio notification sid" } } }, "iam.v1.MfaInfo": { "type": "object", "properties": { "phoneNumber": { "type": "string", "description": "The user\u2019s phone number." }, "phoneVerified": { "type": "boolean", "description": "Whether the phone number has been verified." }, "challengeMethod": { "$ref": "#/components/schemas/iam.v1.ChallengeMethod" }, "totpVerified": { "type": "boolean", "description": "Whether TOTP setup has been verified." }, "enrolledInMfa": { "type": "boolean", "description": "Whether the user is enrolled in any MFA." }, "canEnrollInTotp": { "type": "boolean", "description": "Whether the user is allowed to enroll in TOTP." }, "isSSO": { "type": "boolean", "description": "Whether the user authenticated via SSO." }, "isMfaDisabled": { "type": "boolean", "description": "Whether MFA is disabled for this user." }, "isRecoveryCodeGenerated": { "type": "boolean", "description": "Whether a recovery code has been generated for the user." } } }, "iam.v1.MfaTotpToken": { "type": "object", "properties": { "Token": { "type": "string", "description": "A TOTP token generated by an authenticator app." } } }, "iam.v1.MfaRegenerateRecoveryTokenResponse": { "type": "object", "properties": { "RecoveryToken": { "type": "string" } } }, "iam.v1.MfaTotpQrCodeUrlResponse": { "type": "object", "properties": { "otpAuthQrCodeUrl": { "type": "string", "description": "The QrCodeUrl of the TOTP factor" } } }, "iam.v1.ChallengeMethod": { "type": "string", "enum": [ "voice", "sms", "totp" ], "description": "The method used to challenge the user (e.g. \u201cSMS\u201d, \u201cTOTP\u201d)." }, "iam.v1.OneConsoleProvisioningStatus": { "type": "object", "properties": { "status": { "type": "string", "enum": [ "pending", "in-progress", "completed", "failed" ] } } }, "iam.v1.InvitedAccount": { "type": "object", "properties": { "notificationSid": { "type": "string", "pattern": "NF[0-9a-f]{32}", "format": "IdentityNotificationSid", "description": "Unique Twilio notification sid" }, "accountSid": { "type": "string", "pattern": "^AC[0-9a-fA-F]{32}$", "format": "AccountSid", "description": "Unique Twilio account sid" }, "friendlyName": { "type": "string", "description": "Friendly name of the account" }, "senderFirstName": { "type": "string", "description": "First name of the sender who invited the account" }, "senderLastName": { "type": "string", "description": "Last name of the sender who invited the account" }, "senderEmail": { "type": "string", "format": "email", "description": "Email of the sender who invited the account" }, "dateCreated": { "type": "string", "format": "date-time", "description": "The date and time of the invitation creation" }, "totalSends": { "type": "integer", "format": "int32", "description": "Total number of invitations sent" }, "dateLastSent": { "type": "string", "format": "date-time", "description": "The date and time of the last invitation sent" }, "tokenExpired": { "type": "boolean", "description": "Whether the invitation token has expired" }, "canResend": { "type": "boolean", "description": "Whether the invitation can be resent" }, "canResendReason": { "type": "string", "description": "Reason why the invitation cannot be resent, if applicable", "enum": [ "resend_throttle", "resend_expired", "resend_max_threshold_reached" ] } } }, "iam.v1.ImportableUsersCount": { "type": "object", "properties": { "domainName": { "type": "string", "description": "The name of the organization domain" }, "userCount": { "type": "integer", "format": "int32", "description": "The number of users that can be imported into the organization" } } }, "iam.v1.ExternalUser": { "type": "object", "properties": { "organizationSid": { "pattern": "OR[0-9a-f]{32}", "type": "string", "format": "OrganizationSid", "example": "OR33f4f3aa6fffe840d000f8ef22e883db", "description": "Unique Twilio organization sid" }, "userSid": { "pattern": "US[0-9a-f]{32}", "type": "string", "format": "UserSid", "example": "USb51dccce9ac8e67b938253c7bcaa4f45", "description": "Unique Twilio user sid" }, "firstName": { "maxLength": 255, "minLength": 2, "type": "string", "description": "User first name" }, "lastName": { "maxLength": 255, "minLength": 0, "type": "string", "description": "User last name" }, "email": { "maxLength": 160, "minLength": 2, "type": "string", "format": "email", "description": "User email address" }, "status": { "type": "string", "enum": [ "active", "inactive", "suspended" ] } } }, "iam.v1.InvitedUser": { "type": "object", "properties": { "notificationSid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^NF[0-9a-fA-F]{32}$" }, "email": { "type": "string", "maxLength": 160, "minLength": 2, "format": "email" }, "senderFirstName": { "type": "string", "maxLength": 160, "minLength": 2 }, "senderLastName": { "type": "string", "maxLength": 160, "minLength": 2 }, "senderEmail": { "type": "string", "maxLength": 160, "minLength": 2, "format": "email" }, "dateCreated": { "type": "string", "format": "date-time" }, "totalSends": { "type": "integer" }, "dateLastSent": { "type": "string", "format": "date-time" }, "tokenExpired": { "type": "boolean" }, "canResend": { "type": "boolean" }, "canResendReason": { "type": "string", "maxLength": 160 }, "roleAssignments": { "type": "array", "items": { "type": "object", "properties": { "scope": { "type": "string", "description": "The SID of the entity that the role is scoped to (AC\u2026, OR\u2026, etc)" }, "scopeType": { "type": "string", "description": "Type of the scope entity", "enum": [ "organization", "account", "subaccount", "resource" ] }, "scopeName": { "type": "string", "description": "Scope Name e.g. Account or Organization friendly name" }, "roleSid": { "type": "string", "description": "List of role SIDs assigned for the scope", "pattern": "^IX[0-9a-fA-F]{32}$", "format": "IamRoleSid" }, "roleName": { "type": "string", "description": "Name of this role" } } } } } }, "iam.v1.ChangeAccountOwnerRequest": { "type": "object", "properties": { "newOwnerSid": { "pattern": "US[0-9a-f]{32}", "type": "string", "format": "UserSid", "example": "USb51dccce9ac8e67b938253c7bcaa4f45", "description": "The SID of the new owner to transfer the account to" } } }, "iam.v1.ChangeAccountOwnerResponse": { "type": "object", "properties": { "executionSid": { "type": "string", "pattern": "WX[0-9a-f]{32}", "format": "WorkflowExecutionSid", "example": "WXe0c97ff86651669fefcd6cc4ecd96e9a", "description": "The SID of the workflow that will handle the account ownership change" } } }, "iam.v1.ManagedAccountOrganizationResponse": { "type": "object", "properties": { "organizationSid": { "pattern": "OR[0-9a-f]{32}", "type": "string", "format": "OrganizationSid", "example": "OR33f4f3aa6fffe840d000f8ef22e883db", "description": "Unique Twilio organization sid" } } }, "iam.v1.create-consent": { "type": "object", "required": [ "csrf_token", "csrf_token_session_state", "client_sid", "vendor_client_id", "response", "owner_sid", "actor_sid", "issuer" ], "properties": { "csrf_token": { "type": "string" }, "csrf_token_session_state": { "type": "string" }, "redirect_uri": { "type": "string", "format": "uri" }, "client_sid": { "type": "string" }, "vendor_client_id": { "type": "string" }, "response": { "type": "string", "enum": [ "allow", "deny" ] }, "owner_sid": { "type": "string" }, "actor_sid": { "type": "string" }, "issuer": { "type": "string" }, "allow": { "type": "array", "items": { "type": "string" } } } }, "iam.v1.organization.agentregistration": { "type": "object", "description": "A CIMD client, an MCP agent or the Twilio CLI, that an organization has registered.", "properties": { "registration_sid": { "type": "string", "pattern": "^OQ[a-zA-Z0-9]{32}$", "description": "The agent's identity in the organization." }, "friendly_name": { "type": "string", "nullable": true, "description": "The agent's name, from its CIMD document. Null when there is none, and then the screens show the CIMD URL. It cannot be set or changed." }, "client_url": { "type": "string", "description": "The agent's CIMD document URL, as registered." }, "origin": { "type": "string", "description": "The host of the CIMD document URL." }, "enabled": { "type": "boolean", "description": "Whether users in the organization can connect the agent." }, "cimd_category": { "type": "string", "nullable": true, "description": "The CIMD category the agent is registered for, MCP or CLI. MCP for one registered before categories existed." }, "created_by": { "type": "string", "nullable": true, "description": "The name of the user who registered the agent, looked up when the registration is read. Null when the registration was made before the user was recorded, or the name could not be looked up. A user who has since been deleted shows as (Deleted User)." }, "created_by_sid": { "type": "string", "nullable": true, "pattern": "^US[a-zA-Z0-9]{32}$", "description": "The sid of the user who registered the agent. Null when the registration was made before the user was recorded." }, "date_created": { "type": "string", "format": "date-time" }, "date_updated": { "type": "string", "format": "date-time" } }, "required": [ "registration_sid", "client_url", "origin", "enabled" ] }, "iam.v1.organization.AgentRegistrationRequest": { "type": "object", "properties": { "clientUrl": { "type": "string", "maxLength": 2048, "description": "The agent's CIMD document URL, which is its client id. Must start with https:// and have a host and a path, with no credentials, fragment or dot segments." }, "enabled": { "type": "boolean", "description": "Whether users in the organization can connect the agent. Defaults to false." }, "type": { "type": "string", "enum": [ "MCP", "CLI" ], "description": "The CIMD category to register the agent for. A URL a category lists may be registered in that category only, and a URL no category lists only as MCP. Defaults to the category that lists the URL, else MCP. A URL is registered in one category per organization." } }, "required": [ "clientUrl" ] }, "iam.v1.organization.AgentRegistrationUpdateRequest": { "type": "object", "properties": { "enabled": { "type": "boolean", "description": "Whether users in the organization can connect the agent. Disabling revokes every consent for the agent in the organization." } }, "required": [ "enabled" ] }, "iam.v1.organization.AgentPermissionPart": { "type": "object", "description": "One part of an organization's agent permissions.", "properties": { "mode": { "type": "string", "enum": [ "ALL_READ", "ALL_READ_WRITE", "SPECIFIC" ] }, "permissions": { "type": "array", "nullable": true, "items": { "type": "string" }, "maxItems": 2000, "description": "The selected permissions, as /namespace/product/name/action, at most 2000. Required and not empty for SPECIFIC, empty or absent for the other modes." } }, "required": [ "mode" ] }, "iam.v1.organization.AgentPermissionsRequest": { "type": "object", "minProperties": 1, "description": "The parts to change. A part left out keeps its setting, and at least one part is required. A part the category does not have is a 400, so CLI takes account only.", "properties": { "type": { "type": "string", "enum": [ "MCP", "CLI" ], "description": "The CIMD category whose agent permissions to set. Defaults to MCP." }, "account": { "$ref": "#/components/schemas/iam.v1.organization.AgentPermissionPart" }, "organization": { "$ref": "#/components/schemas/iam.v1.organization.AgentPermissionPart" }, "user": { "$ref": "#/components/schemas/iam.v1.organization.AgentPermissionPart" } } }, "iam.v1.organization.AgentPermissions": { "type": "object", "description": "What any agent of the category may do in the organization. A part the category does not have is null, so CLI has organization and user null.", "properties": { "account": { "$ref": "#/components/schemas/iam.v1.organization.AgentPermissionPart" }, "organization": { "$ref": "#/components/schemas/iam.v1.organization.AgentPermissionPart" }, "user": { "$ref": "#/components/schemas/iam.v1.organization.AgentPermissionPart" }, "pools": { "type": "object", "description": "The permissions each context offers agents of the category, for rendering a selection. A context the category does not have is empty.", "properties": { "account": { "type": "array", "items": { "type": "string" } }, "organization": { "type": "array", "items": { "type": "string" } }, "user": { "type": "array", "items": { "type": "string" } } }, "required": [ "account", "organization", "user" ] } }, "required": [ "account", "pools" ] }, "iam.v1.organization.vendoroauthapp": { "type": "object", "properties": { "type": { "type": "string" }, "sid": { "type": "string", "pattern": "^OQ[a-zA-Z0-9]{32}$" }, "friendly_name": { "type": "string" }, "description": { "type": "string" }, "date_created": { "type": "string", "format": "date-time" }, "status": { "type": "string" }, "policy": { "type": "object", "properties": { "allow": { "type": "array", "items": { "type": "string" }, "description": "Set of permissions explicitly allowed" }, "deny": { "type": "array", "items": { "type": "string" }, "description": "Set of permissions explicitly denied" } } }, "created_by": { "type": "string" }, "creator_sid": { "type": "string", "pattern": "^US[0-9a-fA-F]{32}$", "description": "The unique identifier (SID) of the user who created this OAuth app." }, "token_endpoint_auth_method": { "type": "string", "enum": [ "client_secret_basic" ], "description": "Determines how the client authenticates. Organization OAuth apps only support 'client_secret_basic'." }, "company_name": { "type": "string" }, "homepage_url": { "type": "string", "format": "uri" }, "tos_url": { "type": "string", "format": "uri" }, "redirect_urls": { "type": "array", "items": { "type": "string", "format": "uri" } }, "image_url": { "type": "string", "format": "uri" }, "presigned_image_url": { "type": "string", "format": "uri", "description": "Presigned URL for temporary direct access to the image. Valid for 5 minutes." }, "presigned_image_url_expires_at": { "type": "string", "format": "date-time", "description": "Timestamp when the presigned image URL expires" }, "authorization_url": { "type": "string", "format": "uri" }, "access_token_ttl": { "type": "integer" } } }, "iam.v1.organization.VendorOauthAppCreateRequest": { "type": "object", "properties": { "type": { "type": "string" }, "friendly_name": { "type": "string" }, "owner_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^[A-Z]{2}[0-9a-fA-F]{32}$", "nullable": true }, "description": { "type": "string" }, "client_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^OQ[0-9a-fA-F]{32}$", "nullable": true }, "token_endpoint_auth_method": { "type": "string", "enum": [ "client_secret_basic" ], "description": "Determines how the client authenticates. Organization OAuth apps only support 'client_secret_basic'." }, "policy": { "type": "object", "properties": { "allow": { "type": "array", "items": { "type": "string" }, "description": "Set of permissions explicitly allowed" }, "deny": { "type": "array", "items": { "type": "string" }, "description": "Set of permissions explicitly denied" } } }, "image_url": { "type": "string", "format": "uri" }, "image_key": { "type": "string" }, "company_name": { "type": "string" }, "homepage_url": { "type": "string", "format": "uri" }, "tos_url": { "type": "string", "format": "uri" }, "redirect_urls": { "type": "array", "items": { "type": "string", "format": "uri" } }, "access_token_ttl": { "type": "integer" } } }, "iam.v1.organization.VendorOauthAppUpdateRequest": { "type": "object", "properties": { "friendly_name": { "type": "string", "nullable": true }, "description": { "type": "string", "nullable": true }, "token_endpoint_auth_method": { "type": "string", "enum": [ "client_secret_basic" ], "nullable": true, "description": "Determines how the client authenticates. Organization OAuth apps only support 'client_secret_basic'." }, "policy": { "type": "object", "nullable": true, "properties": { "allow": { "type": "array", "items": { "type": "string" }, "description": "Set of permissions explicitly allowed" }, "deny": { "type": "array", "items": { "type": "string" }, "description": "Set of permissions explicitly denied" } } }, "company_name": { "type": "string", "nullable": true }, "homepage_url": { "type": "string", "format": "uri", "nullable": true }, "tos_url": { "type": "string", "format": "uri", "nullable": true }, "redirect_urls": { "type": "array", "items": { "type": "string", "format": "uri" }, "nullable": true }, "image_url": { "type": "string", "format": "uri", "nullable": true }, "image_key": { "type": "string", "nullable": true }, "access_token_ttl": { "type": "integer", "nullable": true } } }, "iam.v1.organization.VendorOauthAppCreateUpdateResponse": { "type": "object", "properties": { "type": { "type": "string" }, "sid": { "type": "string", "pattern": "^OQ[a-zA-Z0-9]{32}$" }, "friendly_name": { "type": "string" }, "description": { "type": "string" }, "date_created": { "type": "string", "format": "date-time" }, "created_by": { "type": "string" }, "creator_sid": { "type": "string", "pattern": "^US[0-9a-fA-F]{32}$", "description": "The unique identifier (SID) of the user who created this OAuth app." }, "secret": { "type": "string", "nullable": true, "description": "Client secret. Only present for confidential apps (token_endpoint_auth_method=client_secret_basic) and only returned at creation time." }, "token_endpoint_auth_method": { "type": "string", "enum": [ "client_secret_basic" ] }, "status": { "type": "string" }, "policy": { "type": "object", "properties": { "allow": { "type": "array", "items": { "type": "string" }, "description": "Set of permissions explicitly allowed" }, "deny": { "type": "array", "items": { "type": "string" }, "description": "Set of permissions explicitly denied" } } }, "authorization_url": { "type": "string", "format": "uri" }, "image_url": { "type": "string", "format": "uri" }, "company_name": { "type": "string" }, "homepage_url": { "type": "string", "format": "uri" }, "tos_url": { "type": "string", "format": "uri" }, "redirect_urls": { "type": "array", "items": { "type": "string", "format": "uri" } }, "access_token_ttl": { "type": "integer" } } }, "iam.v1.organization.GeneratePresignedImageUploadUrlResponse": { "type": "object", "properties": { "presigned_url": { "type": "string", "format": "uri", "description": "Presigned S3 URL for uploading the image (PUT request). Valid for 5 minutes." }, "image_key": { "type": "string", "description": "S3 key where the image will be stored." }, "expires_at": { "type": "string", "format": "date-time", "description": "Timestamp when the presigned URL expires" } } }, "iam.v1.CreateAccountRequest": { "type": "object", "required": [ "friendlyName", "ownerId" ], "properties": { "ownerId": { "type": "string", "description": "The owner of the account to be provisioned.", "example": "USd41d8cd98f00b204e9800998ecf8427e", "pattern": "^US[0-9A-Fa-f]{32}$" }, "friendlyName": { "maxLength": 64, "minLength": 0, "type": "string", "example": "My first Twilio Account" }, "tags": { "type": "object", "additionalProperties": { "type": "string" }, "example": { "custom-tag": "tag-value" } } } }, "iam.v1.CreateSubaccountRequest": { "type": "object", "required": [ "friendlyName", "parentAccountId" ], "properties": { "parentAccountId": { "type": "string", "description": "The parent account ID of the subaccount to be provisioned.", "example": "ACd41d8cd98f00b204e9800998ecf8427e", "pattern": "^AC[0-9A-Fa-f]{32}$" }, "friendlyName": { "maxLength": 64, "minLength": 0, "type": "string", "example": "My first Twilio Account" }, "tags": { "type": "object", "additionalProperties": { "type": "string" }, "example": { "custom-tag": "tag-value" } } } }, "iam.v1.Operation": { "type": "object", "properties": { "id": { "type": "string", "description": "ID of the operation", "pattern": "^[0-9abcdefghjkmnpqrstvwxyz]{26}$", "example": "01k1y98s21fp3ajns480x4gzbr" }, "parentId": { "type": "string", "description": "ID of the operation's parent operation, if applicable", "pattern": "^[0-9abcdefghjkmnpqrstvwxyz]{26}$", "example": "01k1y98s21fp3ajns480x4gzbr" }, "type": { "type": "string", "description": "The type of the operation.", "example": "ProvisionUnifiedAccount" }, "state": { "type": "string", "enum": [ "PENDING", "IN_PROGRESS", "SUCCEEDED", "FAILED" ], "example": "PENDING" }, "dateCreated": { "type": "string", "format": "date-time", "description": "The date that this Operation was created, given in RFC 2822 format.", "example": "2023-10-01T12:00:00Z" }, "dateCompleted": { "type": "string", "format": "date-time", "description": "The date that the Operation was completed, if applicable.", "example": "2023-10-01T12:00:00Z" }, "meta": { "type": "object", "properties": { "links": { "type": "object", "description": "Links to resources related to the operation.\nCommon links include:\n - `self`: link to this operation\n - `childOperations`: link to child operations of this operation\n", "additionalProperties": { "type": "string" } } } }, "input": { "type": "object", "additionalProperties": {}, "description": "A polymorphic input object. Fields vary depending on the operation.", "example": { "resourceId": "abc123" } }, "result": { "type": "object", "additionalProperties": {}, "description": "A polymorphic result object. Fields vary depending on the operation.\nCommon fields include:\n - `resourceId`: string\n", "example": { "resourceId": "abc123" } }, "error": { "type": "object", "properties": { "reason": { "type": "string", "description": "The reason for the failure of the operation, if applicable.", "example": "ACCOUNT_LIMIT_EXCEEDED" }, "message": { "type": "string", "description": "A human-readable error message describing the error, if applicable.", "example": "The account limit has been exceeded." } } } } }, "iam.v1.Accounts.CreationStatusResponse": { "type": "object", "properties": { "operationId": { "type": "string", "description": "ID of the operation", "example": "op-1234567890" }, "ownerId": { "type": "string", "description": "The owner of the account to be provisioned.", "example": "USd41d8cd98f00b204e9800998ecf8427e", "pattern": "^US[0-9A-Fa-f]{32}$" }, "status": { "type": "string", "enum": [ "PENDING", "IN_PROGRESS", "SUCCEEDED", "FAILED" ], "description": "The current status of the account provisioning operation", "example": "SUCCEEDED" }, "accountId": { "type": "string", "description": "The ID of the provisioned account (only available when status is SUCCEEDED)", "example": "AC1234567890" }, "error": { "type": "object", "properties": { "reason": { "type": "string", "description": "The reason for the failure of the operation, if applicable.", "example": "ACCOUNT_LIMIT_EXCEEDED" }, "message": { "type": "string", "description": "A human-readable error message describing the error, if applicable.", "example": "The account limit has been exceeded." } } } } }, "iam.v1.Accounts.ChangeAccountOwnerRequest": { "type": "object", "properties": { "emailAddress": { "maxLength": 160, "minLength": 2, "type": "string", "format": "email", "description": "New owner's email address" } } }, "iam.v1.Accounts.ChangeAccountOwnerResponse": { "type": "object", "properties": { "executionSid": { "type": "string", "pattern": "WX[0-9a-f]{32}", "format": "WorkflowExecutionSid", "example": "WXe0c97ff86651669fefcd6cc4ecd96e9a", "description": "The SID of the workflow that will handle the account ownership change" } } }, "iam.v1.account.vendoroauthapp": { "type": "object", "properties": { "type": { "type": "string" }, "sid": { "type": "string", "pattern": "^OQ[a-zA-Z0-9]{32}$" }, "friendly_name": { "type": "string" }, "description": { "type": "string" }, "date_created": { "type": "string", "format": "date-time" }, "status": { "type": "string" }, "policy": { "type": "object", "properties": { "allow": { "type": "array", "items": { "type": "string" }, "description": "Set of permissions explicitly allowed" }, "deny": { "type": "array", "items": { "type": "string" }, "description": "Set of permissions explicitly denied" } } }, "created_by": { "type": "string" }, "creator_sid": { "type": "string", "pattern": "^US[0-9a-fA-F]{32}$", "description": "The unique identifier (SID) of the user who created this OAuth app." }, "access_token_ttl": { "type": "integer" } } }, "iam.v1.account.VendorOauthAppCreateRequest": { "type": "object", "properties": { "type": { "type": "string" }, "friendly_name": { "type": "string" }, "owner_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^[A-Z]{2}[0-9a-fA-F]{32}$", "nullable": true }, "description": { "type": "string" }, "client_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^OQ[0-9a-fA-F]{32}$", "nullable": true }, "token_endpoint_auth_method": { "type": "string", "enum": [ "client_secret_basic" ], "description": "Determines how the client authenticates. Account OAuth apps on v1 only support 'client_secret_basic'. For PKCE (none), use the v2 API." }, "policy": { "type": "object", "properties": { "allow": { "type": "array", "items": { "type": "string" }, "description": "Set of permissions explicitly allowed" }, "deny": { "type": "array", "items": { "type": "string" }, "description": "Set of permissions explicitly denied" } } }, "access_token_ttl": { "type": "integer" } } }, "iam.v1.account.VendorOauthAppCreateUpdateResponse": { "type": "object", "properties": { "type": { "type": "string" }, "sid": { "type": "string", "pattern": "^OQ[a-zA-Z0-9]{32}$" }, "friendly_name": { "type": "string" }, "description": { "type": "string" }, "date_created": { "type": "string", "format": "date-time" }, "created_by": { "type": "string" }, "creator_sid": { "type": "string", "pattern": "^US[0-9a-fA-F]{32}$", "description": "The unique identifier (SID) of the user who created this OAuth app." }, "secret": { "type": "string" }, "status": { "type": "string" }, "policy": { "type": "object", "properties": { "allow": { "type": "array", "items": { "type": "string" }, "description": "Set of permissions explicitly allowed" }, "deny": { "type": "array", "items": { "type": "string" }, "description": "Set of permissions explicitly denied" } } }, "access_token_ttl": { "type": "integer" } } }, "iam.v1.account.VendorOauthAppUpdateRequest": { "type": "object", "properties": { "type": { "type": "string", "nullable": true }, "friendly_name": { "type": "string", "nullable": true }, "description": { "type": "string", "nullable": true }, "policy": { "type": "object", "nullable": true, "properties": { "allow": { "type": "array", "items": { "type": "string" }, "description": "Set of permissions explicitly allowed" }, "deny": { "type": "array", "items": { "type": "string" }, "description": "Set of permissions explicitly denied" } } }, "access_token_ttl": { "type": "integer", "nullable": true } } }, "iam.v1.DisconnectSocialIdentityRequest": { "type": "object", "description": "Request to disconnect a social identity provider from the authenticated user's account", "required": [ "provider" ], "properties": { "provider": { "type": "string", "description": "The social identity provider to disconnect (e.g. google-oauth2, github, apple)" } } }, "iam.v1.PostLoginActionRequestContext": { "type": "object", "description": "Request metadata for the Whitney auth_flow.checkpoint event, carried through for future blocklist/status-check use", "required": [ "ipAddress" ], "properties": { "ipAddress": { "type": "string", "description": "The IP address the login request originated from" }, "userAgent": { "type": "string", "description": "The User-Agent header from the login request" }, "requestId": { "type": "string", "description": "Whitney's request identifier for the login attempt" } } }, "iam.v1.PostLoginActionOAuthContext": { "type": "object", "description": "Details of the OAuth authorization request the user is logging in for", "properties": { "clientId": { "type": "string", "description": "The OAuth client the user is authenticating to" }, "scope": { "type": "string", "description": "The space-delimited scopes requested by the client" }, "authorizationDetails": { "type": "array", "description": "RFC 9396 authorization_details sent with the authorization request, if any", "items": { "type": "object", "additionalProperties": true } } } }, "iam.v1.PostLoginActionMethod": { "type": "object", "description": "One factor the session completed, in completion order", "properties": { "name": { "type": "string", "description": "The credential type, e.g. password, email, oauth" }, "identifier": { "type": "string", "description": "The contact value the factor resolved, from the user's verified factor directory. Omitted together with identifierType when the factor resolved none, e.g. a passkey login" }, "identifierType": { "type": "string", "description": "The kind of identifier, e.g. email or phone" }, "completedAt": { "type": "string", "format": "date-time", "description": "RFC 3339 timestamp the factor completed at" } } }, "iam.v1.PostLoginActionAuthenticationContext": { "type": "object", "description": "How the session authenticated", "properties": { "acr": { "type": "string", "description": "The authentication context class reference the login satisfied" }, "amr": { "type": "array", "description": "The authentication factors the user completed, as RFC 8176 authentication method reference values (e.g. pwd, otp, mfa)", "items": { "type": "string" } }, "methods": { "type": "array", "description": "The completed factors and the identifier each resolved, in completion order", "items": { "$ref": "#/components/schemas/iam.v1.PostLoginActionMethod" } } } }, "iam.v1.PostLoginActionUser": { "type": "object", "description": "The user who is logging in, as the full Users API object. Only userId is read by the webhook receiver", "additionalProperties": true, "properties": { "userId": { "type": "string", "description": "The Whitney (CIAM) identifier of the user" } } }, "iam.v1.PostLoginActionUserContext": { "type": "object", "description": "The user who is logging in. Null when no user resolved upstream", "properties": { "isFirstLogin": { "type": "boolean", "description": "Whether this is the user's first login" }, "user": { "$ref": "#/components/schemas/iam.v1.PostLoginActionUser" } } }, "iam.v1.PostLoginActionRequest": { "type": "object", "description": "The auth_flow.checkpoint webhook payload Whitney sends for a post-login action", "required": [ "authenticationContext", "requestContext" ], "properties": { "version": { "type": "string", "description": "The version of the Whitney webhook payload contract" }, "event": { "type": "string", "description": "The Whitney event name (e.g. auth_flow.checkpoint)" }, "accountSid": { "type": "string", "description": "The Twilio account SID associated with the login" }, "nodeId": { "type": "string", "description": "The Whitney auth flow node identifier for this action" }, "actionId": { "type": "string", "description": "Whitney's identifier for this action invocation" }, "sentAt": { "type": "string", "format": "date-time", "description": "RFC 3339 timestamp the webhook was sent at" }, "oauth": { "$ref": "#/components/schemas/iam.v1.PostLoginActionOAuthContext" }, "userContext": { "$ref": "#/components/schemas/iam.v1.PostLoginActionUserContext" }, "authenticationContext": { "$ref": "#/components/schemas/iam.v1.PostLoginActionAuthenticationContext" }, "requestContext": { "$ref": "#/components/schemas/iam.v1.PostLoginActionRequestContext" } } }, "iam.v1.PostLoginActionTokenClaims": { "type": "object", "description": "Custom claims to attach to the id_token or access_token", "properties": { "custom_claims": { "type": "object", "description": "Map of custom claim name to value", "additionalProperties": true } } }, "iam.v1.PostLoginActionResponse": { "type": "object", "description": "The verdict UAS returns for a Whitney post-login action", "properties": { "action": { "type": "string", "description": "Whether the login should be allowed or denied", "enum": [ "allow", "deny" ] }, "id_token": { "$ref": "#/components/schemas/iam.v1.PostLoginActionTokenClaims" }, "access_token": { "$ref": "#/components/schemas/iam.v1.PostLoginActionTokenClaims" }, "reason": { "type": "string", "description": "The customer-facing message explaining why the login was denied. Present only when action is deny" } } }, "iam.v1.SubaccountBatchWorkflowType": { "type": "string", "enum": [ "BULK_SUBACCOUNT_SUSPEND", "BULK_SUBACCOUNT_UNSUSPEND", "BULK_SUBACCOUNT_CLOSE" ], "example": "BULK_SUBACCOUNT_SUSPEND" }, "iam.v1.SubaccountBatchStatus": { "type": "string", "enum": [ "SCHEDULED", "PROCESSING", "COMPLETED", "FAILED", "CANCELLED" ], "example": "PROCESSING" }, "iam.v1.SubaccountBatch": { "type": "object", "required": [ "batchId", "accountId", "workflowType", "status", "actorUserId", "dateCreated", "dateUpdated" ], "properties": { "batchId": { "type": "string", "minLength": 40, "maxLength": 40, "pattern": "^iam_operation_[0-9a-hjkmnp-tv-z]{26}$", "description": "The unique identifier for this batch operation, also used as the public Job ID.", "example": "iam_operation_00000000000000000000000000" }, "accountId": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^AC[0-9a-f]{32}$", "description": "The ID of the parent account that owns this batch.", "example": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }, "workflowType": { "$ref": "#/components/schemas/iam.v1.SubaccountBatchWorkflowType" }, "status": { "$ref": "#/components/schemas/iam.v1.SubaccountBatchStatus" }, "actorUserId": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^US[0-9a-f]{32}$", "description": "The ID of the user who submitted the batch.", "example": "USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }, "actorUserEmail": { "type": "string", "nullable": true, "description": "The email of the user who submitted the batch.", "example": "someone@example.com" }, "totalCount": { "type": "integer", "format": "int32", "nullable": true, "description": "The total number of subaccounts in the batch.", "example": 250 }, "successCount": { "type": "integer", "format": "int32", "nullable": true, "description": "The number of subaccounts processed successfully.", "example": 248 }, "failureCount": { "type": "integer", "format": "int32", "nullable": true, "description": "The number of subaccounts that failed processing.", "example": 2 }, "dateCreated": { "type": "string", "format": "date-time", "description": "The date the batch was submitted, given in RFC 3339 format.", "example": "2026-07-27T12:00:00Z" }, "dateUpdated": { "type": "string", "format": "date-time", "description": "The date the batch was last updated, given in RFC 3339 format.", "example": "2026-07-27T12:05:00Z" }, "dateCompleted": { "type": "string", "format": "date-time", "nullable": true, "description": "The date the batch reached a terminal state, given in RFC 3339 format.", "example": "2026-07-27T12:10:00Z" } } }, "iam.v1.SubaccountBatchAccepted": { "type": "object", "required": [ "batchId" ], "properties": { "batchId": { "type": "string", "minLength": 40, "maxLength": 40, "pattern": "^iam_operation_[0-9a-hjkmnp-tv-z]{26}$", "description": "The generated batch identifier, also used as the public Job ID.", "example": "iam_operation_00000000000000000000000000" } } }, "iam.v1.CreateSubaccountBatchRequest": { "type": "object", "required": [ "workflowType", "subaccountIds" ], "properties": { "workflowType": { "$ref": "#/components/schemas/iam.v1.SubaccountBatchWorkflowType" }, "subaccountIds": { "type": "array", "minItems": 1, "maxItems": 1000, "description": "The subaccount IDs to act on. A maximum of 1000 may be submitted per batch.", "items": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^AC[0-9a-f]{32}$" }, "example": [ "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "ACbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" ] } } }, "iam.v1.BatchDownloadUrl": { "type": "object", "required": [ "downloadUrl", "expiresAt" ], "properties": { "downloadUrl": { "type": "string", "description": "A pre-signed, time-limited S3 URL for the CSV. The lifetime is short and server-configured; read `expiresAt` rather than assuming a fixed duration.", "example": "https://com-twilio-iam-prod-us1-icp-subaccount-batches.s3.amazonaws.com/results/iam_operation_00000000000000000000000000.csv?X-Amz-Signature=..." }, "expiresAt": { "type": "string", "format": "date-time", "description": "The time the pre-signed URL stops being valid, given in RFC 3339 format.", "example": "2026-07-15T14:30:00Z" } } }, "iam.v1.account.ConnectApp": { "type": "object", "description": "A Connect App owned by a Twilio account.", "properties": { "sid": { "type": "string", "pattern": "^CN[0-9a-fA-F]{32}$", "format": "ConnectAppSid", "description": "The unique identifier of the Connect App.", "example": "CNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }, "accountSid": { "type": "string", "pattern": "^AC[0-9a-fA-F]{32}$", "format": "AccountSid", "description": "The account that owns the Connect App.", "example": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }, "active": { "type": "boolean", "description": "Whether the Connect App is active. Inactive apps are never returned by the list endpoint." }, "friendlyName": { "type": "string", "nullable": true, "description": "The name shown to a user being asked to authorize the Connect App.", "example": "SmartScheduler" }, "companyName": { "type": "string", "description": "The name of the company that publishes the Connect App.", "example": "SmartScheduler Inc" }, "description": { "type": "string", "nullable": true, "description": "A description of what the Connect App does." }, "homepageUrl": { "type": "string", "format": "uri", "description": "The public homepage of the Connect App.", "example": "https://example.com" }, "authorizeRedirectUrl": { "type": "string", "format": "uri", "description": "Where the user is sent after allowing or denying authorization.", "example": "https://example.com/callback" }, "deauthorizeCallbackUrl": { "type": "string", "format": "uri", "nullable": true, "description": "The URL Twilio calls when an account deauthorizes the Connect App." }, "deauthorizeCallbackMethod": { "type": "string", "enum": [ "GET", "POST" ], "nullable": true, "description": "The HTTP method used for the deauthorize callback." }, "imageUrl": { "type": "string", "nullable": true, "description": "An internal storage reference for the app logo, as a relative path. It is not a browser-renderable URL; use presignedImageUrl to display the logo." }, "presignedImageUrl": { "type": "string", "format": "uri", "nullable": true, "description": "A short-lived URL to download the app logo. Returned only when fetching a single Connect App, and only if the app has a logo. Do not cache it." }, "tosUrl": { "type": "string", "format": "uri", "nullable": true, "description": "The terms of service for the Connect App." }, "permissions": { "type": "array", "nullable": true, "description": "The permissions the Connect App requests.", "items": { "type": "string", "enum": [ "get-all", "post-all" ] } }, "dateCreated": { "type": "string", "format": "date-time", "description": "When the Connect App was created." }, "dateUpdated": { "type": "string", "format": "date-time", "nullable": true, "description": "When the Connect App was last updated." } } }, "iam.v1.account.ConnectAppPage": { "type": "object", "description": "A page of Connect Apps.", "required": [ "content" ], "properties": { "content": { "type": "array", "description": "The Connect Apps on this page.", "items": { "$ref": "#/components/schemas/iam.v1.account.ConnectApp" } }, "meta": { "type": "object", "properties": { "page_size": { "type": "integer", "format": "int32", "description": "The number of records on this page." }, "next_token": { "type": "string", "nullable": true, "description": "Pass as PageToken to fetch the next page. Null on the last page." }, "previous_token": { "type": "string", "nullable": true, "description": "Pass as PageToken to fetch the previous page. Null on the first page." }, "list_key": { "type": "string", "description": "The response property holding the page content.", "example": "content" }, "direct_token": { "type": "boolean", "description": "Whether the page tokens are usable as-is." } } } } }, "iam.v1.account.ConnectAppImageUploadUrl": { "type": "object", "description": "A short-lived URL to upload a Connect App image to, and the key to pass on create or update.", "properties": { "presignedUrl": { "type": "string", "format": "uri", "description": "Presigned S3 URL to upload the image to with a PUT. The request must send exactly contentType and the requested FileSize. Valid until expiresAt." }, "imageKey": { "type": "string", "description": "The key of the uploaded image. Pass it as imageKey when creating or updating the Connect App.", "example": "images/temp/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/9f1c2e7b4a6d48e3b05c7a1d2e3f4a5b-logo.png" }, "contentType": { "type": "string", "description": "The Content-Type the upload must be sent with.", "enum": [ "image/png", "image/jpeg", "image/gif" ] }, "expiresAt": { "type": "string", "format": "date-time", "description": "When presignedUrl stops accepting uploads (5 minutes after it is issued)." } } }, "iam.v1.account.ConnectAppRequest": { "type": "object", "description": "The body of a Connect App create or update. The owner is never taken from the body; it is the authenticated account.", "required": [ "friendlyName", "companyName", "homepageUrl", "authorizeRedirectUrl", "permissions" ], "properties": { "friendlyName": { "type": "string", "description": "The name of the Connect App." }, "companyName": { "type": "string", "description": "The company that owns the Connect App." }, "description": { "type": "string", "nullable": true, "description": "A description of the Connect App." }, "homepageUrl": { "type": "string", "format": "uri", "description": "The public homepage of the Connect App." }, "authorizeRedirectUrl": { "type": "string", "format": "uri", "description": "Where the user is sent after authorizing the Connect App." }, "deauthorizeCallbackUrl": { "type": "string", "format": "uri", "nullable": true, "description": "Called when an account deauthorizes the Connect App." }, "deauthorizeCallbackMethod": { "type": "string", "nullable": true, "enum": [ "GET", "POST" ], "description": "The HTTP method for deauthorizeCallbackUrl. Defaults to POST." }, "tosUrl": { "type": "string", "format": "uri", "nullable": true, "description": "The Connect App's terms of service." }, "permissions": { "type": "array", "description": "The permissions the Connect App asks for.", "items": { "type": "string", "enum": [ "get-all", "post-all" ] } }, "imageKey": { "type": "string", "nullable": true, "description": "The imageKey from POST /v1/Account/ConnectApps/image/presigned-url, after the image was uploaded. Omit on update to keep the current image." } } }, "iam.v1.account.ConnectAppAuthorizeRequest": { "type": "object", "description": "The user's decision on the consent page. The authorizing account is always the authenticated account.", "required": [ "connectAppSid" ], "properties": { "connectAppSid": { "type": "string", "pattern": "^CN[0-9a-fA-F]{32}$", "format": "ConnectAppSid", "description": "The sid of the Connect App being authorized.", "example": "CNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }, "response": { "type": "string", "enum": [ "ALLOW", "DENY" ], "default": "ALLOW", "description": "ALLOW grants the app access; DENY returns an error redirect and changes nothing." } } }, "iam.v1.account.ConnectAppAuthorizeResponse": { "type": "object", "description": "Where to send the user next.", "properties": { "url": { "type": "string", "format": "uri", "description": "On ALLOW, the authorizeRedirectUrl with AccountSid (the Connect subaccount) and state added. On DENY, the authorizeRedirectUrl with error=unauthorized_client and state added.", "example": "https://example.com/callback?AccountSid=ACbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb&state=abc123" } } }, "iam.v1.account.ConnectAppConsentView": { "type": "object", "description": "What the authorize (consent) page shows for a Connect App, for the authenticated account.", "properties": { "name": { "type": "string", "description": "The Connect App's friendly name.", "example": "SmartScheduler" }, "company": { "type": "string", "description": "The company that owns the Connect App.", "example": "SmartScheduler Inc" }, "description": { "type": "string", "nullable": true, "description": "A description of the Connect App." }, "permissions": { "type": "array", "description": "The permissions the Connect App asks for.", "items": { "type": "string", "enum": [ "get-all", "post-all" ] } }, "presignedImageUrl": { "type": "string", "format": "uri", "nullable": true, "description": "A short-lived URL to download the app logo, or null if the app has no logo. Do not cache it." }, "alreadyAuthorized": { "type": "boolean", "description": "Whether the authenticated account has already authorized this Connect App." }, "redirectUrl": { "type": "string", "format": "uri", "nullable": true, "description": "Set only when alreadyAuthorized is true. The authorizeRedirectUrl with AccountSid (the Connect subaccount) and state added; redirect the user here instead of showing the consent page." } } } } }, "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", "x-twilio": { "apiStandards": "v0.1" } }, "openapi": "3.0.1", "paths": { "/v1/Keys": { "servers": [ { "url": "https://iam.twilio.com" } ], "description": "API keys", "x-twilio": { "defaultOutputProperties": [ "sid", "friendly_name", "date_created", "flags" ], "mountName": "get_api_keys", "className": "get_api_keys", "pathType": "list" }, "get": { "description": "Retrieve a list of all Keys for a account.", "tags": [ "IamV1GetApiKeys" ], "parameters": [ { "name": "AccountSid", "in": "query", "description": "The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^AC[0-9a-fA-F]{32}$" }, "required": true, "examples": { "readEmpty": { "value": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }, "readFull": { "value": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } } }, { "name": "PageSize", "in": "query", "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", "schema": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 1000 } }, { "name": "Page", "in": "query", "description": "The page index. This value is simply for client state.", "schema": { "type": "integer", "minimum": 0 } }, { "name": "PageToken", "in": "query", "description": "The page token. This is provided by the API.", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "keys": { "type": "array", "items": { "$ref": "#/components/schemas/iam.v1.get_keys" } }, "meta": { "properties": { "first_page_url": { "format": "uri", "type": "string" }, "key": { "type": "string" }, "next_page_url": { "format": "uri", "nullable": true, "type": "string" }, "page": { "type": "integer" }, "page_size": { "type": "integer" }, "previous_page_url": { "format": "uri", "nullable": true, "type": "string" }, "url": { "format": "uri", "type": "string" } }, "type": "object" } }, "title": "ListGetKeysResponse" }, "examples": { "readEmpty": { "value": { "keys": [], "meta": { "page": 0, "page_size": 50, "first_page_url": "https://iam.twilio.com/v1/Keys?AccountSid=ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0", "previous_page_url": null, "url": "https://iam.twilio.com/v1/Keys?AccountSid=ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0", "next_page_url": null, "key": "keys" } } }, "readFull": { "value": { "keys": [ { "sid": "SKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "friendly_name": "foo", "date_created": "Mon, 13 Jun 2016 22:50:08 +0000", "date_updated": "Mon, 13 Jun 2016 22:50:08 +0000", "flags": [ "rest_api", "signing" ] }, { "sid": "SKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab", "friendly_name": "bar", "date_created": "Mon, 13 Jun 2016 20:50:08 +0000", "date_updated": "Mon, 13 Jun 2016 20:50:08 +0000", "flags": [ "rest_api", "signing" ] } ], "meta": { "page": 0, "page_size": 50, "first_page_url": "https://iam.twilio.com/v1/Keys?AccountSid=ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0", "previous_page_url": null, "url": "https://iam.twilio.com/v1/Keys?AccountSid=ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0", "next_page_url": null, "key": "keys" } } } } } }, "headers": { "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "ListGetKeys" }, "post": { "description": "Create a new Signing Key for the account making the request.", "tags": [ "IamV1NewApiKey" ], "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/iam.v1.new_key" }, "examples": { "createStandardKey": { "value": { "sid": "SKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "friendly_name": "foo", "date_created": "Mon, 13 Jun 2016 22:50:08 +0000", "date_updated": "Mon, 13 Jun 2016 22:50:08 +0000", "secret": "foobar", "policy": null } }, "createRestrictedKey": { "value": { "sid": "SKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "friendly_name": "foo", "date_created": "Mon, 13 Jun 2016 22:50:08 +0000", "date_updated": "Mon, 13 Jun 2016 22:50:08 +0000", "secret": "foobar", "policy": { "allow": [ "/twilio/messaging/messages/read" ] } } } } } }, "headers": { "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "Created" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "CreateNewKey", "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "title": "CreateNewKeyRequest", "properties": { "AccountSid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^AC[0-9a-fA-F]{32}$", "description": "The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource." }, "FriendlyName": { "type": "string", "description": "A descriptive string that you create to describe the resource. It can be up to 64 characters long." }, "KeyType": { "type": "string", "description": "The \\`KeyType\\` form parameter is used to specify the type of key you want to create.\n\n**Default Behavior**: If \\`KeyType\\` is not specified, the API will generate a standard key.\n\n**Restricted Key**: If \\`KeyType\\` is set to \\`restricted\\`, the API will create a new restricted key. In this case, a policy object is required to define the permissions." }, "Policy": { "description": "The \\`Policy\\` object is a collection that specifies the allowed Twilio permissions for the restricted key.\nFor more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys)." } }, "required": [ "AccountSid" ] }, "examples": { "createStandardKey": { "value": { "FriendlyName": "foo", "AccountSid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } }, "createRestrictedKey": { "value": { "FriendlyName": "foo", "AccountSid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "KeyType": "restricted", "Policy": "{\"allow\":[\"/twilio/messaging/messages/read\"]}" } } } } } }, "x-twilio": { "mountName": "new_api_key" } } }, "/v1/Keys/{Sid}": { "servers": [ { "url": "https://iam.twilio.com" } ], "description": "API keys", "x-twilio": { "defaultOutputProperties": [ "sid", "friendly_name", "date_created" ], "mountName": "api_key", "pathType": "instance" }, "get": { "description": "Fetch a specific Key.", "tags": [ "IamV1ApiKey" ], "parameters": [ { "name": "Sid", "in": "path", "description": "The Twilio-provided string that uniquely identifies the Key resource to fetch.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^SK[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/iam.v1.key" }, "examples": { "fetchStandardKey": { "value": { "sid": "SKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "friendly_name": "foo", "date_created": "Mon, 13 Jun 2016 22:50:08 +0000", "date_updated": "Mon, 13 Jun 2016 22:50:08 +0000", "policy": null } }, "fetchRestrictedKey": { "value": { "sid": "SKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "friendly_name": "foo", "date_created": "Mon, 13 Jun 2016 22:50:08 +0000", "date_updated": "Mon, 13 Jun 2016 22:50:08 +0000", "policy": { "allow": [ "/twilio/messaging/messages/read" ] } } } } } }, "headers": { "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "FetchKey" }, "post": { "description": "Update a specific Key.", "tags": [ "IamV1ApiKey" ], "parameters": [ { "name": "Sid", "in": "path", "description": "The Twilio-provided string that uniquely identifies the Key resource to update.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^SK[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/iam.v1.key" }, "examples": { "updateStandardKey": { "value": { "sid": "SKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "friendly_name": "foo", "date_created": "Mon, 13 Jun 2016 22:50:08 +0000", "date_updated": "Mon, 13 Jun 2016 22:50:08 +0000", "policy": null } }, "updateRestrictedKey": { "value": { "sid": "SKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "friendly_name": "foo", "date_created": "Mon, 13 Jun 2016 22:50:08 +0000", "date_updated": "Mon, 13 Jun 2016 22:50:08 +0000", "policy": { "allow": [ "/twilio/messaging/messages/read", "/twilio/messaging/messages/update" ] } } } } } }, "headers": { "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "UpdateKey", "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "title": "UpdateKeyRequest", "properties": { "FriendlyName": { "type": "string", "description": "A descriptive string that you create to describe the resource. It can be up to 64 characters long." }, "Policy": { "description": "The \\`Policy\\` object is a collection that specifies the allowed Twilio permissions for the restricted key.\nFor more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys)." } } }, "examples": { "updateStandardKey": { "value": { "FriendlyName": "foo" } }, "updateRestrictedKey": { "value": { "FriendlyName": "foo", "Policy": "{\"allow\":[\"/twilio/messaging/messages/read\", \"/twilio/messaging/messages/update\"]}" } } } } } } }, "delete": { "description": "Delete a specific Key.", "tags": [ "IamV1ApiKey" ], "parameters": [ { "name": "Sid", "in": "path", "description": "The Twilio-provided string that uniquely identifies the Key resource to delete.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^SK[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "204": { "description": "The resource was deleted successfully." } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "DeleteKey" } }, "/v1/Roles/{RoleSid}/Permissions": { "servers": [ { "url": "https://iam.twilio.com" } ], "description": "", "x-twilio": { "defaultOutputProperties": [], "mountName": "role_permission", "parent": "/v1/Roles/{Sid}", "pathType": "list" }, "get": { "description": "List resolved permissions for a role", "tags": [ "IamV1RolePermission" ], "parameters": [ { "name": "RoleSid", "in": "path", "description": "The SID of the Role for which Permissions will be fetched.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IX[0-9a-fA-F]{32}$" }, "required": true }, { "name": "PageSize", "in": "query", "description": "How many resources to return in each list page. The default is 50, and the maximum is 100.", "schema": { "type": "integer", "format": "int32", "minimum": 1, "maximum": 100 } }, { "name": "Page", "in": "query", "description": "The page index. This value is simply for client state.", "schema": { "type": "integer", "minimum": 0 } }, { "name": "PageToken", "in": "query", "description": "The page token. This is provided by the API.", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "permissions": { "type": "array", "items": { "$ref": "#/components/schemas/iam.v1.role_permission" } }, "meta": { "properties": { "first_page_url": { "format": "uri", "type": "string" }, "key": { "type": "string" }, "next_page_url": { "format": "uri", "nullable": true, "type": "string" }, "page": { "type": "integer" }, "page_size": { "type": "integer" }, "previous_page_url": { "format": "uri", "nullable": true, "type": "string" }, "url": { "format": "uri", "type": "string" } }, "type": "object" } }, "title": "ListRolePermissionResponse" }, "examples": { "readEmpty": { "value": { "permissions": [], "meta": { "page": 0, "page_size": 50, "first_page_url": "https://iam.twilio.com/v1/Roles/IXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Permissions?PageSize=50&Page=0", "previous_page_url": null, "url": "https://iam.twilio.com/v1/Roles/IXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Permissions?PageSize=50&Page=0", "next_page_url": null, "key": "permissions" } } }, "readFull": { "value": { "permissions": [ { "sid": "IZaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "namespace": "twilio", "product": "iam", "resource": "roles", "action": "read", "externalDescription": "Read access to IAM roles" } ], "meta": { "page": 0, "page_size": 50, "first_page_url": "https://iam.twilio.com/v1/Roles/IXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Permissions?PageSize=50&Page=0", "previous_page_url": null, "url": "https://iam.twilio.com/v1/Roles/IXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Permissions?PageSize=50&Page=0", "next_page_url": null, "key": "permissions" } } } } } }, "headers": { "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [], "operationId": "ListRolePermission" } }, "/v1/token": { "servers": [ { "url": "https://iam.twilio.com" } ], "x-twilio": { "defaultOutputProperties": [], "pathType": "list" }, "post": { "security": [], "tags": [ "OauthV1Token" ], "summary": "Issues a new Access token (optionally identity_token & refresh_token) in exchange of Oauth grant", "operationId": "CreateToken", "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/oauth.v1.token" }, "examples": { "create": { "value": { "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", "refresh_token": "ghjbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", "id_token": "eyJhbdGciOiIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", "expires_in": 1438315200000, "token_type": "bearer" } } } } }, "description": "Created" } }, "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "title": "CreateTokenRequest", "properties": { "grant_type": { "type": "string", "description": "Grant type is a credential representing resource owner's authorization which can be used by client to obtain access token." }, "client_id": { "type": "string", "description": "A 34 character string that uniquely identifies this OAuth App." }, "client_secret": { "type": "string", "description": "The credential for confidential OAuth App." }, "code": { "type": "string", "description": "JWT token related to the authorization code grant type." }, "redirect_uri": { "type": "string", "description": "The redirect uri" }, "audience": { "type": "string", "description": "The targeted audience uri" }, "refresh_token": { "type": "string", "description": "JWT token related to refresh access token." }, "scope": { "type": "string", "description": "The scope of token" } }, "required": [ "grant_type", "client_id" ] }, "examples": { "create": { "value": { "client_id": "OQ7cda1a615f05a95634e643aaaf7081d7", "client_secret": "sUWblrQ4wx_aYkdAWjHXNvHinynkYOgBoiRyEQUeEntpgDEG47qnBFD98yoEzsTh", "grant_type": "client_credentials", "redirect_uri": "", "audience": "", "code": "", "refresh_token": "refresh_token", "scope": "scope" } } } } }, "required": true } } }, "/v1/Account/OAuthApps/{sid}": { "servers": [ { "url": "https://iam.twilio.com" } ], "put": { "summary": "Updates an existing OAuth app for the given OauthAppSid", "operationId": "UpdateOauthAppAccount", "tags": [ "Oauth2" ], "parameters": [ { "name": "sid", "in": "path", "required": true, "description": "Unique ID (sid) of the OAuth app", "schema": { "type": "string", "pattern": "^OQ[a-zA-Z0-9]{32}$" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/iam.v1.account.VendorOauthAppUpdateRequest" } } }, "required": true }, "responses": { "200": { "description": "Returns updated vendor oauthApp", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/iam.v1.account.VendorOauthAppCreateUpdateResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "description": "Twilio-specific error code", "type": "integer", "format": "int32" }, "message": { "description": "Error message", "type": "string" }, "more_info": { "description": "Link to Error Code References", "type": "string" }, "status": { "description": "HTTP response status code", "type": "integer", "format": "int32" } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "description": "Twilio-specific error code", "type": "integer", "format": "int32" }, "message": { "description": "Error message", "type": "string" }, "more_info": { "description": "Link to Error Code References", "type": "string" }, "status": { "description": "HTTP response status code", "type": "integer", "format": "int32" } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "description": "Twilio-specific error code", "type": "integer", "format": "int32" }, "message": { "description": "Error message", "type": "string" }, "more_info": { "description": "Link to Error Code References", "type": "string" }, "status": { "description": "HTTP response status code", "type": "integer", "format": "int32" } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "description": "Twilio-specific error code", "type": "integer", "format": "int32" }, "message": { "description": "Error message", "type": "string" }, "more_info": { "description": "Link to Error Code References", "type": "string" }, "status": { "description": "HTTP response status code", "type": "integer", "format": "int32" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "description": "Twilio-specific error code", "type": "integer", "format": "int32" }, "message": { "description": "Error message", "type": "string" }, "more_info": { "description": "Link to Error Code References", "type": "string" }, "status": { "description": "HTTP response status code", "type": "integer", "format": "int32" } } } } } } } }, "delete": { "summary": "Deletes an oauth app for the given AccountSid", "operationId": "DeleteOauthAppAccount", "tags": [ "Oauth2" ], "parameters": [ { "name": "sid", "in": "path", "required": true, "description": "Unique ID (sid) of the OAuth app", "schema": { "type": "string", "pattern": "^OQ[a-zA-Z0-9]{32}$" } } ], "responses": { "204": { "description": "Successfully deleted the OAuth app. No content returned." }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "description": "Twilio-specific error code", "type": "integer", "format": "int32" }, "message": { "description": "Error message", "type": "string" }, "more_info": { "description": "Link to Error Code References", "type": "string" }, "status": { "description": "HTTP response status code", "type": "integer", "format": "int32" } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "description": "Twilio-specific error code", "type": "integer", "format": "int32" }, "message": { "description": "Error message", "type": "string" }, "more_info": { "description": "Link to Error Code References", "type": "string" }, "status": { "description": "HTTP response status code", "type": "integer", "format": "int32" } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "description": "Twilio-specific error code", "type": "integer", "format": "int32" }, "message": { "description": "Error message", "type": "string" }, "more_info": { "description": "Link to Error Code References", "type": "string" }, "status": { "description": "HTTP response status code", "type": "integer", "format": "int32" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "description": "Twilio-specific error code", "type": "integer", "format": "int32" }, "message": { "description": "Error message", "type": "string" }, "more_info": { "description": "Link to Error Code References", "type": "string" }, "status": { "description": "HTTP response status code", "type": "integer", "format": "int32" } } } } } } } } }, "/v1/Account/OAuthApps": { "servers": [ { "url": "https://iam.twilio.com" } ], "post": { "summary": "Creates an oauth app for the given AccountSid", "operationId": "CreateOauthAppAccount", "tags": [ "Oauth2" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/iam.v1.account.VendorOauthAppCreateRequest" } } }, "required": true }, "responses": { "201": { "description": "Returns newly created vendor oauthApp", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/iam.v1.account.VendorOauthAppCreateUpdateResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "description": "Twilio-specific error code", "type": "integer", "format": "int32" }, "message": { "description": "Error message", "type": "string" }, "more_info": { "description": "Link to Error Code References", "type": "string" }, "status": { "description": "HTTP response status code", "type": "integer", "format": "int32" } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "description": "Twilio-specific error code", "type": "integer", "format": "int32" }, "message": { "description": "Error message", "type": "string" }, "more_info": { "description": "Link to Error Code References", "type": "string" }, "status": { "description": "HTTP response status code", "type": "integer", "format": "int32" } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "description": "Twilio-specific error code", "type": "integer", "format": "int32" }, "message": { "description": "Error message", "type": "string" }, "more_info": { "description": "Link to Error Code References", "type": "string" }, "status": { "description": "HTTP response status code", "type": "integer", "format": "int32" } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "description": "Twilio-specific error code", "type": "integer", "format": "int32" }, "message": { "description": "Error message", "type": "string" }, "more_info": { "description": "Link to Error Code References", "type": "string" }, "status": { "description": "HTTP response status code", "type": "integer", "format": "int32" } } } } } } } } } }, "servers": [ { "url": "https://iam.twilio.com" } ], "tags": [ { "name": "IamV1Account" }, { "name": "IamV1AccountConnectApp" }, { "name": "IamV1ApiKey" }, { "name": "IamV1Authenticate" }, { "name": "IamV1GetApiKeys" }, { "name": "IamV1Index" }, { "name": "IamV1Jwks" }, { "name": "IamV1NewApiKey" }, { "name": "IamV1Permission" }, { "name": "IamV1PolicyAssignment" }, { "name": "IamV1PublicKey" }, { "name": "IamV1RefreshToken" }, { "name": "IamV1Role" }, { "name": "IamV1RoleAssignmentBatch" }, { "name": "IamV1RoleBySid" }, { "name": "IamV1Saml2" }, { "name": "IamV1Token" }, { "name": "IamV1ValidateToken" }, { "name": "IamV1Version" } ], "security": [ { "accountSid_authToken": [] } ] }