API reference
8 endpoints, served at https://orbitwrite.com/api/v1. Each one lists the credentials it accepts, its parameters and every response it can give.
A signed-in session only. The Orbitwrite app calls this; an API key is refused.
200MeThe signed-in user
idstringRequiredemailstring | nullRequirednamestring | nullRequiredappearancestring | nullRequiredtimezonestring | nullRequiredweekStartDaystring | nullRequiredtimeFormatstring | nullRequired"auto""12h""24h"nulldefaultLandingPagestring | nullRequireddefaultComposerPanelstringRequired"none""info""assistant""ideas""hashtags""preview""comments"defaultOrganizationIdstring | nullRequirednotifyMentionEmailboolean | nullRequirednotifyCommentInAppboolean | nullRequirednotifyCommentEmailboolean | nullRequirednotifyPublishInAppboolean | nullRequirednotifyPublishEmailboolean | nullRequirednotifyPostErrorEmailboolean | nullRequirednotifyApprovalRequestEmailboolean | nullRequirednotifyApprovedInAppboolean | nullRequirednotifyApprovedEmailboolean | nullRequirednotifyRejectedInAppboolean | nullRequirednotifyRejectedEmailboolean | nullRequirednotifyReconnectEmailboolean | nullRequirednotifyWeeklyDigestEmailboolean | nullRequiredcurl -X GET "https://orbitwrite.com/api/v1/account" \
-H "Authorization: Bearer $ORBITWRITE_API_KEY"{
"id": "string",
"email": "string",
"name": "string",
"appearance": "string",
"timezone": "string",
"weekStartDay": "string",
"timeFormat": "auto",
"defaultLandingPage": "string",
"defaultComposerPanel": "none",
"defaultOrganizationId": "string",
"notifyMentionEmail": true,
"notifyCommentInApp": true,
"notifyCommentEmail": true,
"notifyPublishInApp": true,
"notifyPublishEmail": true,
"notifyPostErrorEmail": true,
"notifyApprovalRequestEmail": true,
"notifyApprovedInApp": true,
"notifyApprovedEmail": true,
"notifyRejectedInApp": true,
"notifyRejectedEmail": true,
"notifyReconnectEmail": true,
"notifyWeeklyDigestEmail": true
}Partial update — only the fields present are written. Runs through Better Auth so its user-update hooks apply.
A signed-in session only. The Orbitwrite app calls this; an API key is refused.
namestringBetween 1 and 120 characters.
appearancestring"light""dark""system"timezonestringAt most 64 characters.
weekStartDaystring"saturday""sunday""monday"timeFormatstring"auto""12h""24h"defaultLandingPagestring"dashboard""planner""schedule""inbox""campaigns""activity"defaultComposerPanelstring"none""info""assistant""ideas""hashtags""preview""comments"defaultOrganizationIdstringAt least 1 character.
notifyMentionEmailbooleannotifyCommentInAppbooleannotifyCommentEmailbooleannotifyPublishInAppbooleannotifyPublishEmailbooleannotifyPostErrorEmailbooleannotifyApprovalRequestEmailbooleannotifyApprovedInAppbooleannotifyApprovedEmailbooleannotifyRejectedInAppbooleannotifyRejectedEmailbooleannotifyReconnectEmailbooleannotifyWeeklyDigestEmailboolean200MeThe user after the update
idstringRequiredemailstring | nullRequirednamestring | nullRequiredappearancestring | nullRequiredtimezonestring | nullRequiredweekStartDaystring | nullRequiredtimeFormatstring | nullRequired"auto""12h""24h"nulldefaultLandingPagestring | nullRequireddefaultComposerPanelstringRequired"none""info""assistant""ideas""hashtags""preview""comments"defaultOrganizationIdstring | nullRequirednotifyMentionEmailboolean | nullRequirednotifyCommentInAppboolean | nullRequirednotifyCommentEmailboolean | nullRequirednotifyPublishInAppboolean | nullRequirednotifyPublishEmailboolean | nullRequirednotifyPostErrorEmailboolean | nullRequirednotifyApprovalRequestEmailboolean | nullRequirednotifyApprovedInAppboolean | nullRequirednotifyApprovedEmailboolean | nullRequirednotifyRejectedInAppboolean | nullRequirednotifyRejectedEmailboolean | nullRequirednotifyReconnectEmailboolean | nullRequirednotifyWeeklyDigestEmailboolean | nullRequiredcurl -X PATCH "https://orbitwrite.com/api/v1/account" \
-H "Authorization: Bearer $ORBITWRITE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"appearance": "light",
"timezone": "string",
"weekStartDay": "saturday",
"timeFormat": "auto",
"defaultLandingPage": "dashboard",
"defaultComposerPanel": "none",
"defaultOrganizationId": "string",
"notifyMentionEmail": true,
"notifyCommentInApp": true,
"notifyCommentEmail": true,
"notifyPublishInApp": true,
"notifyPublishEmail": true,
"notifyPostErrorEmail": true,
"notifyApprovalRequestEmail": true,
"notifyApprovedInApp": true,
"notifyApprovedEmail": true,
"notifyRejectedInApp": true,
"notifyRejectedEmail": true,
"notifyReconnectEmail": true,
"notifyWeeklyDigestEmail": true
}'{
"id": "string",
"email": "string",
"name": "string",
"appearance": "string",
"timezone": "string",
"weekStartDay": "string",
"timeFormat": "auto",
"defaultLandingPage": "string",
"defaultComposerPanel": "none",
"defaultOrganizationId": "string",
"notifyMentionEmail": true,
"notifyCommentInApp": true,
"notifyCommentEmail": true,
"notifyPublishInApp": true,
"notifyPublishEmail": true,
"notifyPostErrorEmail": true,
"notifyApprovalRequestEmail": true,
"notifyApprovedInApp": true,
"notifyApprovedEmail": true,
"notifyRejectedInApp": true,
"notifyRejectedEmail": true,
"notifyReconnectEmail": true,
"notifyWeeklyDigestEmail": true
}Session-only: an email address belongs to a person, and a workspace API key has no person to own one.
A signed-in session only. The Orbitwrite app calls this; an API key is refused.
200UserEmailListEvery address on the account, oldest first
curl -X GET "https://orbitwrite.com/api/v1/account/emails" \
-H "Authorization: Bearer $ORBITWRITE_API_KEY"{
"emails": [
{
"id": "string",
"email": "string",
"verified": true,
"primary": true,
"createdAt": "string"
}
]
}The address starts unverified and a six-digit code is mailed to it. Verify it with POST /account/emails/{emailId}/verify within 10 minutes, or request a new code.
A signed-in session only. The Orbitwrite app calls this; an API key is refused.
emailstringRequiredBetween 1 and 254 characters.
200UserEmailThe address was added and a code mailed to it
curl -X POST "https://orbitwrite.com/api/v1/account/emails" \
-H "Authorization: Bearer $ORBITWRITE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "string"
}'{
"id": "string",
"email": "string",
"verified": true,
"primary": true,
"createdAt": "string"
}Replaces any code still outstanding for the address. Unlike the code sent when the address is added, this send is awaited: a provider failure is reported as a 502 rather than a false success.
A signed-in session only. The Orbitwrite app calls this; an API key is refused.
emailIdstringRequiredAt least 1 character.
200UserEmailResultThe mutation was applied
okbooleanRequiredcurl -X POST "https://orbitwrite.com/api/v1/account/emails/{emailId}/resend" \
-H "Authorization: Bearer $ORBITWRITE_API_KEY"{
"ok": true
}A code expires after 10 minutes and allows 5 wrong guesses; the fifth locks it (429) until a new one is requested.
A signed-in session only. The Orbitwrite app calls this; an API key is refused.
emailIdstringRequiredAt least 1 character.
otpstringRequiredThe six-digit code mailed to the address.
Between 1 and 12 characters.
200UserEmailThe address is verified
curl -X POST "https://orbitwrite.com/api/v1/account/emails/{emailId}/verify" \
-H "Authorization: Bearer $ORBITWRITE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"otp": "string"
}'{
"id": "string",
"email": "string",
"verified": true,
"primary": true,
"createdAt": "string"
}The primary address is what sign-in and account mail use, so it must be verified first. The previous primary stays on the account, demoted.
A signed-in session only. The Orbitwrite app calls this; an API key is refused.
emailIdstringRequiredAt least 1 character.
200UserEmailThe address is now primary
curl -X POST "https://orbitwrite.com/api/v1/account/emails/{emailId}/primary" \
-H "Authorization: Bearer $ORBITWRITE_API_KEY"{
"id": "string",
"email": "string",
"verified": true,
"primary": true,
"createdAt": "string"
}The primary address cannot be removed — promote another verified address first.
A signed-in session only. The Orbitwrite app calls this; an API key is refused.
emailIdstringRequiredAt least 1 character.
200UserEmailResultThe mutation was applied
okbooleanRequiredcurl -X DELETE "https://orbitwrite.com/api/v1/account/emails/{emailId}" \
-H "Authorization: Bearer $ORBITWRITE_API_KEY"{
"ok": true
}