> ## Documentation Index
> Fetch the complete documentation index at: https://conductorone-docs-cxp-655.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Automation

> Update the automation rule for an app entitlement, including its display name, description, and conditions.



## OpenAPI

````yaml https://spec.speakeasy.com/conductor-one/conductorone/my-source-with-code-samples post /api/v1/apps/{app_id}/entitlements/{app_entitlement_id}/automation/update
openapi: 3.1.0
info:
  description: The C1 API is a HTTP API for managing C1 resources.
  title: C1 API
  version: 0.1.0-alpha
servers:
  - description: The C1 API server for the current tenant.
    url: https://{tenantDomain}.conductor.one
    variables:
      tenantDomain:
        default: example
        description: The domain of the tenant to use for this request.
security:
  - bearerAuth: []
    oauth: []
paths:
  /api/v1/apps/{app_id}/entitlements/{app_entitlement_id}/automation/update:
    post:
      tags:
        - App Entitlement Automation
      summary: Update Automation
      description: >-
        Update the automation rule for an app entitlement, including its display
        name, description, and conditions.
      operationId: c1.api.app.v1.AppEntitlements.UpdateAutomation
      parameters:
        - in: path
          name: app_id
          required: true
          schema:
            description: The ID of the app that is associated with the app entitlement.
            readOnly: true
            type: string
        - in: path
          name: app_entitlement_id
          required: true
          schema:
            description: The unique ID for the App Entitlement.
            readOnly: true
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/c1.api.app.v1.AppEntitlementServiceUpdateAutomationRequestInput
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/c1.api.app.v1.AppEntitlementServiceUpdateAutomationResponse
          description: Successful response
      x-codeSamples:
        - lang: go
          label: UpdateAutomation
          source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/conductorone/conductorone-sdk-go/pkg/models/shared\"\n\tconductoronesdkgo \"github.com/conductorone/conductorone-sdk-go\"\n\t\"github.com/conductorone/conductorone-sdk-go/pkg/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n    ctx := context.Background()\n\n    s := conductoronesdkgo.New(\n        conductoronesdkgo.WithSecurity(shared.Security{\n            BearerAuth: \"<YOUR_BEARER_TOKEN_HERE>\",\n            Oauth: \"<YOUR_OAUTH_HERE>\",\n        }),\n    )\n\n    res, err := s.AppEntitlements.UpdateAutomation(ctx, operations.C1APIAppV1AppEntitlementsUpdateAutomationRequest{\n        AppEntitlementID: \"<id>\",\n        AppID: \"<id>\",\n    })\n    if err != nil {\n        log.Fatal(err)\n    }\n    if res.AppEntitlementServiceUpdateAutomationResponse != nil {\n        // handle response\n    }\n}"
        - lang: typescript
          label: Typescript (SDK)
          source: >-
            import { ConductoroneSDKTypescript } from
            "conductorone-sdk-typescript";


            const conductoroneSDKTypescript = new ConductoroneSDKTypescript({
              security: {
                bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
                oauth: "<YOUR_OAUTH_HERE>",
              },
            });


            async function run() {
              const result = await conductoroneSDKTypescript.appEntitlements.updateAutomation({
                appId: "<id>",
                appEntitlementId: "<id>",
              });

              console.log(result);
            }


            run();
components:
  schemas:
    c1.api.app.v1.AppEntitlementServiceUpdateAutomationRequestInput:
      description: >
        The AppEntitlementServiceUpdateAutomationRequest message.


        This message contains a oneof named conditions. Only a single field of
        the following list may be set at a time:
          - none
          - entitlements
          - cel
          - basic
      properties:
        basic:
          oneOf:
            - $ref: >-
                #/components/schemas/c1.api.app.v1.AppEntitlementAutomationRuleBasic
            - type: 'null'
        cel:
          oneOf:
            - $ref: >-
                #/components/schemas/c1.api.app.v1.AppEntitlementAutomationRuleCEL
            - type: 'null'
        description:
          description: The description of the app entitlement.
          type:
            - string
            - 'null'
        displayName:
          description: The display name of the app entitlement.
          type:
            - string
            - 'null'
        entitlements:
          oneOf:
            - $ref: >-
                #/components/schemas/c1.api.app.v1.AppEntitlementAutomationRuleEntitlement
            - type: 'null'
        none:
          oneOf:
            - $ref: >-
                #/components/schemas/c1.api.app.v1.AppEntitlementAutomationRuleNone
            - type: 'null'
        updateMask:
          type:
            - string
            - 'null'
      title: App Entitlement Service Update Automation Request
      type: object
      x-speakeasy-name-override: AppEntitlementServiceUpdateAutomationRequest
    c1.api.app.v1.AppEntitlementServiceUpdateAutomationResponse:
      description: The AppEntitlementServiceUpdateAutomationResponse message.
      properties:
        AppEntitlementAutomation:
          oneOf:
            - $ref: '#/components/schemas/c1.api.app.v1.AppEntitlementAutomation'
            - type: 'null'
      title: App Entitlement Service Update Automation Response
      type: object
      x-speakeasy-name-override: AppEntitlementServiceUpdateAutomationResponse
    c1.api.app.v1.AppEntitlementAutomationRuleBasic:
      description: The AppEntitlementAutomationRuleBasic message.
      properties:
        expression:
          description: The expression field.
          type:
            - string
            - 'null'
      title: App Entitlement Automation Rule Basic
      type: object
      x-speakeasy-name-override: AppEntitlementAutomationRuleBasic
    c1.api.app.v1.AppEntitlementAutomationRuleCEL:
      description: The AppEntitlementAutomationRuleCEL message.
      properties:
        expression:
          description: The expression field.
          type:
            - string
            - 'null'
      title: App Entitlement Automation Rule Cel
      type: object
      x-speakeasy-name-override: AppEntitlementAutomationRuleCEL
    c1.api.app.v1.AppEntitlementAutomationRuleEntitlement:
      description: The AppEntitlementAutomationRuleEntitlement message.
      properties:
        entitlementRefs:
          description: The entitlementRefs field.
          items:
            $ref: '#/components/schemas/c1.api.app.v1.AppEntitlementRef'
          type:
            - array
            - 'null'
      title: App Entitlement Automation Rule Entitlement
      type: object
      x-speakeasy-name-override: AppEntitlementAutomationRuleEntitlement
    c1.api.app.v1.AppEntitlementAutomationRuleNone:
      description: The AppEntitlementAutomationRuleNone message.
      title: App Entitlement Automation Rule None
      type: object
      x-speakeasy-name-override: AppEntitlementAutomationRuleNone
    c1.api.app.v1.AppEntitlementAutomation:
      description: >
        The AppEntitlementAutomation message.


        This message contains a oneof named conditions. Only a single field of
        the following list may be set at a time:
          - none
          - entitlements
          - cel
          - basic
      properties:
        appEntitlementId:
          description: The unique ID for the App Entitlement.
          readOnly: true
          type:
            - string
            - 'null'
        appId:
          description: The ID of the app that is associated with the app entitlement.
          readOnly: true
          type:
            - string
            - 'null'
        basic:
          oneOf:
            - $ref: >-
                #/components/schemas/c1.api.app.v1.AppEntitlementAutomationRuleBasic
            - type: 'null'
        cel:
          oneOf:
            - $ref: >-
                #/components/schemas/c1.api.app.v1.AppEntitlementAutomationRuleCEL
            - type: 'null'
        createdAt:
          format: date-time
          readOnly: true
          type:
            - string
            - 'null'
        deletedAt:
          format: date-time
          readOnly: true
          type:
            - string
            - 'null'
        description:
          description: The description of the app entitlement.
          type:
            - string
            - 'null'
        displayName:
          description: The display name of the app entitlement.
          type:
            - string
            - 'null'
        entitlements:
          oneOf:
            - $ref: >-
                #/components/schemas/c1.api.app.v1.AppEntitlementAutomationRuleEntitlement
            - type: 'null'
        lastRunStatus:
          oneOf:
            - $ref: >-
                #/components/schemas/c1.api.app.v1.AppEntitlementAutomationLastRunStatus
            - type: 'null'
        managedByRequestCatalogId:
          description: >-
            When set, this automation is managed by an access profile's bundle
            automation.
             Read-only. Not settable via this API.
          readOnly: true
          type:
            - string
            - 'null'
        none:
          oneOf:
            - $ref: >-
                #/components/schemas/c1.api.app.v1.AppEntitlementAutomationRuleNone
            - type: 'null'
        updatedAt:
          format: date-time
          readOnly: true
          type:
            - string
            - 'null'
      title: App Entitlement Automation
      type: object
      x-speakeasy-entity: App Entitlement Automation
      x-speakeasy-name-override: AppEntitlementAutomation
    c1.api.app.v1.AppEntitlementRef:
      description: The AppEntitlementRef message.
      properties:
        appId:
          description: The appId field.
          type:
            - string
            - 'null'
        id:
          description: The id field.
          type:
            - string
            - 'null'
      title: App Entitlement Ref
      type: object
      x-speakeasy-name-override: AppEntitlementRef
    c1.api.app.v1.AppEntitlementAutomationLastRunStatus:
      description: The AppEntitlementAutomationLastRunStatus message.
      properties:
        errorMessage:
          description: The errorMessage field.
          readOnly: true
          type:
            - string
            - 'null'
        lastCompletedAt:
          format: date-time
          readOnly: true
          type:
            - string
            - 'null'
        status:
          description: The status field.
          enum:
            - APP_ENTITLEMENT_AUTOMATION_RUN_STATUS_UNSPECIFIED
            - APP_ENTITLEMENT_AUTOMATION_RUN_STATUS_SUCCESS
            - APP_ENTITLEMENT_AUTOMATION_RUN_STATUS_FAILED
            - APP_ENTITLEMENT_AUTOMATION_RUN_STATUS_IN_PROGRESS
          readOnly: true
          type:
            - string
            - 'null'
          x-speakeasy-unknown-values: allow
      title: App Entitlement Automation Last Run Status
      type: object
      x-speakeasy-name-override: AppEntitlementAutomationLastRunStatus
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http
    oauth:
      description: >-
        This API uses OAuth2 with the Client Credential flow.

        Client Credentials must be sent in the BODY, not the headers.

        For an example of how to implement this, refer to the
        [c1TokenSource.Token()](https://github.com/ConductorOne/conductorone-sdk-go/blob/3375fe7c0126d17e7ec4e711693dee7b791023aa/token_source.go#L101-L187)
        function.
      flows:
        clientCredentials:
          scopes: {}
          tokenUrl: /auth/v1/token
      type: oauth2

````