Skip to main content
POST
/
projects
/
{projectId}
/
users
Create user
curl --request POST \
  --url https://spectrum.photon.codes/projects/{projectId}/users/ \
  --header 'Content-Type: application/json' \
  --data '
{
  "type": "<string>",
  "phoneNumber": "<string>",
  "firstName": "<string>",
  "lastName": "<string>",
  "email": "jsmith@example.com"
}
'
{
  "succeed": true,
  "data": {
    "id": "<string>",
    "projectId": "<string>",
    "firstName": "<string>",
    "lastName": "<string>",
    "email": "<string>",
    "phoneNumber": "<string>",
    "assignedPhoneNumber": "<string>",
    "meta": {},
    "createdAt": "<string>"
  }
}

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.

Path Parameters

projectId
string<uuid>
required
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)$

Body

type
string
required
Allowed value: "shared"
phoneNumber
string<e164>
required
Pattern: ^\+[1-9]\d{6,14}$
firstName
string | null
lastName
string | null
email
string<email> | null
Pattern: ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$

Response

200 - application/json

Response for status 200

succeed
boolean
required
data
object
required