Skip to main content

Onboarding and profile

The endpoints a new dashboard account uses in its first minutes: pick a username, create the first workspace, then manage profile fields and images. Agents rarely need them: the emailed-code flow does onboarding itself, and the image presign endpoint at the end is the one the CLI uses on every publish.

Auth differs per endpoint and is noted on each.

POST /api/v1/onboarding​

Session only. Claims a username and creates (or, for invited people, skips) the first workspace. When it creates the workspace it also creates its Default project and an API key named Default.

Request body​

{
"username": "dana",
"fullName": "Dana Reyes",
"workspaceName": "Halvard",
"workspaceSlug": "halvard"
}
FieldRequiredNotes
usernameyes3 to 32 characters, lowercase a-z 0-9 _ -. Must pass the username rules.
fullNamenoUp to 120 characters. Only filled in if your profile has no name yet.
workspaceNamefor new accounts2 to 120 characters. Omit it if you already belong to a workspace (for example, you accepted an invitation).
workspaceSlugno3 to 32 characters, lowercase a-z 0-9 _ -. The first segment of every document URL. Generated from workspaceName when omitted.

Response​

The onboarding state plus the new key:

{
"hasUsername": true,
"hasWorkspace": true,
"username": "dana",
"workspace": {
"id": "ws_123",
"name": "Halvard",
"slug": "halvard",
"defaultVisibility": "workspace",
"defaultProject": { "id": "proj_123", "workspaceId": "ws_123", "name": "Default", "slug": "default", "isDefault": true }
},
"completed": true,
"apiKey": {
"id": "e8a0c2b4-6d8f-4e1a-9c3b-5d7f9a1c3e5b",
"label": "Default",
"keyHint": "77f0",
"plaintext": "od_live_0000example0000example0000example",
"createdAt": "2026-04-17T10:15:00.000Z"
},
"adEventId": "registration:..."
}

apiKey is null unless this call created your first workspace. Save apiKey.plaintext now; it isn't shown again. adEventId is used by the dashboard and can be ignored.

StatuserrorWhen
400invalid_requestA field fails the length rules above
400onboarding_failedUsername invalid, reserved or taken; workspace slug invalid, reserved or taken; or workspaceName missing for a new account. The message is always "Unable to complete onboarding."
401unauthorizedNo session cookie

GET /api/v1/profile​

API key or session.

{
"profile": {
"username": "dana",
"fullName": "Dana Reyes",
"bio": null,
"profilePictureUrl": "https://cdn.opendocs.cc/avatars/usr_123.png"
}
}

profile is null before onboarding. fullName, bio and profilePictureUrl are null when unset.

POST /api/v1/profile​

Session only. Updates profile fields. Omit a field to leave it unchanged; pass null to clear it.

{
"fullName": "Dana Reyes",
"profilePictureUrl": "https://halvard.example/dana.png"
}
FieldTypeNotes
fullNamestring or nullUp to 120 characters
profilePictureUrlstring or nullUp to 2048 characters

Returns the same shape as GET /profile.

POST /api/v1/profile/username​

Session only. Renames your username. Your workspace slug, and so your document URLs, don't change.

{ "username": "dana-reyes" }

Returns the same shape as GET /profile. Renaming to your current username is a no-op.

StatuserrorWhen
400invalid_requestShorter than 3 or longer than 32 characters
400invalid_usernameCharacters other than lowercase a-z 0-9 _ -
400reserved_usernameA reserved name such as docs or pricing
400no_usernameYou haven't finished onboarding
409username_takenSomeone else has it

POST /api/v1/profile/avatar/upload​

Session only. Multipart upload that stores the image and sets profilePictureUrl in one step.

  • Form field file
  • Up to 2 MB
  • JPEG, PNG, WebP, GIF or SVG
{
"profilePictureUrl": "https://cdn.opendocs.cc/avatars/usr_123.png",
"profile": { "username": "dana", "fullName": "Dana Reyes", "bio": null, "profilePictureUrl": "https://cdn.opendocs.cc/avatars/usr_123.png" }
}
StatuserrorWhen
400missing_fileNo file field
400unsupported_mimeNot JPEG, PNG, WebP, GIF or SVG
413file_too_largeOver 2 MB
503storage_not_configuredObject storage isn't set up on this server

POST /api/v1/storage/images/presign-upload​

API key or session. Returns a short-lived URL to PUT an image straight to object storage. The CLI uses it to upload local images referenced in Markdown before it publishes. (Remote images in published Markdown are copied to OpenDocs storage automatically, so you only need this for local files.)

{
"workspaceId": "ws_123",
"contentType": "image/png",
"contentLength": 348912,
"filename": "q3-revenue-chart.png"
}
FieldRequiredNotes
workspaceIdyesA workspace you're an active member of
contentTypeyesimage/jpeg, image/png, image/webp, image/gif or image/svg+xml
contentLengthyesSize in bytes, a positive integer up to 10 MB (10485760)
filenamenoUp to 255 characters. Informational only
{
"uploadUrl": "https://<storage-host>/...?X-Amz-Signature=...",
"publicUrl": "https://cdn.opendocs.cc/images/ws_123/0b7c....png",
"key": "images/ws_123/0b7c....png",
"expiresInSeconds": 300,
"maxBytes": 10485760
}
  1. POST /storage/images/presign-upload with the type and size.
  2. PUT the bytes to uploadUrl with matching Content-Type and Content-Length headers. The URL is signed, so send no auth header.
  3. Put publicUrl in your Markdown: ![Q3 revenue](<publicUrl>).
  4. Publish the Markdown.

The URL expires after 5 minutes; request a new one if the PUT is refused.

StatuserrorWhen
400invalid_requestMissing field, wrong type, or contentLength over 10 MB
400unsupported_mimecontentType isn't one of the image types above
403forbiddenYou aren't an active member of workspaceId
503storage_not_configuredObject storage isn't set up on this server

Typical dashboard sign-up sequence​

  1. POST /api/v1/onboarding: username, workspace, first key.
  2. GET /api/v1/me: workspace and quota for the UI.
  3. POST /api/v1/profile/avatar/upload: optional avatar.
  4. POST /api/v1/workspace/logo/upload: optional workspace logo (owner or admin; see Workspaces API).