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

# Post base authority matrix role

> Add authority matrix role



## OpenAPI

````yaml /swagger.json post /base/{baseId}/authority-matrix-role
openapi: 3.0.0
info:
  version: 1.0.0
  title: Teable App
  description: Manage Data as easy as drink a cup of tea
  x-logo:
    backgroundColor: '#F0F0F0'
    altText: Teable logo
servers:
  - url: https://app.teable.ai/api
security: []
paths:
  /base/{baseId}/authority-matrix-role:
    post:
      tags:
        - authority-matrix
      description: Add authority matrix role
      parameters:
        - schema:
            type: string
          required: true
          name: baseId
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                description:
                  type: string
                enabled:
                  type: boolean
                tables:
                  type: array
                  items:
                    type: object
                    properties:
                      tableId:
                        type: string
                      disabledActions:
                        type: array
                        items:
                          type: string
                      fieldRecordPermission:
                        type: array
                        items:
                          type: object
                          properties:
                            fieldId:
                              type: string
                            disabledActions:
                              type: array
                              items:
                                type: string
                              description: >-
                                Field operations, encompassing reading, editing,
                                and deleting, are presently disabled.
                          required:
                            - fieldId
                      recordFilter:
                        type: object
                        description: >-
                          A filter object for complex query conditions based on
                          fields, operators, and values. Use our visual query
                          builder at
                          https://app.teable.ai/developer/tool/query-builder to
                          build filters.
                      enabledViewIds:
                        type: array
                        items:
                          type: string
                      enabled:
                        type: boolean
                    required:
                      - tableId
                nodes:
                  type: array
                  items:
                    type: object
                    properties:
                      nodeType:
                        type: string
                        enum:
                          - workflow
                          - app
                      nodeId:
                        type: string
                      enabled:
                        type: boolean
                    required:
                      - nodeType
                      - nodeId
              required:
                - name
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  description:
                    type: string
                  baseId:
                    type: string
                  createdTime:
                    type: string
                  enabledTime:
                    type: string
                  tables:
                    type: array
                    items:
                      type: object
                      properties:
                        authorityMatrixRoleId:
                          type: string
                        tableId:
                          type: string
                        disabledActions:
                          type: array
                          items:
                            type: string
                        enabledViewIds:
                          type: array
                          items:
                            type: string
                        fieldRecordPermission:
                          type: array
                          items:
                            type: object
                            properties:
                              fieldId:
                                type: string
                              disabledActions:
                                type: array
                                items:
                                  type: string
                                description: >-
                                  Field operations, encompassing reading,
                                  editing, and deleting, are presently disabled.
                            required:
                              - fieldId
                        recordFilter:
                          type: object
                          description: >-
                            A filter object for complex query conditions based
                            on fields, operators, and values. Use our visual
                            query builder at
                            https://app.teable.ai/developer/tool/query-builder
                            to build filters.
                        createdTime:
                          type: string
                        enabledTime:
                          type: string
                      required:
                        - authorityMatrixRoleId
                        - tableId
                        - createdTime
                  nodes:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        authorityMatrixRoleId:
                          type: string
                        nodeType:
                          type: string
                          enum:
                            - workflow
                            - app
                        nodeId:
                          type: string
                        enabledTime:
                          type: string
                        createdTime:
                          type: string
                      required:
                        - authorityMatrixRoleId
                        - nodeType
                        - nodeId
                required:
                  - id
                  - name
                  - baseId
                  - createdTime
                  - tables
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request POST \
              --url https://app.teable.ai/api/base/%7BbaseId%7D/authority-matrix-role \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"name":"string","description":"string","enabled":true,"tables":[{"tableId":"string","disabledActions":["string"],"fieldRecordPermission":[{"fieldId":"string","disabledActions":["string"]}],"recordFilter":{},"enabledViewIds":["string"],"enabled":true}],"nodes":[{"nodeType":"workflow","nodeId":"string","enabled":true}]}'
        - lang: JavaScript
          source: >-
            const url =
            'https://app.teable.ai/api/base/%7BbaseId%7D/authority-matrix-role';

            const options = {
              method: 'POST',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              },
              body: '{"name":"string","description":"string","enabled":true,"tables":[{"tableId":"string","disabledActions":["string"],"fieldRecordPermission":[{"fieldId":"string","disabledActions":["string"]}],"recordFilter":{},"enabledViewIds":["string"],"enabled":true}],"nodes":[{"nodeType":"workflow","nodeId":"string","enabled":true}]}'
            };


            try {
              const response = await fetch(url, options);
              const data = await response.json();
              console.log(data);
            } catch (error) {
              console.error(error);
            }
        - lang: Node.js
          source: |-
            const http = require('https');

            const options = {
              method: 'POST',
              hostname: 'app.teable.ai',
              port: null,
              path: '/api/base/%7BbaseId%7D/authority-matrix-role',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              name: 'string',
              description: 'string',
              enabled: true,
              tables: [
                {
                  tableId: 'string',
                  disabledActions: ['string'],
                  fieldRecordPermission: [{fieldId: 'string', disabledActions: ['string']}],
                  recordFilter: {},
                  enabledViewIds: ['string'],
                  enabled: true
                }
              ],
              nodes: [{nodeType: 'workflow', nodeId: 'string', enabled: true}]
            }));
            req.end();
        - lang: Python
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("app.teable.ai")


            payload =
            "{\"name\":\"string\",\"description\":\"string\",\"enabled\":true,\"tables\":[{\"tableId\":\"string\",\"disabledActions\":[\"string\"],\"fieldRecordPermission\":[{\"fieldId\":\"string\",\"disabledActions\":[\"string\"]}],\"recordFilter\":{},\"enabledViewIds\":[\"string\"],\"enabled\":true}],\"nodes\":[{\"nodeType\":\"workflow\",\"nodeId\":\"string\",\"enabled\":true}]}"


            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
            }


            conn.request("POST", "/api/base/%7BbaseId%7D/authority-matrix-role",
            payload, headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````