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

# Update an organization

> Update organization name. Requires owner or admin role.



## OpenAPI

````yaml https://api.surnex.io/openapi.json patch /v1/organizations/{org_id}
openapi: 3.1.0
info:
  title: Surnex API
  description: |-
    Surnex SEO Platform API — api.surnex.io

    Provides the complete backend for the Surnex SEO dashboard including:
    - Multi-tenant organization management
    - Project tracking (domains)
    - Keyword rank tracking (Phase 1+)
    - Backlink analysis (Phase 3+)
    - Site auditing (Phase 4+)
    - Stripe billing integration
    - MCP endpoint for AI agents at /mcp
  version: 0.1.0
servers: []
security: []
paths:
  /v1/organizations/{org_id}:
    patch:
      tags:
        - Organizations
      summary: Update an organization
      description: Update organization name. Requires owner or admin role.
      operationId: update_organization_v1_organizations__org_id__patch
      parameters:
        - name: org_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Org Id
        - name: X-API-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrgUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIResponse_OrgResponse_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    OrgUpdate:
      properties:
        name:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 2
            - type: 'null'
          title: Name
          description: New organization name
      type: object
      title: OrgUpdate
      description: Request body for updating an existing organization.
    APIResponse_OrgResponse_:
      properties:
        success:
          type: boolean
          title: Success
          default: true
        data:
          anyOf:
            - $ref: '#/components/schemas/OrgResponse'
            - type: 'null'
      type: object
      title: APIResponse[OrgResponse]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    OrgResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          title: Name
        slug:
          type: string
          title: Slug
        created_by:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Created By
        stripe_customer_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Stripe Customer Id
        trial_ends_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Trial Ends At
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - name
        - slug
        - created_at
        - updated_at
      title: OrgResponse
      description: Organization data returned by API endpoints.
    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:
    HTTPBearer:
      type: http
      scheme: bearer

````