---
title: "Get User"
url: "https://api-docs.centraldispatch.com/apis/membership-api-1-0-0/versions/565f78cb-7a6d-42ef-bd8b-1af2d1394eef/operations/getUser"
---

> Full API specification: https://api-docs.centraldispatch.com/apis/membership-api-1-0-0/versions/565f78cb-7a6d-42ef-bd8b-1af2d1394eef.md

# Get User

`GET` `/users/id/{userId}`

Operation ID: `getUser`

Get a user by ID.

## Path parameters

- `userId` (string, uuid, required) - The Central Dispatch user ID.

## Header parameters

- `Accept` (string, required) - The major version of the API to make a request against. This is a custom MIME type that contains `vnd.coxauto.v[#]+`. For example, to request a resource from version 1.x.x of an API, the Accept header should be set to `application/vnd.coxauto.v1+json`.

## Responses

- `200` - OK. Successful request.
- `401` - Unauthorized. Authentication failed or missing.
- `403` - Forbidden. The attempted action is not permitted.
- `404` - Not Found.
- `429` - Too Many Requests. Rate limit exceeded.
- `500` - Error.
- `503` - Service Unavailable. Temporary service interruption.

## OpenAPI definition

```yaml
openapi: 3.0.1
info:
  title: Membership API
  version: 1.0.0
servers:
  - url: https://membership-api.centraldispatch.com
    description: Production server
paths:
  /users/id/{userId}:
    get:
      tags:
        - Users
      summary: Get User
      description: Get a user by ID.
      operationId: getUser
      parameters:
        - name: userId
          in: path
          description: The Central Dispatch user ID.
          required: true
          schema:
            type: string
            format: uuid
          example: d71b5750-e89b-12d3-a456-426614174000
        - name: Accept
          in: header
          description: The major version of the API to make a request against. This is a
            custom MIME type that contains `vnd.coxauto.v[#]+`. For example, to
            request a resource from version 1.x.x of an API, the Accept header
            should be set to `application/vnd.coxauto.v1+json`.
          required: true
          schema:
            type: string
          example: application/vnd.coxauto.v1+json
      responses:
        "200":
          description: OK. Successful request.
          headers:
            X-CoxAuto-Media-Type:
              description: Contains the major version and format information.
              schema:
                type: string
              example: coxauto.v1; format=json
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UserResponse"
        "401":
          description: Unauthorized. Authentication failed or missing.
        "403":
          description: Forbidden. The attempted action is not permitted.
        "404":
          description: Not Found.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: "#/components/schemas/StatusError"
                  - $ref: "#/components/schemas/Errors"
        "429":
          description: Too Many Requests. Rate limit exceeded.
        "500":
          description: Error.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Errors"
        "503":
          description: Service Unavailable. Temporary service interruption.
      security:
        - Bearer: []
security:
  - Bearer: []
components:
  schemas:
    UserResponse:
      type: object
      properties:
        href:
          type: string
          description: The fully qualified URL of the user record.
          example: https://membership-api.centraldispatch.com/users/id/d71b5750-e89b-12d3-a456-426614174000
        userId:
          type: string
          description: The ID of the user.
          format: uuid
          example: d71b5750-e89b-12d3-a456-426614174000
        firstName:
          type: string
          description: The preferred first name of the user.
          nullable: true
          example: Mickey
        lastName:
          type: string
          description: The legal last name of the user.
          example: Smith
        legalFirstName:
          type: string
          description: The legal first name of the user.
          example: Michael
        emailAddress:
          type: string
          description: The email address of the user.
          nullable: true
          example: mickey@snoogle.com
        username:
          type: string
          description: The username of the user.
          example: msmith
        isActive:
          type: boolean
          description: Indicates if the user is active.
          example: true
        createdOn:
          type: string
          description: The creation date of the user (UTC/ISO 8601).
          format: date-time
          example: 2024-10-31T00:00:00Z
        updatedOn:
          type: string
          description: The last updated date of the user (UTC/ISO 8601).
          format: date-time
          example: 2024-10-15T00:00:00Z
        phoneNumber:
          type: string
          description: The phone number of the user.
          nullable: true
          example: 949-555-1323
      description: A user record.
    StatusError:
      type: object
      properties:
        status:
          type: string
          description: The status of the response.
          nullable: true
          example: error
        errors:
          type: array
          items:
            type: string
          description: A collection of error messages.
          nullable: true
          example:
            - The issue happened because something is wrong.
      description: An error occurred, and the request could not be completed.
    Errors:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: "#/components/schemas/Error"
          description: A collection of errors.
          nullable: true
      description: An error occurred, and the request could not be completed.
    Error:
      type: object
      properties:
        code:
          type: string
          description: The code used for the issue.
          nullable: true
          example: resource.issue_type
        message:
          type: string
          description: A detailed message.
          nullable: true
          example: The issue happened because something is wrong.
        property:
          type: string
          description: The property to which the issue is associated.
          nullable: true
          example: person
        properties:
          type: object
          additionalProperties:
            type: string
          description: Additional properties related to the issue.
          nullable: true
          example:
            firstName: D0nn@
            lastName: Sm!th
      description: Details of an error or issue.
  securitySchemes:
    Bearer:
      type: http
      scheme: Bearer
```
