Sonar Roles API

The Roles API from Sonar — 1 operation(s) for roles.

Operations 2

GET /v1/roles GET Account Roles #
POST /v1/roles Create New Role & Permission #

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/sendsonar-com:sendsonar-com-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 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

sendsonar-com-roles-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Settings Roles API
  version: '1.0'
servers:
- url: https://www.sendsonar.com/api
security:
- sec0: []
  sec1: []
tags:
- name: Roles
paths:
  /v1/roles:
    get:
      summary: GET Account Roles
      description: An API to allow you to view all custom roles & permissions in your Sonar Account assuming you have Custom Roles & Permissions enabled
      operationId: get-account-roles
      parameters:
      - name: X-Token
        in: header
        description: Token for a given account found in the 'Company Settings' of your Sonar Account
        required: true
        schema:
          type: string
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: "[\n  {\n  \t\"id\":\"5b2273ec-XXXX-4b79-XXXX-36e4120cf5a6\",\n    \"name\": \"Admin\",\n    \"permission_ids\": [\"Array_of_strings\"],\n    \"users_count\": 50\n  },\n  {\n  \t\"id\":\"5b22XXXX-4b79-4b79-abcd-36e41XXXf5a6\",\n    \"name\": \"Member\",\n    \"permission_ids\": [\"Array_of_strings\"],\n    \"users_count\": 10\n  }\n]"
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      example: 5b2273ec-XXXX-4b79-XXXX-36e4120cf5a6
                    name:
                      type: string
                      example: Admin
                    permission_ids:
                      type: array
                      items:
                        type: string
                        example: Array_of_strings
                    users_count:
                      type: integer
                      example: 50
                      default: 0
        '401':
          description: '401'
          content:
            application/json:
              examples:
                Result:
                  value: "{\n    \"error\": \"Token or publishable_key not found\"\n}"
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Token or publishable_key not found
        '403':
          description: '403'
          content:
            application/json:
              examples:
                Result:
                  value: "{\n    \"error\": \"Roles and permissions not enabled\"\n}"
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Roles and permissions not enabled
      deprecated: false
      x-readme:
        code-samples:
        - language: curl
          code: "curl 'https://www.sendsonar.com/api/v1/roles' \\\n  -X GET \\\n  -H 'X-Token:XXXXXXXXXXXXXXXXXXXXXXXX'"
        samples-languages:
        - curl
      tags:
      - Roles
    post:
      summary: Create New Role & Permission
      description: ''
      operationId: create-new-role-permission
      parameters:
      - name: X-Token
        in: header
        description: Sonar Company Token
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - name
              - permission_ids
              properties:
                name:
                  type: string
                  description: Name for the specific role you want to create
                permission_ids:
                  type: array
                  description: Array of permission names that are added to a given role
                  items:
                    type: string
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: "{\n    \"id\": \"b1cb0054-XXXX-45c1-9a20-7d476bc3c734\",\n    \"name\": \"myRoleName\",\n    \"permission_ids\": [\"Array_of_strings\"],\n    \"users_count\": 0\n}"
              schema:
                type: object
                properties:
                  id:
                    type: string
                    example: b1cb0054-XXXX-45c1-9a20-7d476bc3c734
                  name:
                    type: string
                    example: myRoleName
                  permission_ids:
                    type: array
                    items:
                      type: string
                      example: Array_of_strings
                  users_count:
                    type: integer
                    example: 0
                    default: 0
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
      x-readme:
        code-samples:
        - language: curl
          code: "curl 'https://www.sendsonar.com/api/v1/roles' \\\n  -X POST \\\n  -H 'X-Token:XXXXXXXXXXXXXXXXXXXXXXXX' \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"name\": \"myRoleName\", \"permission_ids\": [\"Array of strings\"]}'"
        samples-languages:
        - curl
      tags:
      - Roles
components:
  securitySchemes:
    sec0:
      type: apiKey
      name: X-Token
      in: header
      x-default: ''
    sec1:
      type: apiKey
      name: token
      in: query
      x-default: ''
x-readme-fauxas: true
x-provenance:
  method: searched
  source: https://docs.sendsonar.com/reference
  harvested: '2026-10-25'
  tool: harvest-readme-openapi.py
  note: Assembled verbatim from the OpenAPI definition ReadMe embeds in each operation page of the provider's developer portal; paths and components merged by API title, nothing authored.
  assembled_from:
  - https://docs.sendsonar.com/reference/addupdate-customer.md
  - https://docs.sendsonar.com/reference/append-tag-to-message.md
  - https://docs.sendsonar.com/reference/available-phone-number.md
  - https://docs.sendsonar.com/reference/close-customer.md
  - https://docs.sendsonar.com/reference/create-new-role-permission.md
  - https://docs.sendsonar.com/reference/create-new-sonar-account.md
  - https://docs.sendsonar.com/reference/create-webhook.md
  - https://docs.sendsonar.com/reference/delete-customer-properties.md
  - https://docs.sendsonar.com/reference/delete-webhooks.md
  - https://docs.sendsonar.com/reference/double-opt-in-prompt.md
  - https://docs.sendsonar.com/reference/events.md
  - https://docs.sendsonar.com/reference/follow-up-endpoint.md
  - https://docs.sendsonar.com/reference/gdpr-delete-request.md
  - https://docs.sendsonar.com/reference/gdpr-get-request.md
  - https://docs.sendsonar.com/reference/get-account-roles.md
  - https://docs.sendsonar.com/reference/get-all-users-from-account.md
  - https://docs.sendsonar.com/reference/get-conversation-by-id.md
  - https://docs.sendsonar.com/reference/get-customer.md
  - https://docs.sendsonar.com/reference/get-specific-user-by-id.md
  - https://docs.sendsonar.com/reference/get-webhook.md
  - https://docs.sendsonar.com/reference/invite-new-user.md
  - https://docs.sendsonar.com/reference/personalized-campaign.md
  - https://docs.sendsonar.com/reference/remove-follow-up.md
  - https://docs.sendsonar.com/reference/send-campaign.md
  - https://docs.sendsonar.com/reference/send-message.md
  - https://docs.sendsonar.com/reference/unassign-agent.md
  - https://docs.sendsonar.com/reference/update-webhook.md
  merge:
    pages: 27
    deduped: 52
    conflicts_kept_first: 0