Twilio Roles API

The Roles API from Twilio — 2 operation(s) for roles.

Operations 5

POST /v1/Roles #
GET /v1/Roles #
POST /v1/Roles/{Sid} #
DELETE /v1/Roles/{Sid} #
GET /v1/Roles/{Sid} #

Documentation

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-roles-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 email required.

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

OpenAPI Specification

twilio-roles-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Twilio - Conversations Roles API
  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.52.0
servers:
- url: https://conversations.twilio.com
tags:
- name: Roles
paths:
  /v1/Roles:
    servers:
    - url: https://conversations.twilio.com
    description: A Role resource represents a set of permissions granted to a user within a service or a conversation.
    x-twilio:
      defaultOutputProperties:
      - sid
      - friendly_name
      - type
      pathType: list
    post:
      description: Create a new user role in your account's default service
      tags:
      - Roles
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/conversations.v1.role'
          description: Created
      security:
      - accountSid_authToken: []
      operationId: CreateRole
      x-maturity:
      - GA
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/CreateRoleRequest'
    get:
      description: Retrieve a list of all user roles in your account's default service
      tags:
      - Roles
      parameters:
      - 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
          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:
                $ref: '#/components/schemas/ListRoleResponse'
          description: OK
      security:
      - accountSid_authToken: []
      operationId: ListRole
      x-maturity:
      - GA
  /v1/Roles/{Sid}:
    servers:
    - url: https://conversations.twilio.com
    description: A Role resource represents a set of permissions granted to a user within a service or a conversation.
    x-twilio:
      defaultOutputProperties:
      - sid
      - friendly_name
      - type
      pathType: instance
    post:
      description: Update an existing user role in your account's default service
      tags:
      - Roles
      parameters:
      - name: Sid
        in: path
        description: The SID of the Role resource to update.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^RL[0-9a-fA-F]{32}$
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/conversations.v1.role'
          description: OK
      security:
      - accountSid_authToken: []
      operationId: UpdateRole
      x-maturity:
      - GA
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/UpdateRoleRequest'
    delete:
      description: Remove a user role from your account's default service
      tags:
      - Roles
      parameters:
      - name: Sid
        in: path
        description: The SID of the Role resource to delete.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^RL[0-9a-fA-F]{32}$
        required: true
      responses:
        '204':
          description: The resource was deleted successfully.
      security:
      - accountSid_authToken: []
      operationId: DeleteRole
      x-maturity:
      - GA
    get:
      description: Fetch a user role from your account's default service
      tags:
      - Roles
      parameters:
      - name: Sid
        in: path
        description: The SID of the Role resource to fetch.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^RL[0-9a-fA-F]{32}$
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/conversations.v1.role'
          description: OK
      security:
      - accountSid_authToken: []
      operationId: FetchRole
      x-maturity:
      - GA
components:
  schemas:
    UpdateRoleRequest:
      type: object
      required:
      - Permission
      properties:
        Permission:
          type: array
          items:
            type: string
          description: A permission that you grant to the role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. Note that the update action replaces all previously assigned permissions with those defined in the update action. To remove a permission, do not include it in the subsequent update action. The values for this parameter depend on the role's `type`.
    CreateRoleRequest:
      type: object
      required:
      - FriendlyName
      - Type
      - Permission
      properties:
        FriendlyName:
          type: string
          description: A descriptive string that you create to describe the new resource. It can be up to 64 characters long.
        Type:
          type: string
          $ref: '#/components/schemas/role_enum_role_type'
          description: 'The type of role. Can be: `conversation` for [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) roles or `service` for [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) roles.'
        Permission:
          type: array
          items:
            type: string
          description: A permission that you grant to the new role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. The values for this parameter depend on the role's `type`.
    conversations.v1.role:
      type: object
      properties:
        sid:
          type:
          - string
          - 'null'
          minLength: 34
          maxLength: 34
          pattern: ^RL[0-9a-fA-F]{32}$
          description: The unique string that we created to identify the Role resource.
        account_sid:
          type:
          - string
          - 'null'
          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 Role resource.
        chat_service_sid:
          type:
          - string
          - 'null'
          minLength: 34
          maxLength: 34
          pattern: ^IS[0-9a-fA-F]{32}$
          description: The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Role resource is associated with.
        friendly_name:
          type:
          - string
          - 'null'
          description: The string that you assigned to describe the resource.
          x-twilio:
            pii:
              handling: standard
              deleteSla: 30
        type:
          type:
          - string
          - 'null'
          $ref: '#/components/schemas/role_enum_role_type'
          description: 'The type of role. Can be: `conversation` for [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) roles or `service` for [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) roles.'
        permissions:
          type:
          - array
          - 'null'
          items:
            type: string
          description: An array of the permissions the role has been granted.
        date_created:
          type:
          - string
          - 'null'
          format: date-time
          description: The date and time in GMT when the resource was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
        date_updated:
          type:
          - string
          - 'null'
          format: date-time
          description: The date and time in GMT when the resource was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
        url:
          type:
          - string
          - 'null'
          format: uri
          description: An absolute API resource URL for this user role.
    ListRoleResponse:
      type: object
      properties:
        roles:
          type: array
          items:
            $ref: '#/components/schemas/conversations.v1.role'
        meta:
          type: object
          properties:
            first_page_url:
              type: string
              format: uri
            next_page_url:
              type:
              - string
              - 'null'
              format: uri
            page:
              type: integer
            page_size:
              type: integer
            previous_page_url:
              type:
              - string
              - 'null'
              format: uri
            url:
              type: string
              format: uri
            key:
              type: string
    role_enum_role_type:
      type: string
      enum:
      - conversation
      - service
  securitySchemes:
    accountSid_authToken:
      type: http
      scheme: basic
x-maturity:
- name: GA
  description: This product is Generally Available.