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

# Claim Git Organization

> Claim a Git organization for an OpenHands organization.

Only admin and owner roles can claim Git organizations.
A Git organization can only be claimed by one OpenHands organization at a time.

Args:
    org_id: OpenHands organization UUID
    request: Claim request with provider and git_organization
    user_id: Authenticated user ID (injected by permission check)

Returns:
    GitOrgClaimResponse with the created claim details

Raises:
    HTTPException 409: If the Git organization is already claimed
    HTTPException 403: If user lacks permission



## OpenAPI

````yaml /openapi/openhands-cloud.json post /api/organizations/{org_id}/git-claims
openapi: 3.1.0
info:
  title: OpenHands
  description: 'OpenHands: Code Less, Make More'
  version: 0.0.1
servers: []
security: []
paths:
  /api/organizations/{org_id}/git-claims:
    post:
      tags:
        - Orgs
      summary: Claim Git Organization
      description: >-
        Claim a Git organization for an OpenHands organization.


        Only admin and owner roles can claim Git organizations.

        A Git organization can only be claimed by one OpenHands organization at
        a time.


        Args:
            org_id: OpenHands organization UUID
            request: Claim request with provider and git_organization
            user_id: Authenticated user ID (injected by permission check)

        Returns:
            GitOrgClaimResponse with the created claim details

        Raises:
            HTTPException 409: If the Git organization is already claimed
            HTTPException 403: If user lacks permission
      operationId: claim_git_organization_api_organizations__org_id__git_claims_post
      parameters:
        - name: org_id
          in: path
          required: true
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Org Id
        - name: X-Org-Id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Org-Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GitOrgClaimRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GitOrgClaimResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    GitOrgClaimRequest:
      properties:
        provider:
          type: string
          title: Provider
        git_organization:
          type: string
          title: Git Organization
      type: object
      required:
        - provider
        - git_organization
      title: GitOrgClaimRequest
      description: Request model for claiming a Git organization.
    GitOrgClaimResponse:
      properties:
        id:
          type: string
          title: Id
        org_id:
          type: string
          title: Org Id
        provider:
          type: string
          title: Provider
        git_organization:
          type: string
          title: Git Organization
        claimed_by:
          type: string
          title: Claimed By
        claimed_at:
          type: string
          title: Claimed At
      type: object
      required:
        - id
        - org_id
        - provider
        - git_organization
        - claimed_by
        - claimed_at
      title: GitOrgClaimResponse
      description: Response model for a Git organization claim.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-Access-Token

````