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

# Add a role to a SaaS

> Add a new role to the SaaS catalog. Only allowed when the SaaS role capability is set to MANUAL (i.e. a manually-provisioned SaaS). Returns 409 otherwise.

<span className="badge-write">Key: Write</span><span className="badge-company">Scope: Company</span>


## OpenAPI

````yaml https://api.getprimo.com/openapi.json post /saas/{saasId}/roles
openapi: 3.1.1
info:
  title: Public API - BETA
  description: Read docs on https://docs.getprimo.com/
  version: '1.0'
  contact: {}
servers:
  - url: https://api.getprimo.com
security:
  - apikey: []
tags: []
paths:
  /saas/{saasId}/roles:
    post:
      tags:
        - Saas
      summary: Add a role to a SaaS
      description: >-
        Add a new role to the SaaS catalog. Only allowed when the SaaS role
        capability is set to MANUAL (i.e. a manually-provisioned SaaS). Returns
        409 otherwise.
      operationId: addSaasRole
      parameters:
        - name: saasId
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SaasEntitlementMutationBody'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SaasEntitlementList_Output'
components:
  schemas:
    SaasEntitlementMutationBody:
      type: object
      properties:
        name:
          description: Display name of the entitlement.
          type: string
          minLength: 1
      required:
        - name
    SaasEntitlementList_Output:
      type: object
      properties:
        entitlements:
          type: array
          description: >-
            Full list of entitlements of this type for the SaaS after the
            change.
          items:
            type: object
            properties:
              id:
                type: string
              name:
                type: string
            required:
              - id
              - name
            additionalProperties: false
      required:
        - entitlements
      additionalProperties: false
  securitySchemes:
    apikey:
      scheme: bearer
      bearerFormat: API key
      type: http
      description: >-
        Use your Primo API key in the Authorization header as `Bearer
        <API_KEY>`.

````