Skip to content
Skip to Content
Coder Docs

Create initial user

POST
/api/v2/users/first

Authorization

CoderSessionToken
headerCoder-Session-Token<token>

Request Body

First user request

application/json
  1. body
email*string
name?string
onboarding_info?
password*string
setup_token?string

SetupToken is required when AuthMethods.SetupTokenRequired is true. The server prints it at startup.

trial?boolean
trial_info?
username*string

Response Body

Created

application/json
  1. response
organization_id?string
Formatuuid
user_id?string
Formatuuid

The samples read CODER_URL and CODER_SESSION_TOKEN: set up your environment.

curl -X POST \	"$CODER_URL/api/v2/users/first" \	-H "Coder-Session-Token: $CODER_SESSION_TOKEN" \	-H "Content-Type: application/json" \	-d '{  "email": "string",  "password": "string",  "username": "string"}'
Example Response201
{  "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",  "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5"}