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

# Re-bind the application to another GitHub credential

> Move the application onto a GitHub credential of the organisation whose App installation reaches its repository. The credential must exist (400 otherwise); whether its installation reaches the repository is reported in the answer rather than refused. A browser session twin is mounted at the same path without the /api/v1 prefix (cookie authentication).



## OpenAPI

````yaml https://platform.ankra.app/openapi.json put /api/v1/org/applications/{application_id}/repository-credential
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://platform.ankra.app
security: []
paths:
  /api/v1/org/applications/{application_id}/repository-credential:
    put:
      tags:
        - applications
      summary: Re-bind the application to another GitHub credential
      description: >-
        Move the application onto a GitHub credential of the organisation whose
        App installation reaches its repository. The credential must exist (400
        otherwise); whether its installation reaches the repository is reported
        in the answer rather than refused. A browser session twin is mounted at
        the same path without the /api/v1 prefix (cookie authentication).
      operationId: >-
        set_application_repository_credential_api_v1_org_applications__application_id__repository_credential_put
      parameters:
        - in: path
          name: application_id
          required: true
          schema:
            title: Application Id
            type: string
        - in: header
          name: authorization
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
        - in: header
          name: x-ankra-organisation-id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Ankra-Organisation-Id
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetApplicationRepositoryCredentialRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationRepositoryCredential'
          description: Successful Response
        '400':
          description: The credential does not exist in this organisation
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Application not found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    SetApplicationRepositoryCredentialRequest:
      properties:
        credential_name:
          description: A GitHub credential of this organisation to bind the application to.
          title: Credential Name
          type: string
      required:
        - credential_name
      title: SetApplicationRepositoryCredentialRequest
      type: object
    ApplicationRepositoryCredential:
      properties:
        credential_name:
          description: The GitHub credential the application's repository calls ride on.
          title: Credential Name
          type: string
        message:
          description: Why the binding does not resolve, when it does not.
          title: Message
          type: string
        resolved:
          description: >-
            The binding resolves to a GitHub App installation Ankra can mint a
            token for.
          title: Resolved
          type: boolean
      required:
        - credential_name
        - resolved
        - message
      title: ApplicationRepositoryCredential
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object

````