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

# Promote

> Promote an unmanaged application into a managed application.
 Returns AlreadyExists when the application is already managed. The new application inherits source owners when user_ids is omitted.
 Concurrent promotion requests are not supported.



## OpenAPI

````yaml https://spec.speakeasy.com/conductor-one/conductorone/my-source-with-code-samples post /api/v1/apps/{app_id}/resource_types/{resource_type_id}/managed_state_bindings/{resource_id}/promote
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}/resource_types/{resource_type_id}/managed_state_bindings/{resource_id}/promote:
    post:
      tags:
        - Application Managed State
      summary: Promote
      description: |-
        Promote an unmanaged application into a managed application.
         Returns AlreadyExists when the application is already managed. The new application inherits source owners when user_ids is omitted.
         Concurrent promotion requests are not supported.
      operationId: c1.api.app.v1.AppManagedStateService.Promote
      parameters:
        - in: path
          name: app_id
          required: true
          schema:
            description: ID of the application that owns the connector.
            type: string
        - in: path
          name: resource_type_id
          required: true
          schema:
            description: ID of the resource type used for discovered applications.
            type: string
        - in: path
          name: resource_id
          required: true
          schema:
            description: Resource ID of the unmanaged application.
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/c1.api.app.v1.PromoteAppManagedStateBindingRequestInput
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/c1.api.app.v1.GetAppManagedStateBindingResponse
          description: >-
            GetAppManagedStateBindingResponse contains the managed state of a
            discovered application.
components:
  schemas:
    c1.api.app.v1.PromoteAppManagedStateBindingRequestInput:
      description: >-
        PromoteAppManagedStateBindingRequest identifies an unmanaged application
        and configures its owners.
      properties:
        appEntitlementOwnerRefs:
          description: Entitlements to assign as owners of the new application.
          items:
            $ref: '#/components/schemas/c1.api.app.v1.AppEntitlementRef'
          type:
            - array
            - 'null'
        expandMask:
          oneOf:
            - $ref: >-
                #/components/schemas/c1.api.app.v1.AppManagedStateBindingExpandMask
            - type: 'null'
        userIds:
          description: |-
            User IDs to assign as owners of the new application.
             If omitted, the application inherits the owners of the source connector application.
          items:
            type: string
          type:
            - array
            - 'null'
      title: Promote App Managed State Binding Request
      type: object
      x-speakeasy-name-override: PromoteAppManagedStateBindingRequest
    c1.api.app.v1.GetAppManagedStateBindingResponse:
      description: >-
        GetAppManagedStateBindingResponse contains the managed state of a
        discovered application.
      properties:
        appManagementState:
          oneOf:
            - $ref: '#/components/schemas/c1.api.app.v1.AppManagedStateBindingView'
            - type: 'null'
        expanded:
          description: >-
            Related objects requested through expand_mask. REST Get requests do
            not support expansions; REST Promote requests do.
          items:
            additionalProperties: true
            description: >-
              Contains an arbitrary serialized message along with a @type that
              describes the type of the serialized message.
            properties:
              '@type':
                description: The type of the serialized message.
                type: string
            type: object
          type:
            - array
            - 'null'
      title: Get App Managed State Binding Response
      type: object
      x-speakeasy-name-override: GetAppManagedStateBindingResponse
    c1.api.app.v1.AppEntitlementRef:
      description: The AppEntitlementRef message.
      properties:
        appId:
          description: The appId field.
          type: string
        id:
          description: The id field.
          type: string
      title: App Entitlement Ref
      type: object
      x-speakeasy-name-override: AppEntitlementRef
    c1.api.app.v1.AppManagedStateBindingExpandMask:
      description: >-
        AppManagedStateBindingExpandMask controls which related objects are
        included in a response.
      properties:
        paths:
          description: >-
            Related objects to include. Supported values are `app_id`,
            `resource_id`, and `*`.
          items:
            type: string
          type:
            - array
            - 'null'
      title: App Managed State Binding Expand Mask
      type: object
      x-speakeasy-name-override: AppManagedStateBindingExpandMask
    c1.api.app.v1.AppManagedStateBindingView:
      description: >-
        AppManagedStateBindingView contains a managed-state binding and paths to
        its related objects.
      properties:
        appManagementStateBinding:
          oneOf:
            - $ref: '#/components/schemas/c1.api.app.v1.AppManagedStateBinding'
            - type: 'null'
        appPath:
          description: Path of the application that owns the connector.
          type: string
        resourcePath:
          description: >-
            Path of the connector resource representing the discovered
            application.
          type: string
      title: App Managed State Binding View
      type: object
      x-speakeasy-name-override: AppManagedStateBindingView
    c1.api.app.v1.AppManagedStateBinding:
      description: >-
        AppManagedStateBinding records whether a connector-discovered
        application is managed in ConductorOne.
      properties:
        appId:
          description: >-
            Application that owns the connector which discovered this
            application.
          readOnly: true
          type: string
        createdAt:
          format: date-time
          readOnly: true
          type:
            - string
            - 'null'
        deletedAt:
          format: date-time
          readOnly: true
          type:
            - string
            - 'null'
        displayName:
          description: Display name of the discovered application.
          type: string
        resourceId:
          description: Resource ID of the discovered application.
          readOnly: true
          type: string
        resourceTypeId:
          description: >-
            Resource type used by the connector to represent discovered
            applications.
          readOnly: true
          type: string
        state:
          oneOf:
            - $ref: '#/components/schemas/c1.api.app.v1.AppManagedState'
            - type: 'null'
        updatedAt:
          format: date-time
          readOnly: true
          type:
            - string
            - 'null'
      title: App Managed State Binding
      type: object
      x-speakeasy-name-override: AppManagedStateBinding
    c1.api.app.v1.AppManagedState:
      description: >
        AppManagedState identifies whether a discovered application is managed.


        This message contains a oneof named state. Only a single field of the
        following list may be set at a time:
          - unmanaged
          - managed
      properties:
        managed:
          oneOf:
            - $ref: >-
                #/components/schemas/c1.api.app.v1.AppManagedState.AppManagedStateManaged
            - type: 'null'
        unmanaged:
          oneOf:
            - $ref: >-
                #/components/schemas/c1.api.app.v1.AppManagedState.AppManagedStateUnmanaged
            - type: 'null'
      title: App Managed State
      type: object
      x-speakeasy-name-override: AppManagedState
    c1.api.app.v1.AppManagedState.AppManagedStateManaged:
      description: AppManagedStateManaged identifies the application created by promotion.
      properties:
        appId:
          description: ID of the managed application.
          type: string
      title: App Managed State Managed
      type: object
      x-speakeasy-name-override: AppManagedStateManaged
    c1.api.app.v1.AppManagedState.AppManagedStateUnmanaged:
      description: >-
        AppManagedStateUnmanaged indicates that the discovered application has
        not been promoted.
      title: App Managed State Unmanaged
      type: object
      x-speakeasy-name-override: AppManagedStateUnmanaged
  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

````