Profile
Your profile is the user an API key acts for: name, email address and photo, plus which emails you want. Account API keys can read their own profile but not change one.
The User object
The person, or account API key, the request acts for.
Attributes
idstringRequiredUnique ID of the user, or of the account API key that is calling.
namestringRequiredThe user's display name, or the account API key's name.
emailstringRequiredThe user's email address; empty for an account API key.
imagenullable stringRequiredURL of the user's profile photo, or null. Always null for an account API key.
accountWorkspaceIdstringSet when an account API key is calling: the workspace the key belongs to.
accountRolestringSet when an account API key is calling: the role the key acts with.
owneradminmemberviewer{ "id": "Us3NfP8kLq2V", "name": "Maya Patel", "email": "maya@acme.dev", "image": "https://images.clankertest.com/users/Us3NfP8kLq2V/profile-Ph8KcV2nRx4M.webp"}Get your profile
GET/Returns the user the API key acts for. An account API key returns itself, with its workspace and role.
Returns
Returns the User object. Status 200.
Errors
- 400
InvalidInputThe request is malformed, or a value is not allowed.- 401
UnauthorizedThe request has no valid API key.- 403
ForbiddenThe key's user or role may not do this.- 404
NotFoundThe workspace or object does not exist, or the caller cannot see it.- 409
ConflictThe change conflicts with current data, such as a slug that is already in use.- 500
InternalClanker Ship failed to handle the request. Retry, or report the response's x-request-id.
curl https://api.qa.clankership.net/v1/me \ -H "Authorization: Bearer $CLANKER_API_KEY"{ "id": "Us3NfP8kLq2V", "name": "Maya Patel", "email": "maya@acme.dev", "image": "https://images.clankertest.com/users/Us3NfP8kLq2V/profile-Ph8KcV2nRx4M.webp"}Update your profile
PATCH/Sets your display name and records a profile.updated event in each workspace you belong to. Account API keys cannot change a profile.
Body parameters
namestringRequiredYour new display name.
Returns
Returns an object with these fields. Status 200.
okbooleanRequiredAlways true: the change was made.
trueErrors
- 400
InvalidInputThe request is malformed, or a value is not allowed.- 401
UnauthorizedThe request has no valid API key.- 403
ForbiddenThe key's user or role may not do this.- 404
NotFoundThe workspace or object does not exist, or the caller cannot see it.- 409
ConflictThe change conflicts with current data, such as a slug that is already in use.- 500
InternalClanker Ship failed to handle the request. Retry, or report the response's x-request-id.
curl -X PATCH https://api.qa.clankership.net/v1/me \ -H "Authorization: Bearer $CLANKER_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Maya Patel" }'{ "ok": true}Upload a profile photo
POST/Replaces your profile photo with a PNG, JPEG or WebP image under 5 MB. Account API keys cannot change a profile.
Body parameters
photofileRequiredA PNG, JPEG or WebP image under 5 MB for your profile photo.
Returns
Returns an object with these fields. Status 200.
okbooleanRequiredAlways true: the photo was replaced.
trueimagestringRequiredURL of your new profile photo.
Errors
- 400
InvalidInputThe request is malformed, or a value is not allowed.- 401
UnauthorizedThe request has no valid API key.- 403
ForbiddenThe key's user or role may not do this.- 404
NotFoundThe workspace or object does not exist, or the caller cannot see it.- 409
ConflictThe change conflicts with current data, such as a slug that is already in use.- 500
InternalClanker Ship failed to handle the request. Retry, or report the response's x-request-id.
curl -X POST https://api.qa.clankership.net/v1/me/photo \ -H "Authorization: Bearer $CLANKER_API_KEY" \ -F "photo=@photo.png"{ "ok": true, "image": "https://images.clankertest.com/users/Us3NfP8kLq2V/profile-Ph8KcV2nRx4M.webp"}Get your notification preferences
GET/Returns which emails you want, or the defaults if you never saved any. Account API keys have no preferences.
Returns
Returns an object with these fields. Status 200.
Which emails you want. A user who never saved preferences gets the defaults.
userIdstringRequiredYour user ID.
productUpdatesbooleanRequiredWhether to email you Clanker Ship product updates. Defaults to true.
workspaceActivitybooleanRequiredWhether to email you activity in your workspaces. Defaults to false.
Errors
- 400
InvalidInputThe request is malformed, or a value is not allowed.- 401
UnauthorizedThe request has no valid API key.- 403
ForbiddenThe key's user or role may not do this.- 404
NotFoundThe workspace or object does not exist, or the caller cannot see it.- 409
ConflictThe change conflicts with current data, such as a slug that is already in use.- 500
InternalClanker Ship failed to handle the request. Retry, or report the response's x-request-id.
curl https://api.qa.clankership.net/v1/me/preferences \ -H "Authorization: Bearer $CLANKER_API_KEY"{ "userId": "Us3NfP8kLq2V", "productUpdates": true, "workspaceActivity": false}Update your notification preferences
PATCH/Saves both email preferences, so send both fields. Account API keys have no preferences.
Body parameters
productUpdatesbooleanRequiredWhether to email you Clanker Ship product updates. Defaults to true.
workspaceActivitybooleanRequiredWhether to email you activity in your workspaces. Defaults to false.
Returns
Returns an object with these fields. Status 200.
okbooleanRequiredAlways true: the change was made.
trueErrors
- 400
InvalidInputThe request is malformed, or a value is not allowed.- 401
UnauthorizedThe request has no valid API key.- 403
ForbiddenThe key's user or role may not do this.- 404
NotFoundThe workspace or object does not exist, or the caller cannot see it.- 409
ConflictThe change conflicts with current data, such as a slug that is already in use.- 500
InternalClanker Ship failed to handle the request. Retry, or report the response's x-request-id.
curl -X PATCH https://api.qa.clankership.net/v1/me/preferences \ -H "Authorization: Bearer $CLANKER_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "productUpdates": false, "workspaceActivity": true }'{ "ok": true}Get your home path
GET/Returns the website path to open after sign-in: /w/{slug} for a workspace you belong to, or /onboarding when you belong to none. It first adds you to every workspace whose allowed domains include your email's domain.
Returns
Returns a string. Status 200.
A website path, such as /w/acme or /onboarding.
Errors
- 400
InvalidInputThe request is malformed, or a value is not allowed.- 401
UnauthorizedThe request has no valid API key.- 403
ForbiddenThe key's user or role may not do this.- 404
NotFoundThe workspace or object does not exist, or the caller cannot see it.- 409
ConflictThe change conflicts with current data, such as a slug that is already in use.- 500
InternalClanker Ship failed to handle the request. Retry, or report the response's x-request-id.
curl https://api.qa.clankership.net/v1/me/home \ -H "Authorization: Bearer $CLANKER_API_KEY""/w/acme"Get your onboarding workspace
GET/Returns a workspace you already belong to, or existing: null when you belong to none. It first adds you to every workspace whose allowed domains include your email's domain.
Returns
Returns an object with these fields. Status 200.
A workspace you already belong to, or null when you should create one.
Errors
- 400
InvalidInputThe request is malformed, or a value is not allowed.- 401
UnauthorizedThe request has no valid API key.- 403
ForbiddenThe key's user or role may not do this.- 404
NotFoundThe workspace or object does not exist, or the caller cannot see it.- 409
ConflictThe change conflicts with current data, such as a slug that is already in use.- 500
InternalClanker Ship failed to handle the request. Retry, or report the response's x-request-id.
curl https://api.qa.clankership.net/v1/me/onboarding \ -H "Authorization: Bearer $CLANKER_API_KEY"{ "existing": { "id": "Wk7Qm2RtXa9L", "name": "Acme", "slug": "acme", "iconUrl": "https://images.clankertest.com/workspaces/Wk7Qm2RtXa9L/icon-Ic5TfR2mWq8Z.png", "role": "owner" }}