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

# Update company defaults



## OpenAPI

````yaml https://openapi.production.reelevant.io/v1/render/entity-manager post /companies/defaults
openapi: 3.0.0
info:
  title: entity-manager
  version: unknown
  description: |-
    # Errors
    | Error code | Message | HTTP status code | Payload |
    | :--- | :--- | :--- | :--- |
    | number | string | 400 |  |
servers:
  - url: https://api.reelevant.com/v2/
    description: production
security: []
paths:
  /companies/defaults:
    post:
      tags:
        - Company
      summary: Update company defaults
      operationId: set-defaults-company
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                roleId:
                  type: string
                resourceGroupIds:
                  type: array
                  items:
                    type: string
              additionalProperties: false
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      status:
                        type: string
                        enum:
                          - success
                    required:
                      - status
                    additionalProperties: false
                  - $ref: '#/components/schemas/InternalResponse_Company'
        '404':
          description: ''
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/InternalResponse_'
                  - type: object
                    properties:
                      status:
                        type: string
                        enum:
                          - fail
                      error_code:
                        type: number
                      code:
                        type: number
                      message:
                        type: string
                      data:
                        oneOf:
                          - type: object
                            properties: {}
                            additionalProperties: false
                          - type: object
                            properties:
                              id:
                                type: string
                            required:
                              - id
                            additionalProperties: false
                          - type: object
                            properties:
                              count:
                                type: number
                            required:
                              - count
                            additionalProperties: false
                          - type: object
                            properties:
                              id:
                                type: string
                            required:
                              - id
                            additionalProperties: false
                          - type: object
                            properties:
                              resources:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    name:
                                      type: string
                                    resources:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          id:
                                            type: string
                                        required:
                                          - id
                                        additionalProperties: false
                                  required:
                                    - name
                                    - resources
                                  additionalProperties: false
                            required:
                              - resources
                            additionalProperties: false
                          - type: object
                            properties:
                              id:
                                type: string
                            required:
                              - id
                            additionalProperties: false
                          - type: object
                            properties: {}
                            additionalProperties: false
                          - type: object
                            properties:
                              id:
                                type: string
                            required:
                              - id
                            additionalProperties: false
                          - type: object
                            properties:
                              id:
                                type: string
                            required:
                              - id
                            additionalProperties: false
                          - type: object
                            properties:
                              id:
                                type: string
                            required:
                              - id
                            additionalProperties: false
                          - type: object
                            properties:
                              id:
                                type: string
                            required:
                              - id
                            additionalProperties: false
                          - type: object
                            properties:
                              usedAt:
                                type: string
                                format: date-time
                            required:
                              - usedAt
                            additionalProperties: false
                          - type: object
                            properties:
                              id:
                                type: string
                            required:
                              - id
                            additionalProperties: false
                          - type: object
                            properties:
                              id:
                                type: string
                            required:
                              - id
                            additionalProperties: false
                          - type: object
                            properties:
                              id:
                                type: string
                            required:
                              - id
                            additionalProperties: false
                          - type: object
                            properties:
                              id:
                                type: string
                            required:
                              - id
                            additionalProperties: false
                          - type: object
                            properties:
                              id:
                                type: string
                            required:
                              - id
                            additionalProperties: false
                          - type: object
                            properties:
                              reason:
                                type: string
                            required:
                              - reason
                            additionalProperties: false
                          - type: object
                            properties:
                              domains:
                                type: array
                                items:
                                  type: string
                            required:
                              - domains
                            additionalProperties: false
                          - type: object
                            properties:
                              domain:
                                type: string
                            required:
                              - domain
                            additionalProperties: false
                          - type: object
                            properties:
                              reason:
                                oneOf:
                                  - type: string
                                    enum:
                                      - incomplete
                                  - type: string
                                    enum:
                                      - never-used
                            required:
                              - reason
                            additionalProperties: false
                          - type: object
                            properties:
                              properties:
                                type: array
                                items:
                                  type: string
                            required:
                              - properties
                            additionalProperties: false
                    required:
                      - status
                      - error_code
                      - code
                      - message
                    additionalProperties: false
      security:
        - password_auth: []
components:
  schemas:
    InternalResponse_Company:
      type: object
      properties:
        program:
          type: string
        version:
          type: string
        datetime:
          type: string
        status:
          type: string
        code:
          type: number
        message:
          type: string
        data:
          $ref: '#/components/schemas/Company'
      required:
        - program
        - version
        - datetime
        - status
        - message
        - data
      additionalProperties: false
    InternalResponse_:
      type: object
      properties:
        program:
          type: string
        version:
          type: string
        datetime:
          type: string
        status:
          type: string
        code:
          type: number
        message:
          type: string
        data:
          type: object
          properties: {}
          additionalProperties: false
      required:
        - program
        - version
        - datetime
        - status
        - message
        - data
      additionalProperties: false
    Company:
      $ref: '#/components/schemas/SerializedCompany'
    SerializedCompany:
      type: object
      properties:
        id:
          type: string
          readOnly: true
        defaultRoleId:
          type: string
        defaultResourceGroupIds:
          type: array
          items:
            type: string
        createdAt:
          type: string
          format: date-time
          readOnly: true
        updatedAt:
          type: string
          format: date-time
          readOnly: true
        scim:
          allOf:
            - $ref: '#/components/schemas/SCIMConfiguration'
          description: Configuration for inbound SCIM 2.0 provisioning
        disabled:
          type: boolean
        name:
          type: string
        plan:
          allOf:
            - $ref: '#/components/schemas/Plan_Without_ToJSON_Name_Features__id'
            - type: object
              properties:
                name:
                  type: string
                startDate:
                  type: string
                  format: date-time
                endDate:
                  type: string
                  format: date-time
                attributionPeriod:
                  type: number
              required:
                - name
                - startDate
                - endDate
              additionalProperties: false
        securityPolicy:
          allOf:
            - $ref: '#/components/schemas/CompanySecurityPolicy'
          description: Configuration for security policy (password duration...)
        variableProfiles:
          type: array
          items:
            $ref: '#/components/schemas/VariableProfile'
          description: List of profiles and they configurated variables
        sso:
          allOf:
            - $ref: '#/components/schemas/SSOConfiguration'
          description: Configuration for security policy (password duration...)
        custom:
          type: object
          properties:
            colors:
              type: array
              items:
                type: string
            workflowDomain:
              type: string
          additionalProperties: false
        retention:
          type: number
          readOnly: true
        features:
          type: object
          properties: {}
          additionalProperties:
            type: boolean
          readOnly: true
        events:
          type: object
          properties:
            product_page:
              oneOf:
                - type: string
                - type: array
                  items:
                    type: string
            add_cart:
              oneOf:
                - type: string
                - type: array
                  items:
                    type: string
            purchase:
              oneOf:
                - type: string
                - type: array
                  items:
                    type: string
          required:
            - product_page
            - add_cart
            - purchase
          additionalProperties: false
        meta:
          type: object
          properties: {}
          additionalProperties:
            oneOf:
              - type: string
              - type: number
              - type: boolean
                enum:
                  - 'false'
              - type: boolean
                enum:
                  - 'true'
      required:
        - id
        - defaultRoleId
        - defaultResourceGroupIds
        - createdAt
        - updatedAt
        - disabled
        - name
        - plan
        - securityPolicy
        - variableProfiles
        - retention
        - features
        - events
        - meta
      additionalProperties: false
    SCIMConfiguration:
      type: object
      properties:
        enabled:
          type: boolean
          description: |-
            Only switch gating the SCIM endpoints: requests against a
            company with SCIM disabled are rejected
        groupSync:
          type: boolean
          description: Synchronize SCIM groups with resource groups
        roleSource:
          oneOf:
            - type: string
              enum:
                - groups
            - type: string
              enum:
                - scim-roles
            - type: string
              enum:
                - none
          description: >-
            Where the user role comes from

            - `scim-roles`: match `roles[0].value` against the role names of the
            company

            - `groups`: resolve through `roleMapping` (group name -> role)

            - `none`: never set the role from SCIM
        roleMapping:
          type: array
          items:
            $ref: '#/components/schemas/SCIMRoleMapping'
          description: |-
            Ordered mapping used by the `groups` role source,
            the first matching group wins
        defaultRoleId:
          allOf:
            - $ref: '#/components/schemas/ObjectId'
          description: |-
            Role given to provisioned users when the role can't be
            resolved, falls back to `Company.defaultRoleId`
        deprovisionMode:
          oneOf:
            - type: string
              enum:
                - soft
            - type: string
              enum:
                - hard
          description: |-
            What `DELETE /Users/{id}` does: disable the user (`soft`) or
            erase it and its dependents (`hard`)
        lastSyncAt:
          type: string
          format: date-time
      required:
        - enabled
        - groupSync
        - roleSource
        - roleMapping
        - deprovisionMode
      additionalProperties: false
    Plan_Without_ToJSON_Name_Features__id:
      type: object
      properties:
        quotas:
          type: array
          items:
            $ref: '#/components/schemas/Quota'
      required:
        - quotas
      additionalProperties: false
    CompanySecurityPolicy:
      type: object
      properties:
        password:
          $ref: '#/components/schemas/CompanyPasswordSecurityPolicy'
      required:
        - password
      additionalProperties: false
    VariableProfile:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        variables:
          type: object
          properties:
            rlvt-u:
              type: string
            rlvt-m:
              type: string
            utm_campaign:
              type: string
            utm_source:
              type: string
            utm_medium:
              type: string
            utm_term:
              type: string
          additionalProperties: false
      required:
        - id
        - name
        - variables
      additionalProperties: false
    SSOConfiguration:
      $ref: >-
        #/components/schemas/SSOConfiguration_Without_ToJSON_PropertyLookup_Metadata_PrivateKey_Certificate
    SCIMRoleMapping:
      type: object
      properties:
        group:
          type: string
          description: Name of the group as sent by the identity provider
        roleId:
          $ref: '#/components/schemas/ObjectId'
      required:
        - group
        - roleId
      additionalProperties: false
    ObjectId:
      type: string
    Quota:
      type: object
      properties:
        type:
          oneOf:
            - type: string
              enum:
                - datasource
            - type: string
              enum:
                - individual
            - type: string
              enum:
                - display
        subtype:
          type: string
        quota:
          type: number
        usage:
          type: number
      required:
        - type
        - quota
      additionalProperties: false
    CompanyPasswordSecurityPolicy:
      type: object
      properties:
        duration:
          type: number
          description: |-
            Define the password duration of an user (in seconds)
            When a password expired, the user must reset his password
            Set 0 for disabled.
            Default value: 6 months
        rules:
          type: array
          items:
            type: object
            properties:
              type:
                oneOf:
                  - type: string
                    enum:
                      - special-characters
                  - type: string
                    enum:
                      - numbers
                  - type: string
                    enum:
                      - characters
                  - type: string
                    enum:
                      - uppercases
                  - type: string
                    enum:
                      - lowercases
              options:
                type: object
                properties:
                  minimum:
                    type: number
                    minimum: 0
                  maximum:
                    type: number
                    minimum: 0
                additionalProperties: false
            required:
              - type
              - options
            additionalProperties: false
          description: |-
            Rules to enforce password complexity
            (i.e. number of characters, number of special characters...)
        attempts:
          type: object
          properties:
            maximum:
              type: number
              description: |-
                Maximum of failed attempts before any lock
                Set to 0 for no maximum
              minimum: 0
            lockDuration:
              type: number
              description: |-
                How many time a user will be locked (in seconds)
                after {maximum} attempts count have been reached
                Set to 0 to lock an infinite time
              minimum: 0
          required:
            - maximum
            - lockDuration
          additionalProperties: false
          description: |-
            Policy about password attempts
            (when a user fails to use the right password)
      required:
        - duration
        - rules
        - attempts
      additionalProperties: false
    SSOConfiguration_Without_ToJSON_PropertyLookup_Metadata_PrivateKey_Certificate:
      type: object
      properties:
        domains:
          type: array
          items:
            type: string
          description: |-
            Domain to identify the company
            i.e. decathlon.com
        mode:
          oneOf:
            - type: string
              enum:
                - invitation
            - type: string
              enum:
                - create
          description: >-
            User mode for authentification

            - invitation: the user must have an account or an invitation to be
            able to login

            - create: the user will be created if he doesn't have an account or
            an invitation
        mandatory:
          type: boolean
          description: Force user to use SSO to connect
        lastLoginAt:
          type: string
          format: date-time
          description: |-
            Last time a user successfully logged in through this configuration
            Proof that the configuration works, required before enforcing SSO
        identityProvider:
          allOf:
            - $ref: '#/components/schemas/IdentityProvider'
          readOnly: true
      required:
        - domains
        - mode
        - mandatory
        - identityProvider
      additionalProperties: false
    IdentityProvider:
      type: object
      properties:
        entityMeta:
          $ref: '#/components/schemas/IdpMetadata'
        entitySetting:
          allOf:
            - $ref: '#/components/schemas/ServiceProviderSettings'
            - $ref: '#/components/schemas/IdentityProviderSettings'
        entityType:
          type: string
      required:
        - entityMeta
        - entitySetting
        - entityType
      additionalProperties: false
    IdpMetadata:
      type: object
      properties:
        xmlString:
          type: string
        meta:
          $ref: '#/components/schemas/AnyValue'
      required:
        - xmlString
        - meta
      additionalProperties: false
    ServiceProviderSettings:
      type: object
      properties:
        metadata:
          oneOf:
            - type: string
            - type: string
              format: binary
        entityID:
          type: string
        authnRequestsSigned:
          type: boolean
        wantAssertionsSigned:
          type: boolean
        wantMessageSigned:
          type: boolean
        wantLogoutResponseSigned:
          type: boolean
        wantLogoutRequestSigned:
          type: boolean
        privateKey:
          oneOf:
            - type: string
            - type: string
              format: binary
        privateKeyPass:
          type: string
        isAssertionEncrypted:
          type: boolean
        requestSignatureAlgorithm:
          type: string
        encPrivateKey:
          oneOf:
            - type: string
            - type: string
              format: binary
        encPrivateKeyPass:
          oneOf:
            - type: string
            - type: string
              format: binary
        assertionConsumerService:
          type: array
          items:
            $ref: '#/components/schemas/SSOService'
        singleLogoutService:
          type: array
          items:
            $ref: '#/components/schemas/SSOService'
        signatureConfig:
          $ref: '#/components/schemas/SignatureConfig'
        loginRequestTemplate:
          $ref: '#/components/schemas/SAMLDocumentTemplate'
        logoutRequestTemplate:
          $ref: '#/components/schemas/SAMLDocumentTemplate'
        signingCert:
          oneOf:
            - type: string
            - type: string
              format: binary
            - type: array
              items:
                oneOf:
                  - type: string
                  - type: string
                    format: binary
        encryptCert:
          oneOf:
            - type: string
            - type: string
              format: binary
            - type: array
              items:
                oneOf:
                  - type: string
                  - type: string
                    format: binary
        transformationAlgorithms:
          type: array
          items:
            type: string
        nameIDFormat:
          type: array
          items:
            type: string
        allowCreate:
          type: boolean
        relayState:
          type: string
        clockDrifts:
          type: array
          items:
            oneOf:
              - type: number
              - type: number
      additionalProperties: false
    IdentityProviderSettings:
      type: object
      properties:
        metadata:
          oneOf:
            - type: string
            - type: string
              format: binary
        requestSignatureAlgorithm:
          type: string
        loginResponseTemplate:
          $ref: '#/components/schemas/LoginResponseTemplate'
        logoutRequestTemplate:
          $ref: '#/components/schemas/SAMLDocumentTemplate'
        generateID:
          type: object
          properties: {}
          additionalProperties: false
        entityID:
          type: string
        privateKey:
          oneOf:
            - type: string
            - type: string
              format: binary
        privateKeyPass:
          type: string
        signingCert:
          oneOf:
            - type: string
            - type: string
              format: binary
            - type: array
              items:
                oneOf:
                  - type: string
                  - type: string
                    format: binary
        encryptCert:
          oneOf:
            - type: string
            - type: string
              format: binary
            - type: array
              items:
                oneOf:
                  - type: string
                  - type: string
                    format: binary
        nameIDFormat:
          type: array
          items:
            type: string
        singleSignOnService:
          type: array
          items:
            $ref: '#/components/schemas/SSOService'
        singleLogoutService:
          type: array
          items:
            $ref: '#/components/schemas/SSOService'
        isAssertionEncrypted:
          type: boolean
        encPrivateKey:
          oneOf:
            - type: string
            - type: string
              format: binary
        encPrivateKeyPass:
          type: string
        messageSigningOrder:
          type: string
        wantLogoutRequestSigned:
          type: boolean
        wantLogoutResponseSigned:
          type: boolean
        wantAuthnRequestsSigned:
          type: boolean
        wantLogoutRequestSignedResponseSigned:
          type: boolean
        tagPrefix:
          type: object
          properties: {}
          additionalProperties:
            type: string
      additionalProperties: false
    AnyValue:
      description: Can be any value
      nullable: true
    SSOService:
      type: object
      properties:
        isDefault:
          type: boolean
        Binding:
          type: string
        Location:
          type: string
      required:
        - Binding
        - Location
      additionalProperties: false
    SignatureConfig:
      type: object
      properties:
        prefix:
          type: string
        location:
          type: object
          properties:
            reference:
              type: string
            action:
              oneOf:
                - type: string
                  enum:
                    - append
                - type: string
                  enum:
                    - prepend
                - type: string
                  enum:
                    - before
                - type: string
                  enum:
                    - after
          additionalProperties: false
      additionalProperties: false
    SAMLDocumentTemplate:
      type: object
      properties:
        context:
          type: string
      additionalProperties: false
    LoginResponseTemplate:
      allOf:
        - $ref: '#/components/schemas/BaseSamlTemplate'
        - type: object
          properties:
            attributes:
              type: array
              items:
                $ref: '#/components/schemas/LoginResponseAttribute'
            additionalTemplates:
              $ref: '#/components/schemas/LoginResponseAdditionalTemplates'
    BaseSamlTemplate:
      type: object
      properties:
        context:
          type: string
      required:
        - context
      additionalProperties: false
    LoginResponseAttribute:
      type: object
      properties:
        name:
          type: string
        nameFormat:
          type: string
        valueXsiType:
          type: string
        valueTag:
          type: string
        valueXmlnsXs:
          type: string
        valueXmlnsXsi:
          type: string
      required:
        - name
        - nameFormat
        - valueXsiType
        - valueTag
      additionalProperties: false
    LoginResponseAdditionalTemplates:
      type: object
      properties:
        attributeStatementTemplate:
          $ref: '#/components/schemas/AttributeStatementTemplate'
        attributeTemplate:
          $ref: '#/components/schemas/AttributeTemplate'
      additionalProperties: false
    AttributeStatementTemplate:
      allOf:
        - $ref: '#/components/schemas/BaseSamlTemplate'
    AttributeTemplate:
      allOf:
        - $ref: '#/components/schemas/BaseSamlTemplate'
  securitySchemes:
    password_auth:
      type: oauth2
      flows:
        password:
          tokenUrl: https://api.reelevant.com/v1/auth/token
          refreshUrl: https://api.reelevant.com/v1/auth/token
          scopes: {}

````