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

# Redirect user to messaging platform

> Public endpoint that redirects to the appropriate messaging platform for a shared user. Currently supports iMessage via SMS deep link. Pass an optional `msg` query parameter to override the default message body.



## OpenAPI

````yaml https://spectrum.photon.codes/openapi/json get /users/{userId}/redirect
openapi: 3.1.0
info:
  title: Spectrum Cloud External API
  description: Client-facing API for Spectrum Cloud.
  version: 1.0.0
servers:
  - url: https://spectrum.photon.codes
security: []
tags:
  - name: billing
    description: Billing and subscription operations
  - name: imessage
    description: iMessage platform operations
  - name: lines
    description: Phone line enumeration across platforms
  - name: platforms
    description: Platform management operations
  - name: users
    description: User operations
  - name: voice
    description: Voice platform operations
  - name: webhooks
    description: Webhook registration for receiving Spectrum events
  - name: whatsapp-business
    description: WhatsApp Business platform operations
  - name: slack
    description: Slack platform operations
paths:
  /users/{userId}/redirect:
    get:
      tags:
        - users
      summary: Redirect user to messaging platform
      description: >-
        Public endpoint that redirects to the appropriate messaging platform for
        a shared user. Currently supports iMessage via SMS deep link. Pass an
        optional `msg` query parameter to override the default message body.
      operationId: getUsersByUserIdRedirect
      parameters:
        - name: userId
          in: path
          required: true
          schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
        - name: msg
          in: query
          required: false
          schema:
            type: string
            minLength: 1
            maxLength: 1000
      responses:
        '302':
          description: 'Redirect to the messaging platform deep link (e.g. sms: URL).'
          headers:
            Location:
              description: Messaging platform deep link URL.
              schema:
                type: string
        '403':
          description: >-
            User is not a shared user, or the messaging platform is not enabled
            for the project.
        '404':
          description: User not found.
        '422':
          description: User does not have an assigned phone number.

````