> ## Documentation Index
> Fetch the complete documentation index at: https://help.wotnot.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get account roles

> Returns all the user roles in your account, with what each role can access and who has it.



## OpenAPI

````yaml GET /v1/accounts/{account_id}/user-roles
openapi: 3.1.0
info:
  title: WotNot API
  version: 1.0.0
  description: 'WotNot API: Get account roles.'
servers:
  - url: https://api.wotnot.io
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/accounts/{account_id}/user-roles:
    get:
      summary: Get account roles
      description: >-
        Returns all the user roles in your account, with what each role can
        access and who has it.
      operationId: getAccountRoles
      parameters:
        - name: account_id
          in: path
          required: true
          description: The ID of your WotNot account.
          schema:
            type: string
        - name: Content-Type
          in: header
          required: true
          description: Always set this to `application/json`.
          schema:
            type: string
            enum:
              - application/json
          example: application/json
      responses:
        '200':
          description: Returns `ok` set to `true`, the account's `roles`, and `pagination`.
          content:
            application/json:
              schema:
                type: object
                required:
                  - roles
                  - ok
                  - pagination
                properties:
                  roles:
                    type: array
                    description: The user roles in the account.
                    items:
                      $ref: '#/components/schemas/Role'
                  ok:
                    type: boolean
                    description: '`true` when the request worked. Errors return `false`.'
                    example: true
                  pagination:
                    type: object
                    description: Where this page sits in the full list of roles.
                    required:
                      - offset
                      - limit
                      - total
                    properties:
                      offset:
                        type: integer
                        description: >-
                          Where this page starts in the list of roles, for
                          example `0`.
                        example: 0
                      limit:
                        type: integer
                        description: The most roles returned in one page, for example `50`.
                        example: 50
                      total:
                        type: integer
                        description: The total number of roles.
                        example: 1
              example:
                roles:
                  - role_configuration:
                      live_chat:
                        settings: true
                        full_access: true
                        human_handover: true
                      analytics:
                        full_access: true
                      support_ticket:
                        full_access: true
                      bot_builder:
                        full_access: true
                        read_only_access: true
                      ticket:
                        full_access: true
                      account_settings:
                        teammates: true
                        billing: true
                        variables: true
                        automation: true
                        csat: true
                        teams: true
                        events: true
                        settings: true
                        link_tracking: true
                      ai_studio:
                        full_access: true
                      contacts:
                        full_access: true
                      app_market:
                        full_access: true
                      channel_configuration:
                        sms:
                          opt_out_management: true
                          configuration: true
                        web:
                          appearance: true
                          trigger_conditions: true
                          pop_up_messages: true
                          configuration: true
                          general_settings: true
                        whatsapp:
                          templates: true
                          configuration: true
                        instagram:
                          configuration: true
                        facebook:
                          configuration: true
                        voice:
                          configuration: true
                        email:
                          templates: true
                          configuration: true
                    users_in_role:
                      - user_type_id: 1
                        image_url: null
                        last_name: Doe
                        first_name: John
                        id: 112233
                        email: john.doe@gmail.com
                    master_role_id: 2
                    id: 99
                    role_name: admin
                    description: >-
                      Has complete access to configure and manage every aspect
                      of the platform.
                    created_at: 04-Jan-26, 01:13 AM
                ok: true
                pagination:
                  offset: 0
                  limit: 50
                  total: 1
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    Role:
      type: object
      description: One user role in the account.
      required:
        - role_configuration
        - users_in_role
        - master_role_id
        - id
        - role_name
        - description
        - created_at
      properties:
        role_configuration:
          $ref: '#/components/schemas/RoleConfiguration'
        users_in_role:
          type: array
          description: The users who have this role.
          items:
            type: object
            required:
              - user_type_id
              - image_url
              - last_name
              - first_name
              - id
              - email
            properties:
              user_type_id:
                type: integer
                description: The user's type ID, for example `1`.
                example: 1
              image_url:
                type:
                  - string
                  - 'null'
                description: >-
                  A link to the user's profile picture. `null` when there isn't
                  one.
                example: null
              last_name:
                type: string
                description: The user's last name.
                example: Doe
              first_name:
                type: string
                description: The user's first name.
                example: John
              id:
                type: integer
                description: The user's ID. Use it as `user_id` in Update user role.
                example: 112233
              email:
                type: string
                description: The user's email address.
                example: john.doe@gmail.com
        master_role_id:
          type: integer
          description: The ID of the master role, for example `2`.
          example: 2
        id:
          type: integer
          description: >-
            The role's ID. Use it as `role_id` in Invite user and Update user
            role.
          example: 99
        role_name:
          type: string
          description: The role's name, for example `admin`.
          example: admin
        description:
          type: string
          description: What the role is for, in plain words.
          example: >-
            Has complete access to configure and manage every aspect of the
            platform.
        created_at:
          type: string
          description: >-
            When the role was created, in the format `DD-Mon-YY, hh:mm AM`, for
            example `04-Jan-26, 01:13 AM`.
          example: 04-Jan-26, 01:13 AM
    RoleConfiguration:
      type: object
      description: What the role can access, area by area.
      required:
        - live_chat
        - analytics
        - support_ticket
        - bot_builder
        - ticket
        - account_settings
        - ai_studio
        - contacts
        - app_market
        - channel_configuration
      properties:
        live_chat:
          type: object
          description: Permissions for Live chat.
          required:
            - settings
            - full_access
            - human_handover
          properties:
            settings:
              type: boolean
              description: '`true` if the role has access to Live chat settings.'
              example: true
            full_access:
              type: boolean
              description: '`true` if the role has full access to Live chat.'
              example: true
            human_handover:
              type: boolean
              description: '`true` if the role has access to Live chat human handover.'
              example: true
        analytics:
          type: object
          description: Permissions for Analytics.
          required:
            - full_access
          properties:
            full_access:
              type: boolean
              description: '`true` if the role has full access to Analytics.'
              example: true
        support_ticket:
          type: object
          description: Permissions for Support ticket.
          required:
            - full_access
          properties:
            full_access:
              type: boolean
              description: '`true` if the role has full access to Support ticket.'
              example: true
        bot_builder:
          type: object
          description: Permissions for Bot builder.
          required:
            - full_access
            - read_only_access
          properties:
            full_access:
              type: boolean
              description: '`true` if the role has full access to Bot builder.'
              example: true
            read_only_access:
              type: boolean
              description: '`true` if the role has read-only access to Bot builder.'
              example: true
        ticket:
          type: object
          description: Permissions for Ticket.
          required:
            - full_access
          properties:
            full_access:
              type: boolean
              description: '`true` if the role has full access to Ticket.'
              example: true
        account_settings:
          type: object
          description: Permissions for Account settings.
          required:
            - teammates
            - billing
            - variables
            - automation
            - csat
            - teams
            - events
            - settings
            - link_tracking
          properties:
            teammates:
              type: boolean
              description: '`true` if the role has access to Account settings teammates.'
              example: true
            billing:
              type: boolean
              description: '`true` if the role has access to Account settings billing.'
              example: true
            variables:
              type: boolean
              description: '`true` if the role has access to Account settings variables.'
              example: true
            automation:
              type: boolean
              description: '`true` if the role has access to Account settings automation.'
              example: true
            csat:
              type: boolean
              description: '`true` if the role has access to Account settings CSAT.'
              example: true
            teams:
              type: boolean
              description: '`true` if the role has access to Account settings teams.'
              example: true
            events:
              type: boolean
              description: '`true` if the role has access to Account settings events.'
              example: true
            settings:
              type: boolean
              description: '`true` if the role has access to Account settings settings.'
              example: true
            link_tracking:
              type: boolean
              description: '`true` if the role has access to Account settings link tracking.'
              example: true
        ai_studio:
          type: object
          description: Permissions for AI Studio.
          required:
            - full_access
          properties:
            full_access:
              type: boolean
              description: '`true` if the role has full access to AI Studio.'
              example: true
        contacts:
          type: object
          description: Permissions for Contacts.
          required:
            - full_access
          properties:
            full_access:
              type: boolean
              description: '`true` if the role has full access to Contacts.'
              example: true
        app_market:
          type: object
          description: Permissions for App market.
          required:
            - full_access
          properties:
            full_access:
              type: boolean
              description: '`true` if the role has full access to App market.'
              example: true
        channel_configuration:
          type: object
          description: Permissions for each channel's setup.
          required:
            - sms
            - web
            - whatsapp
            - instagram
            - facebook
            - voice
            - email
          properties:
            sms:
              type: object
              description: Permissions for SMS.
              required:
                - opt_out_management
                - configuration
              properties:
                opt_out_management:
                  type: boolean
                  description: '`true` if the role has access to SMS opt-out management.'
                  example: true
                configuration:
                  type: boolean
                  description: '`true` if the role has access to SMS configuration.'
                  example: true
            web:
              type: object
              description: Permissions for Web.
              required:
                - appearance
                - trigger_conditions
                - pop_up_messages
                - configuration
                - general_settings
              properties:
                appearance:
                  type: boolean
                  description: '`true` if the role has access to Web appearance.'
                  example: true
                trigger_conditions:
                  type: boolean
                  description: '`true` if the role has access to Web trigger conditions.'
                  example: true
                pop_up_messages:
                  type: boolean
                  description: '`true` if the role has access to Web pop-up messages.'
                  example: true
                configuration:
                  type: boolean
                  description: '`true` if the role has access to Web configuration.'
                  example: true
                general_settings:
                  type: boolean
                  description: '`true` if the role has access to Web general settings.'
                  example: true
            whatsapp:
              type: object
              description: Permissions for WhatsApp.
              required:
                - templates
                - configuration
              properties:
                templates:
                  type: boolean
                  description: '`true` if the role has access to WhatsApp templates.'
                  example: true
                configuration:
                  type: boolean
                  description: '`true` if the role has access to WhatsApp configuration.'
                  example: true
            instagram:
              type: object
              description: Permissions for Instagram.
              required:
                - configuration
              properties:
                configuration:
                  type: boolean
                  description: '`true` if the role has access to Instagram configuration.'
                  example: true
            facebook:
              type: object
              description: Permissions for Facebook.
              required:
                - configuration
              properties:
                configuration:
                  type: boolean
                  description: '`true` if the role has access to Facebook configuration.'
                  example: true
            voice:
              type: object
              description: Permissions for Voice.
              required:
                - configuration
              properties:
                configuration:
                  type: boolean
                  description: '`true` if the role has access to Voice configuration.'
                  example: true
            email:
              type: object
              description: Permissions for Email.
              required:
                - templates
                - configuration
              properties:
                templates:
                  type: boolean
                  description: '`true` if the role has access to Email templates.'
                  example: true
                configuration:
                  type: boolean
                  description: '`true` if the role has access to Email configuration.'
                  example: true
    Error:
      type: object
      description: Returned whenever a request fails.
      required:
        - error
        - ok
        - status
        - message
      properties:
        error:
          type: string
          description: >-
            A short error code in capital letters, for example `UNAUTHORIZED`.
            Check this in your code to tell errors apart.
          example: UNAUTHORIZED
        ok:
          type: boolean
          description: Always `false` when something went wrong.
          example: false
        status:
          type: integer
          description: The HTTP status code, repeated in the body, for example `401`.
          example: 401
        message:
          type: string
          description: What went wrong and how to fix it, in plain words.
          example: Invalid token. Provide the valid account token.
  responses:
    Unauthorized:
      description: >-
        The token is missing or wrong. Check that the `Authorization` header is
        `Bearer` followed by your account token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: UNAUTHORIZED
            ok: false
            status: 401
            message: Invalid token. Provide the valid account token.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        All of WotNot's APIs use Bearer token authentication. Send your account
        token as `Bearer <token>`. You can find it in Settings > Account
        Settings > Developer. Keep it on your server: anyone who has it can call
        the API as your account.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.