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

# Assign phone to user

> Assigns a phone number to a specific user



## OpenAPI

````yaml /swagger.yml post /public/admin/phone-assignments
openapi: 3.0.0
info:
  title: Public API Docs
  description: Clerk Public API
  version: '1.0'
  contact: {}
servers:
  - url: https://web-api.clerk.chat
    description: Production server
  - url: http://localhost:3000
    description: Production server
security: []
tags: []
paths:
  /public/admin/phone-assignments:
    post:
      tags:
        - Admin
      summary: Assign phone to user
      description: Assigns a phone number to a specific user
      operationId: PublicAdminController_assignPhoneToUser
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssignPhoneToUserRequest'
      responses:
        '201':
          description: The user with assigned phone
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserResponse'
        '400':
          description: Invalid request body
        '401':
          description: Unauthorized request
        '403':
          description: You do not have permission to access this resource
        '404':
          description: Resource not found
        '422':
          description: Invalid request parameters
        '429':
          description: Too many requests for this resource
        '500':
          description: Internal server error
      security:
        - api_key: []
components:
  schemas:
    AssignPhoneToUserRequest:
      type: object
      description: Request to assign a phone number to a user
      properties:
        userId:
          type: string
          description: ID of the user to assign the phone to
        phoneId:
          type: string
          description: ID of the phone number to assign
      required:
        - userId
        - phoneId
    UserResponse:
      type: object
      description: Response containing user information
      properties:
        id:
          type: string
          description: The ID of the user
        name:
          type: string
          description: The name of the user
        email:
          type: string
          description: The email of the user
        phone:
          type: string
          description: The assigned phone number
      required:
        - id
        - name
        - email
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: apiKey

````