{ "components": { "securitySchemes": { "accountSid_authToken": { "scheme": "basic", "type": "http" }, "access_token_bearer": { "type": "http", "scheme": "bearer", "bearerFormat": "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." } } }, "new_key_enum_keytype": { "type": "string", "enum": [ "restricted" ] }, "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.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", "required": [ "friendlyName", "domainSignupType" ], "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" } } }, "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.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.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" }, "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 }, "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 }, "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" }, "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" } } }, "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" }, "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 }, "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" }, "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.Accounts.UserRole": { "type": "object", "description": "Account user role", "properties": { "sid": { "pattern": "IX[0-9a-f]{32}", "type": "string", "format": "IamRoleSid", "example": "IX8b69703c2a65ec199f061b0ae29745b1", "description": "Unique Twilio sid of the account role" }, "name": { "type": "string", "example": "Admin", "description": "The name of the role" } } }, "iam.v1.Accounts.UserInvitation": { "type": "object", "description": "Account user invitation", "properties": { "accountSid": { "pattern": "AC[0-9a-f]{32}", "type": "string", "format": "AccountSid", "example": "AC114547f9207efd8c49aa1e70bfd8c191", "description": "Unique Twilio sid of the account that the user was invited to" }, "sid": { "pattern": "NF[0-9a-f]{32}", "type": "string", "format": "IdentityNotificationSid", "example": "NFbfd75767416fbd8418bedafce743700a", "description": "Unique Twilio notification sid of the invitation" }, "friendlyName": { "type": "string", "description": "Friendly name of the account" }, "type": { "type": "string", "enum": [ "Account", "Subaccount" ], "description": "Type of the account" }, "email": { "type": "string", "format": "email", "example": "recipient@twilio.com", "description": "The recipient's email address" }, "roles": { "type": "array", "items": { "$ref": "#/components/schemas/iam.v1.Accounts.UserRole" }, "description": "The roles assigned to the user in the account" }, "status": { "type": "string", "enum": [ "PENDING", "EXPIRED" ], "description": "The status of the invitation" }, "invitedBy": { "type": "string", "format": "email", "example": "sender@twilio.com", "description": "The sender's email address" }, "dateCreated": { "type": "string", "format": "date-time", "description": "The date and time when the invitation was created" }, "dateLastSent": { "type": "string", "format": "date-time", "description": "The date and time when the invitation was last sent" }, "tokenExpired": { "type": "boolean", "description": "Indicates whether the invitation token has expired" } } } } }, "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/Accounts": {}, "/v1/Subaccounts": {}, "/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", "$ref": "#/components/schemas/new_key_enum_keytype", "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/Accounts/Search": {}, "/v1/Accounts/{accountSid}/Roles": {}, "/v1/Accounts/Stats": {}, "/v1/Users/Self": {}, "/v1/Users/EmailChange/Initiate": {}, "/v1/Users/EmailChange/Verify": {}, "/v1/Users/EmailChange/Resend": {}, "/v1/Users/OneConsoleProvisioningStatus": {}, "/v1/Users/Mfa/ChallengeMethod": {}, "/v1/Users/Mfa/PhoneNumber": {}, "/v1/Users/Mfa/VerifyInitialTotpToken": {}, "/v1/Users/Mfa/AddTotpFactor": {}, "/v1/Users/Mfa/DeleteTotpFactor": {}, "/v1/Users/Mfa/RegenerateRecoveryToken": {}, "/v1/Users/Mfa/InvalidateRememberedBrowsers": {}, "/v1/Operations/{operationId}": {}, "/v1/Operations/{operationId}/ChildOperations": {}, "/v1/Organizations/Info": {}, "/v1/Organizations/Features": {}, "/v1/Organizations/Domains": {}, "/v1/Organizations/Domains/{domainSid}": {}, "/v1/Organizations/Domains/Limit": {}, "/v1/Organizations/ManagedUsers": {}, "/v1/Organizations/ManagedUsers/{userSid}": {}, "/v1/Organizations/ExternalUsers": {}, "/v1/Organizations/ExternalUsers/{userSid}": {}, "/v1/Organizations/ImportUsers": {}, "/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/{sid}/secret": { "servers": [ { "url": "https://iam.twilio.com" } ] }, "/v1/Organization/OAuthApps/{sid}/secret": { "servers": [ { "url": "https://iam.twilio.com" } ] }, "/v1/Organization/OAuthApps/image/presigned-url": { "servers": [ { "url": "https://iam.twilio.com" } ] }, "/v1/Organizations/InvitedAccounts": {}, "/v1/Organizations/InvitedAccounts/Limit": {}, "/v1/Organizations/ImportUsers/EligibleUsers/Count": {}, "/v1/console/mfa/v3/device/verify": {}, "/v1/console/mfa/v3/recovery-code": {}, "/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" } } } } } } } } }, "/v1/Organizations/InvitedUsers": {}, "/v1/Organizations/ManagedAccounts/{accountSid}/ChangeOwner": {}, "/v1/Organizations/ManagedAccounts/{accountSid}/Organization": {}, "/v1/Users/SendPasswordResetEmail": {}, "/v1/Accounts/ChangeOwner": {}, "/v1/Accounts/Invitations": {}, "/v1/console/api/ipam/acr_list": {}, "/v1/console/api/ipam/add_ip": {}, "/v1/console/api/ipam/edit_ip": {}, "/v1/console/api/ipam/remove_ip": {}, "/v1/console/api/ipam/set_ipam_status": {}, "/v1/Authorize": {} }, "servers": [ { "url": "https://iam.twilio.com" } ], "tags": [ { "name": "IamV1Account" }, { "name": "IamV1ApiKey" }, { "name": "IamV1Authenticate" }, { "name": "IamV1GetApiKeys" }, { "name": "IamV1Index" }, { "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": [] } ] }