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

# Rename a role everywhere

> Renames a role in the team's role options, on every client association, and wherever it is referenced: library project templates (task assignees, leads, automation configs, follow-ups), automation configs and follow-ups on active-project tasks (run or not), email templates, scheduled emails, account settings, milestone tables and report columns. Idempotent.



## OpenAPI

````yaml /api-reference/cx/swagger.json post /contacts/roles/_rename
openapi: 3.0.0
info:
  description: CX API.
  title: CX API
  contact:
    name: API Support
    url: https://stax.ai
    email: support@stax.ai
  version: '1.0'
servers:
  - url: https://api.cx.stax.ai
security: []
paths:
  /contacts/roles/_rename:
    post:
      tags:
        - contacts
      summary: Rename a role everywhere
      description: >-
        Renames a role in the team's role options, on every client association,
        and wherever it is referenced: library project templates (task
        assignees, leads, automation configs, follow-ups), automation configs
        and follow-ups on active-project tasks (run or not), email templates,
        scheduled emails, account settings, milestone tables and report columns.
        Idempotent.
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/pkg_routes_contacts_roles.roleMutationRequest
        description: type, from, to
        required: true
      responses:
        '200':
          description: ok and what was updated
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '202':
          description: Still running after 25s; finishes in the background
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
        '409':
          description: A role with the new name already exists
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
      security:
        - ApiKeyAuth: []
components:
  schemas:
    pkg_routes_contacts_roles.roleMutationRequest:
      type: object
      properties:
        from:
          type: string
        name:
          type: string
        to:
          type: string
        type:
          type: string
  securitySchemes:
    ApiKeyAuth:
      description: CX API key. Create one in CX under Settings → Advanced → API Keys.
      in: header
      name: x-api-key
      type: apiKey

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.