Twilio Role Assignments API

Role assignment operations

Operations 3

GET /Organizations/{OrganizationSid}/RoleAssignments List role assignments #
POST /Organizations/{OrganizationSid}/RoleAssignments Create a role assignment #
DELETE /Organizations/{OrganizationSid}/RoleAssignments/{RoleAssignmentSid} Delete a role assignment #

Documentation

📖
Documentation
https://www.twilio.com/docs/iam/api/account
📖
Documentation
https://www.twilio.com/en-us/blog/insights/ai/what-is-intelligent-virtual-assistant
📖
Documentation
https://www.twilio.com/docs
📖
Documentation
https://www.twilio.com/docs/conversations
📖
Documentation
https://www.twilio.com/docs/marketplace
📖
Documentation
https://www.twilio.com/en-us/messaging
📖
Documentation
https://www.twilio.com/en-us/user-authentication-identity/verify
📖
Documentation
https://www.twilio.com/docs/video
📖
Documentation
https://www.twilio.com/en-us/voice
📖
Documentation
https://www.twilio.com/docs/lookup
📖
Documentation
https://www.twilio.com/docs/flex
📖
Documentation
https://www.twilio.com/docs/sendgrid
📖
Documentation
https://www.twilio.com/docs/iam/scim/api-reference
📖
Documentation
https://www.twilio.com/docs/iam/oauth-apps/account-oauth-apps
📖
Documentation
https://www.twilio.com/docs/iam/oauth-apps/oauth-access-token
📖
Documentation
https://www.twilio.com/docs/iam/oauth-apps/overview
📖
Documentation
https://www.twilio.com/docs/conversations/memory/api-quickstart
📖
Documentation
https://www.twilio.com/docs/conversations/knowledge
📖
Documentation
https://www.twilio.com/docs/conversational-intelligence
📖
Documentation
https://www.twilio.com/docs/voice
📖
Documentation
https://www.twilio.com/docs/voice/voice-insights
📖
Documentation
https://www.twilio.com/docs/global-infrastructure
📖
Documentation
https://www.twilio.com/docs/messaging
📖
Documentation
https://www.twilio.com/docs/phone-numbers
📖
Documentation
https://www.twilio.com/docs/content
📖
Documentation
https://www.twilio.com/docs/chat

Specifications

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/twilio:twilio-role-assignments-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

twilio-role-assignments-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Organization Public Role Assignments API
  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
  description: Role assignment operations
servers:
- url: https://preview-iam.twilio.com
security:
- oAuth2ClientCredentials: []
tags:
- name: Role Assignments
  description: Role assignment operations
paths:
  /Organizations/{OrganizationSid}/RoleAssignments:
    servers:
    - url: https://preview-iam.twilio.com
    get:
      tags:
      - Role Assignments
      summary: List role assignments
      description: List role assignments for the given organization
      operationId: ListRoleAssignments
      parameters:
      - name: OrganizationSid
        in: path
        required: true
        schema:
          pattern: OR[0-9a-f]{32}
          type: string
          format: OrganizationSid
          example: OR33f4f3aa6fffe840d000f8ef22e883db
      - name: PageSize
        in: query
        schema:
          maximum: 100
          minimum: 1
          type: integer
          format: int32
          default: 100
      - name: PageToken
        in: query
        schema:
          maxLength: 4096
          minLength: 1
          type: string
      - name: Identity
        in: query
        required: false
        schema:
          pattern: ^[A-Z]{2}[0-9a-fA-F]{32}$
          type: string
          format: Sid
          example: USa36de9717566c7eb6363671f54b87ba9
      - name: Scope
        in: query
        required: false
        schema:
          pattern: ^[A-Z]{2}[0-9a-fA-F]{32}$
          type: string
          format: Sid
          example: REDACTED_TWILIO_ACCOUNT_SID
      - name: ResourceType
        in: query
        required: false
        description: Filter by resource type for resource-level role assignments
        schema:
          type: string
      - name: ResourceId
        in: query
        required: false
        description: Filter by resource id for resource-level role assignments
        schema:
          type: string
      responses:
        '200':
          description: Returned list of role assignments
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiCreateRoleAssignmentResponsePage'
          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
        '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
          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
        '403':
          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
          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
    post:
      tags:
      - Role Assignments
      summary: Create a role assignment
      description: Create a role assignment for the given organization
      operationId: CreateRoleAssignment
      parameters:
      - name: OrganizationSid
        in: path
        required: true
        schema:
          pattern: OR[0-9a-f]{32}
          type: string
          format: OrganizationSid
          example: ORa36de9717566c7eb6363671f54b87ba9
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicApiCreateRoleAssignmentRequest'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiRoleAssignmentResponse'
          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
        '400':
          description: Bad request or business rules violation
          content:
            application/scim+json:
              schema:
                $ref: '#/components/schemas/TwilioServiceErrorResponse'
          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
        '403':
          description: Unauthorized
          content:
            application/scim+json:
              schema:
                $ref: '#/components/schemas/TwilioServiceErrorResponse'
          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
  /Organizations/{OrganizationSid}/RoleAssignments/{RoleAssignmentSid}:
    servers:
    - url: https://preview-iam.twilio.com
    delete:
      tags:
      - Role Assignments
      summary: Delete a role assignment
      description: Delete a role assignment for the given organization
      operationId: DeleteRoleAssignment
      parameters:
      - name: OrganizationSid
        in: path
        required: true
        schema:
          pattern: OR[0-9a-f]{32}
          type: string
          format: OrganizationSid
          example: ORa36de9717566c7eb6363671f54b87ba9
      - name: RoleAssignmentSid
        in: path
        required: true
        schema:
          pattern: IY[0-9a-f]{32}
          type: string
          format: IamRoleAssignmentSid
          example: IYa36de9717566c7eb6363671f54b87ba9
      responses:
        '204':
          description: No content
          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
        '400':
          description: Invalid request provided
          content:
            application/scim+json:
              schema:
                $ref: '#/components/schemas/TwilioServiceErrorResponse'
          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
        '403':
          description: Unauthorized
          content:
            application/scim+json:
              schema:
                $ref: '#/components/schemas/TwilioServiceErrorResponse'
          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
components:
  schemas:
    TwilioServiceErrorResponse:
      type: object
      properties:
        code:
          description: Twilio-specific error code
          type: integer
          format: int32
        message:
          description: Error message
          type: string
        moreInfo:
          description: Link to Error Code References
          type: string
        status:
          description: HTTP response status code
          type: integer
          format: int32
    PublicApiCreateRoleAssignmentResponsePage:
      type: object
      properties:
        content:
          type: array
          description: Page content
          items:
            $ref: '#/components/schemas/PublicApiRoleAssignmentResponse'
        meta:
          properties:
            first_page_url:
              format: uri
              type: string
            key:
              type: string
            next_page_url:
              format: uri
              type:
              - string
              - 'null'
            page:
              type: integer
            page_size:
              type: integer
            previous_page_url:
              format: uri
              type:
              - string
              - 'null'
            url:
              format: uri
              type: string
          type: object
    PublicApiRoleAssignmentResponse:
      type: object
      properties:
        sid:
          pattern: IY[0-9a-f]{32}
          type: string
          description: Twilio Role Assignment Sid representing this role assignment
          format: IamRoleAssignmentSid
          example: IYc4ddb9d0befdb122b0eff334e3084544
        role_sid:
          pattern: IX[0-9a-f]{32}
          type: string
          description: Twilio Role Sid representing assigned role
          format: IamRoleSid
          example: IXc4ddb9d0befdb122b0eff334e3084544
        scope:
          pattern: ^[A-Z]{2}[0-9a-fA-F]{32}$
          type: string
          description: Twilio Sid representing identity of this assignment
          format: Sid
          example: REDACTED_TWILIO_ACCOUNT_SID
        identity:
          pattern: ^[A-Z]{2}[0-9a-fA-F]{32}$
          type: string
          description: Twilio Sid representing scope of this assignment
          format: Sid
          example: USc4ddb9d0befdb122b0eff334e3084544
        resource_type:
          type:
          - string
          - 'null'
          description: The resource type for resource-level role assignments
        resource_id:
          type:
          - string
          - 'null'
          description: The resource id for resource-level role assignments
    PublicApiCreateRoleAssignmentRequest:
      required:
      - role_sid
      - scope
      - identity
      type: object
      properties:
        role_sid:
          pattern: IX[0-9a-f]{32}
          type: string
          description: Twilio Role Sid representing assigned role
          format: IamRoleSid
          example: IXc4ddb9d0befdb122b0eff334e3084544
        scope:
          pattern: ^[A-Z]{2}[0-9a-fA-F]{32}$
          type: string
          description: Twilio Sid representing scope of this assignment
          format: Sid
          example: REDACTED_TWILIO_ACCOUNT_SID
        identity:
          pattern: ^[A-Z]{2}[0-9a-fA-F]{32}$
          type: string
          description: Twilio Sid representing identity of this assignment
          format: Sid
          example: USc4ddb9d0befdb122b0eff334e3084544
        resource_type:
          type:
          - string
          - 'null'
          description: The resource type for resource-level role assignments
        resource_id:
          type:
          - string
          - 'null'
          description: The resource id for resource-level role assignments
  securitySchemes:
    oAuth2ClientCredentials:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://preview-iam.twilio.com/v1/token
          scopes: {}