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

# Creates a case manager on a referral

> Adds a case manager to a referral that belongs to the authenticated group.
`name` and at least one valid email are required. Phone numbers are stored
as digits. `status_email` defaults to true and `co_sign_emails` defaults
to false. The write stays on this referral.




## OpenAPI

````yaml /openapi.yaml post /api/v2/referrals/{referral_id}/case_managers
openapi: 3.1.0
info:
  title: Scan.com API
  version: v2
  description: >-
    The Scan.com Partner API creates imaging referrals, schedules visits, and
    returns radiology reports.
servers:
  - url: https://api.staging.scan.com
    description: Sandbox
  - url: https://api.scan.com
    description: Production
security:
  - BearerAuth: []
tags:
  - name: Courier SSO
    description: >-
      Mint a one-time Courier portal SSO URL with the same Bearer token used for
      the rest of the API.
  - name: Webhooks
    description: >-
      Outbound HTTP POST notifications sent to your api_credentials.webhook_url
      when visit or notification status changes. Configure api_credentials on
      your LawFirm, Practice, CoordinationGroup, Insurance, Employer, or
      NurseCaseManagementGroup.
  - name: Order Documents
    description: >-
      Retrieve radiology report PDFs, DICOM imaging, and invoices for orders
      visible to the authenticated group.
  - name: Locations
    description: >-
      Search imaging centers near an address, or rank them for a referral after
      medical safety answers are on file. Partners submit a preferred center;
      Scan books the visit.
  - name: Testing
    description: Staging-only fixture bootstrap, status advancement, and test webhooks.
  - name: FHIR
    description: >-
      Opt-in FHIR R4 read shapes for DiagnosticReport and ImagingStudy. Not a
      FHIR server.
paths:
  /api/v2/referrals/{referral_id}/case_managers:
    post:
      tags:
        - Referrals
      summary: Creates a case manager on a referral
      description: >
        Adds a case manager to a referral that belongs to the authenticated
        group.

        `name` and at least one valid email are required. Phone numbers are
        stored

        as digits. `status_email` defaults to true and `co_sign_emails` defaults

        to false. The write stays on this referral.
      operationId: createReferralCaseManager
      parameters:
        - name: referral_id
          in: path
          required: true
          description: Referral ID
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - case_manager
              properties:
                case_manager:
                  type: object
                  required:
                    - name
                    - emails
                  properties:
                    name:
                      type: string
                    emails:
                      type: array
                      minItems: 1
                      items:
                        type: string
                        format: email
                    phone_numbers:
                      type: array
                      items:
                        type: string
                    status_email:
                      type: boolean
                      default: true
                    co_sign_emails:
                      type: boolean
                      default: false
      responses:
        '201':
          description: Case manager created
          content:
            application/json:
              schema:
                type: object
                required:
                  - case_manager
                properties:
                  case_manager:
                    $ref: '#/components/schemas/CaseManager'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - BearerAuth: []
components:
  schemas:
    CaseManager:
      type: object
      description: A case manager contact on a referral
      required:
        - id
        - name
        - emails
        - phone_numbers
        - status_email
        - co_sign_emails
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
          example: Ada Lovelace
        emails:
          type: array
          minItems: 1
          items:
            type: string
            format: email
          description: At least one valid email is required
        phone_numbers:
          type: array
          items:
            type: string
          description: Stored as digits only
          example:
            - '6135551234'
        status_email:
          type: boolean
          description: >-
            When true, Scan emails this case manager about case status. Defaults
            to true.
        co_sign_emails:
          type: boolean
          description: >-
            When true, Scan emails this case manager for co-sign. Defaults to
            false.
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
        type:
          type: string
          example: validation_error
        code:
          type: string
          example: unprocessable_entity
        request_id:
          type: string
        documentation_url:
          type: string
        errors:
          type: array
          items:
            type: string
      required:
        - error
        - message
        - type
        - code
  responses:
    Unauthorized:
      description: Missing, expired, or wrong-environment token
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            unauthorized:
              value:
                error: Unauthorized
                message: Unauthorized
                type: authentication_error
                code: unauthorized
                request_id: abc-123
                documentation_url: https://docs.scan.com/guides/errors#unauthorized
            expired:
              value:
                error: API token expired
                message: API token expired
                type: authentication_error
                code: api_token_expired
                request_id: abc-123
                documentation_url: https://docs.scan.com/guides/errors#api_token_expired
    NotFound:
      description: Resource not found or not accessible to this account
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Referral not found
            message: Referral not found
            type: not_found_error
            code: not_found
            request_id: abc-123
            documentation_url: https://docs.scan.com/guides/errors#not_found
    UnprocessableEntity:
      description: Request body failed validation
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Phone is invalid
            message: Phone is invalid
            type: validation_error
            code: unprocessable_entity
            request_id: abc-123
            documentation_url: https://docs.scan.com/guides/errors#unprocessable_entity
            errors:
              - Phone is invalid
    TooManyRequests:
      description: Sandbox request allowance exhausted
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Sandbox request limit reached
            message: Sandbox request limit reached
            type: rate_limit_error
            code: sandbox_request_limit_reached
            request_id: abc-123
            documentation_url: https://docs.scan.com/guides/errors#sandbox_request_limit_reached
    InternalServerError:
      description: Unexpected internal error
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Internal server error
            message: Internal server error
            type: api_error
            code: internal_error
            request_id: abc-123
            documentation_url: https://docs.scan.com/guides/errors#internal_error
  headers:
    RequestId:
      description: Correlate this response with Scan support.
      schema:
        type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >
        `Authorization: Bearer <api_token>`. Reuse the same token on later
        requests

        until it expires or is revoked. Do not request a new token for each
        call.

        The token does not expire after 24 hours. Sandbox tokens come from Get

        API keys and allow 2,000 successful requests or 7 days, or 90 days with

        an access code. Failed 4xx/5xx responses do not consume the allowance.

        Production tokens are issued from the group's API access tab and last

        until the expiry set there, or until revoked when no expiry is set.

````

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