Account
CompozyOS Account HTTP endpoints.
20 endpoints36 pages in API Reference
Endpoints20
- GET
/api/accountRead the installation account - PATCH
/api/accountUpdate the product news preference - DELETE
/api/accountStart account deletion and sign out - GET
/api/account/approvalsList pending and recently decided approvals - GET
/api/account/approvals/{id}Read an approval and its applied result - POST
/api/account/approvals/{id}/decisionDeliver an approval decision - POST
/api/account/billing-portalOpen account billing - POST
/api/account/checkoutStart a Pro checkout - GET
/api/account/devicesList the account's devices - PATCH
/api/account/devices/{id}Update a device on this account - DELETE
/api/account/devices/{id}Revoke a device on this account - POST
/api/account/loginStart account sign-in
GET/api/account
Read the installation account
httpuds
Query parameters
refresh?booleanRefresh account details from Compozy Cloud
Responses
- 200
- Installation account status
- 400
- Invalid account request
- 401
- Sign-in required or session rejected
- 403
- Device or account permission required
- 404
- Account resource not found
- 409
- Account operation conflicts with current state
- 429
- Cloud rate limit
- 503
- Account or cloud unavailable
Response body
Installation account status
application/json- response
cloud_routes_limit*integerint64cloud_routes_used*integerint64device*|email?stringgate*stringgrace*|installation_linked*booleanmarketing_opt_in*booleanname?stringpayment_issue*booleanplan*stringpre_account_install*booleanprovider?stringrecent_sign_ins*array<>remote_computers_limit*|int64remote_computers_used*integerint64signed_in*booleansigned_out_reason*string|nullsource*string|nullstate*stringsubscription*|token_name*string|nullcurl -X GET 'http://localhost:2123/api/account'{ "cloud_routes_limit": 0, "cloud_routes_used": 0, "device": { "admin": true, "id": "string", "name": "string" }, "email": "string", "gate": "string", "grace": { "message": "string", "source": "string", "until": "2019-08-24T14:15:22Z" }, "installation_linked": true, "marketing_opt_in": true, "name": "string", "payment_issue": true, "plan": "string", "pre_account_install": true, "provider": "string", "recent_sign_ins": [ { "at": "2019-08-24T14:15:22Z", "device_id": "string", "kind": "string", "location": "string", "name": "string" } ], "remote_computers_limit": 0, "remote_computers_used": 0, "signed_in": true, "signed_out_reason": "string", "source": "string", "state": "string", "subscription": { "cancel_at_period_end": true, "current_period_end": "2019-08-24T14:15:22Z", "interval": "string", "refund_eligible_until": "2019-08-24T14:15:22Z", "source": "string" }, "token_name": "string"}PATCH/api/account
Update the product news preference
httpuds
Request body
JSON request body
application/json- body
marketing_opt_in*boolean|nullsource?stringResponses
- 200
- Updated installation account
- 400
- Invalid account request
- 401
- Sign-in required or session rejected
- 403
- Device or account permission required
- 404
- Account resource not found
- 409
- Account operation conflicts with current state
- 429
- Cloud rate limit
- 503
- Account or cloud unavailable
Response body
Updated installation account
application/json- response
cloud_routes_limit*integerint64cloud_routes_used*integerint64device*|email?stringgate*stringgrace*|installation_linked*booleanmarketing_opt_in*booleanname?stringpayment_issue*booleanplan*stringpre_account_install*booleanprovider?stringrecent_sign_ins*array<>remote_computers_limit*|int64remote_computers_used*integerint64signed_in*booleansigned_out_reason*string|nullsource*string|nullstate*stringsubscription*|token_name*string|nullcurl -X PATCH 'http://localhost:2123/api/account' \ -H 'Content-Type: application/json' \ -d '{ "marketing_opt_in": true}'{ "cloud_routes_limit": 0, "cloud_routes_used": 0, "device": { "admin": true, "id": "string", "name": "string" }, "email": "string", "gate": "string", "grace": { "message": "string", "source": "string", "until": "2019-08-24T14:15:22Z" }, "installation_linked": true, "marketing_opt_in": true, "name": "string", "payment_issue": true, "plan": "string", "pre_account_install": true, "provider": "string", "recent_sign_ins": [ { "at": "2019-08-24T14:15:22Z", "device_id": "string", "kind": "string", "location": "string", "name": "string" } ], "remote_computers_limit": 0, "remote_computers_used": 0, "signed_in": true, "signed_out_reason": "string", "source": "string", "state": "string", "subscription": { "cancel_at_period_end": true, "current_period_end": "2019-08-24T14:15:22Z", "interval": "string", "refund_eligible_until": "2019-08-24T14:15:22Z", "source": "string" }, "token_name": "string"}DELETE/api/account
Start account deletion and sign out
httpuds
Request body
JSON request body
application/json- body
confirm_email*stringResponses
- 202
- Deletion started
- 400
- Invalid account request
- 401
- Sign-in required or session rejected
- 403
- Device or account permission required
- 404
- Account resource not found
- 409
- Account operation conflicts with current state
- 429
- Cloud rate limit
- 503
- Account or cloud unavailable
Response body
Deletion started
application/json- response
refund*stringstate*stringsubscription_cancelled*booleancurl -X DELETE 'http://localhost:2123/api/account' \ -H 'Content-Type: application/json' \ -d '{ "confirm_email": "string"}'{ "refund": "string", "state": "string", "subscription_cancelled": true}GET/api/account/approvals
List pending and recently decided approvals
httpuds
Responses
- 200
- Account approvals
- 400
- Invalid account request
- 401
- Sign-in required or session rejected
- 403
- Device or account permission required
- 404
- Account resource not found
- 409
- Account operation conflicts with current state
- 429
- Cloud rate limit
- 503
- Account or cloud unavailable
Response body
Account approvals
application/json- response
approvals*array<>curl -X GET 'http://localhost:2123/api/account/approvals'{ "approvals": [ { "applied_result": "string", "can_decide": true, "computer_id": "string", "created_at": "2019-08-24T14:15:22Z", "device_name": "string", "id": "string", "key_fingerprint": "string", "state": "string" } ]}GET/api/account/approvals/{id}
Read an approval and its applied result
httpuds
Path parameters
id*stringAccount resource ID
Responses
- 200
- Device approval
- 400
- Invalid account request
- 401
- Sign-in required or session rejected
- 403
- Device or account permission required
- 404
- Account resource not found
- 409
- Account operation conflicts with current state
- 429
- Cloud rate limit
- 503
- Account or cloud unavailable
Response body
Device approval
application/json- response
applied_result*string|nullcan_decide*booleancomputer_id*stringcreated_at*stringdate-timedevice_name*stringid*stringkey_fingerprint*stringstate*stringcurl -X GET 'http://localhost:2123/api/account/approvals/string'{ "applied_result": "string", "can_decide": true, "computer_id": "string", "created_at": "2019-08-24T14:15:22Z", "device_name": "string", "id": "string", "key_fingerprint": "string", "state": "string"}POST/api/account/approvals/{id}/decision
Deliver an approval decision
httpuds
Path parameters
id*stringAccount resource ID
Request body
JSON request body
application/json- body
approve*boolean|nullResponses
- 202
- Decision queued for the computer
- 400
- Invalid account request
- 401
- Sign-in required or session rejected
- 403
- Device or account permission required
- 404
- Account resource not found
- 409
- Account operation conflicts with current state
- 429
- Cloud rate limit
- 503
- Account or cloud unavailable
Response body
Decision queued for the computer
application/json- response
approval_id*stringstate*stringcurl -X POST 'http://localhost:2123/api/account/approvals/string/decision' \ -H 'Content-Type: application/json' \ -d '{ "approve": true}'{ "approval_id": "string", "state": "string"}POST/api/account/billing-portal
Open account billing
httpuds
Responses
- 200
- Billing portal URL
- 400
- Invalid account request
- 401
- Sign-in required or session rejected
- 403
- Device or account permission required
- 404
- Account resource not found
- 409
- Account operation conflicts with current state
- 429
- Cloud rate limit
- 503
- Account or cloud unavailable
Response body
Billing portal URL
application/json- response
url*stringcurl -X POST 'http://localhost:2123/api/account/billing-portal'{ "url": "string"}POST/api/account/checkout
Start a Pro checkout
httpuds
Request body
JSON request body
application/json- body
interval*stringResponses
- 200
- Checkout URL
- 400
- Invalid account request
- 401
- Sign-in required or session rejected
- 403
- Device or account permission required
- 404
- Account resource not found
- 409
- Account operation conflicts with current state
- 429
- Cloud rate limit
- 503
- Account or cloud unavailable
Response body
Checkout URL
application/json- response
url*stringcurl -X POST 'http://localhost:2123/api/account/checkout' \ -H 'Content-Type: application/json' \ -d '{ "interval": "string"}'{ "url": "string"}GET/api/account/devices
List the account's devices
httpuds
Responses
- 200
- Account devices
- 400
- Invalid account request
- 401
- Sign-in required or session rejected
- 403
- Device or account permission required
- 404
- Account resource not found
- 409
- Account operation conflicts with current state
- 429
- Cloud rate limit
- 503
- Account or cloud unavailable
Response body
Account devices
application/json- response
devices*array<>curl -X GET 'http://localhost:2123/api/account/devices'{ "devices": [ { "admin": true, "id": "string", "kind": "string", "last_seen_at": "2019-08-24T14:15:22Z", "name": "string", "this_device": true } ]}PATCH/api/account/devices/{id}
Update a device on this account
httpuds
Path parameters
id*stringAccount resource ID
Request body
JSON request body
application/json- body
admin?boolean|nullname?string|nullscopes?Responses
- 200
- Updated device
- 400
- Invalid account request
- 401
- Sign-in required or session rejected
- 403
- Device or account permission required
- 404
- Account resource not found
- 409
- Account operation conflicts with current state
- 429
- Cloud rate limit
- 503
- Account or cloud unavailable
Response body
Updated device
application/json- response
admin*booleanid*stringkind*stringlast_seen_at*stringdate-timename*stringthis_device*booleancurl -X PATCH 'http://localhost:2123/api/account/devices/string' \ -H 'Content-Type: application/json' \ -d '{}'{ "admin": true, "id": "string", "kind": "string", "last_seen_at": "2019-08-24T14:15:22Z", "name": "string", "this_device": true}DELETE/api/account/devices/{id}
Revoke a device on this account
httpuds
Path parameters
id*stringAccount resource ID
Responses
- 204
- Device revoked
- 400
- Invalid account request
- 401
- Sign-in required or session rejected
- 403
- Device or account permission required
- 404
- Account resource not found
- 409
- Account operation conflicts with current state
- 429
- Cloud rate limit
- 503
- Account or cloud unavailable
Response body
Device revoked
curl -X DELETE 'http://localhost:2123/api/account/devices/string'{ "blockers": [ { "id": "string", "kind": "string", "name": "string" } ], "client_message_id": "string", "code": "string", "config_path": "string", "current_turn_id": "string", "details": { "property1": "string", "property2": "string" }, "diagnostic": { "category": "string", "code": "string", "data_freshness": "string", "doc_url": "string", "evidence": { "property1": null, "property2": null }, "id": "string", "message": "string", "severity": "string", "suggested_command": "string", "title": "string" }, "error": "string", "provider_error": "string", "retryable": true, "unknown_keys": [ "string" ]}POST/api/account/login
Start account sign-in
httpuds
Request body
JSON request body
application/json- body
marketing_opt_in*booleanprovider*string|nullResponses
- 200
- Device activation
- 400
- Invalid account request
- 401
- Sign-in required or session rejected
- 403
- Device or account permission required
- 404
- Account resource not found
- 409
- Account operation conflicts with current state
- 429
- Cloud rate limit
- 503
- Account or cloud unavailable
Response body
Device activation
application/json- response
attempt_id*stringexpires_at*stringdate-timeuser_code*stringverification_uri*stringverification_uri_complete*stringcurl -X POST 'http://localhost:2123/api/account/login' \ -H 'Content-Type: application/json' \ -d '{ "marketing_opt_in": true, "provider": "string"}'{ "attempt_id": "string", "expires_at": "2019-08-24T14:15:22Z", "user_code": "string", "verification_uri": "string", "verification_uri_complete": "string"}DELETE/api/account/login
Cancel account sign-in
httpuds
Query parameters
attempt_id?stringCancel only the named sign-in attempt
Responses
- 204
- Sign-in attempt ended
- 400
- Invalid account request
- 401
- Sign-in required or session rejected
- 403
- Device or account permission required
- 404
- Account resource not found
- 409
- Account operation conflicts with current state
- 429
- Cloud rate limit
- 503
- Account or cloud unavailable
Response body
Sign-in attempt ended
curl -X DELETE 'http://localhost:2123/api/account/login'{ "blockers": [ { "id": "string", "kind": "string", "name": "string" } ], "client_message_id": "string", "code": "string", "config_path": "string", "current_turn_id": "string", "details": { "property1": "string", "property2": "string" }, "diagnostic": { "category": "string", "code": "string", "data_freshness": "string", "doc_url": "string", "evidence": { "property1": null, "property2": null }, "id": "string", "message": "string", "severity": "string", "suggested_command": "string", "title": "string" }, "error": "string", "provider_error": "string", "retryable": true, "unknown_keys": [ "string" ]}POST/api/account/logout
Sign out this installation
httpuds
Request body
JSON request body
application/json- body
unlink*booleanResponses
- 200
- Signed out
- 400
- Invalid account request
- 401
- Sign-in required or session rejected
- 403
- Device or account permission required
- 404
- Account resource not found
- 409
- Account operation conflicts with current state
- 429
- Cloud rate limit
- 503
- Account or cloud unavailable
Response body
Signed out
application/json- response
state*stringcurl -X POST 'http://localhost:2123/api/account/logout' \ -H 'Content-Type: application/json' \ -d '{ "unlink": true}'{ "state": "string"}POST/api/account/sign-in-notices/dismiss
Dismiss sign-in notices on this installation
httpuds
Responses
- 204
- Notices dismissed
- 400
- Invalid account request
- 401
- Sign-in required or session rejected
- 403
- Device or account permission required
- 404
- Account resource not found
- 409
- Account operation conflicts with current state
- 429
- Cloud rate limit
- 503
- Account or cloud unavailable
Response body
Notices dismissed
curl -X POST 'http://localhost:2123/api/account/sign-in-notices/dismiss'{ "blockers": [ { "id": "string", "kind": "string", "name": "string" } ], "client_message_id": "string", "code": "string", "config_path": "string", "current_turn_id": "string", "details": { "property1": "string", "property2": "string" }, "diagnostic": { "category": "string", "code": "string", "data_freshness": "string", "doc_url": "string", "evidence": { "property1": null, "property2": null }, "id": "string", "message": "string", "severity": "string", "suggested_command": "string", "title": "string" }, "error": "string", "provider_error": "string", "retryable": true, "unknown_keys": [ "string" ]}GET/api/account/sign-in/events
Stream anonymous sign-in progress
httpuds
Responses
- 200
- Sign-in progress and account state
- 400
- Invalid account request
- 401
- Sign-in required or session rejected
- 403
- Device or account permission required
- 404
- Account resource not found
- 409
- Account operation conflicts with current state
- 429
- Cloud rate limit
- 503
- Account or cloud unavailable
Response body
Sign-in progress and account state
text/event-stream- response
attempt_id*stringcode?stringnew_account?booleanstate*stringcurl -X GET 'http://localhost:2123/api/account/sign-in/events'{ "attempt_id": "string", "code": "string", "new_account": true, "state": "string"}GET/api/account/stream
Stream changes for the active account
httpuds
Query parameters
after_sequence?stringLast account event ID in this auth generation
Responses
- 200
- Account changes and stream resets
- 400
- Invalid account request
- 401
- Sign-in required or session rejected
- 403
- Device or account permission required
- 404
- Account resource not found
- 409
- Account operation conflicts with current state
- 429
- Cloud rate limit
- 503
- Account or cloud unavailable
Response body
Account changes and stream resets
text/event-stream- response
data*event*stringid*stringcurl -X GET 'http://localhost:2123/api/account/stream'{ "data": { "approval": { "id": "string", "result": "string" }, "approval_id": "string", "computer_id": "string", "device_id": "string", "evict_remote": true, "kind": "string", "payment_issue": true, "plan": "string", "security_epoch": 0 }, "event": "string", "id": "string"}GET/api/account/tokens
List account tokens
httpuds
Responses
- 200
- Account tokens
- 400
- Invalid account request
- 401
- Sign-in required or session rejected
- 403
- Device or account permission required
- 404
- Account resource not found
- 409
- Account operation conflicts with current state
- 429
- Cloud rate limit
- 503
- Account or cloud unavailable
Response body
Account tokens
application/json- response
tokens*array<>curl -X GET 'http://localhost:2123/api/account/tokens'{ "tokens": [ { "id": "string", "last_used_at": "2019-08-24T14:15:22Z", "name": "string" } ]}POST/api/account/tokens
Create an account token for local use
httpuds
Request body
JSON request body
application/json- body
name*stringResponses
- 201
- One-time account token
- 400
- Invalid account request
- 401
- Sign-in required or session rejected
- 403
- Device or account permission required
- 404
- Account resource not found
- 409
- Account operation conflicts with current state
- 429
- Cloud rate limit
- 503
- Account or cloud unavailable
Response body
One-time account token
application/json- response
id*stringname*stringtoken*stringcurl -X POST 'http://localhost:2123/api/account/tokens' \ -H 'Content-Type: application/json' \ -d '{ "name": "string"}'{ "id": "string", "name": "string", "token": "string"}DELETE/api/account/tokens/{id}
Revoke an account token
httpuds
Path parameters
id*stringAccount resource ID
Responses
- 204
- Account token revoked
- 400
- Invalid account request
- 401
- Sign-in required or session rejected
- 403
- Device or account permission required
- 404
- Account resource not found
- 409
- Account operation conflicts with current state
- 429
- Cloud rate limit
- 503
- Account or cloud unavailable
Response body
Account token revoked
curl -X DELETE 'http://localhost:2123/api/account/tokens/string'{ "blockers": [ { "id": "string", "kind": "string", "name": "string" } ], "client_message_id": "string", "code": "string", "config_path": "string", "current_turn_id": "string", "details": { "property1": "string", "property2": "string" }, "diagnostic": { "category": "string", "code": "string", "data_freshness": "string", "doc_url": "string", "evidence": { "property1": null, "property2": null }, "id": "string", "message": "string", "severity": "string", "suggested_command": "string", "title": "string" }, "error": "string", "provider_error": "string", "retryable": true, "unknown_keys": [ "string" ]}