Accounts
Get account billing operation
View quotes and the results of account creation, deletion and refund requests for this workspace.
https://api.unifyport.ai/v1/account-operations/{operation_id}Supported channels
Before you call
Use a server-side X-Api-Key for the workspace that owns the resource. Replace every placeholder before running a sample.
Use the intended workspace API Key. Wallet-mode accounts are billed in USD for 30 days. View your wallet balance and top up in the Dashboard.
Request parameters
Headers
X-Api-KeyWorkspace API key. The workspace is resolved from this header.
Path parameters
operation_idPublic ID from billing.operation_id or a deletion response; reuse unchanged within the original workspace.
Request body
This endpoint does not require a JSON request body.
Understand the result
Keep operation_id. Wait for PENDING/PROCESSING; reconcile REVIEW. SUCCEEDED/FAILED describe this operation, not authorization or automatic refunds. Check server wallet records for credits.
Response 200 OK
{
"request_id": "<REQUEST_ID>",
"data": {
"operation_id": "op_example",
"kind": "DELETE",
"state": "REVIEW",
"account_id": "acc_example",
"last_error_code": "cleanup_unconfirmed"
}
}
Response body
operation_idPublic ID from billing.operation_id or a deletion response; reuse unchanged within the original workspace.
kindPublic kind: QUOTE / CREATE, DELETE or COMPENSATE.
enum: QUOTE, CREATE, DELETE, COMPENSATE
stateBilling or operation state does not prove authorization, connection or refund credit.
enum: QUOTED, CONSUMED, EXPIRED, PENDING, PROCESSING, SUCCEEDED, FAILED, REVIEW
account_idPublic messaging account ID in this workspace.
last_error_codeSafe public result code; absence does not prove success.
Responses
200200 OK
Request succeeded. See the example response body.
400Bad Request
The request body, path, or parameters are invalid.
401Unauthorized
The X-Api-Key header is missing or invalid.
403Forbidden
The request is authenticated but is not allowed.
404Not Found
The requested resource was not found. Check error.code and the current operation.
409Conflict
The requested operation conflicts with an existing provider account or resource.
503Service Unavailable
A required backend service is temporarily unavailable.
If the request fails
Inspect HTTP status and error.code/numeric_code, and keep request_id for diagnosis. Correct invalid parameters, complete required authorization or check runtime state as appropriate. Confirm the outcome before retrying a send or another write. Error reference
Read HTTP status, error.code and error.numeric_code together in the context of the current operation. Numeric codes are strings. Keep request_id for diagnosis; it is not an idempotency key or a task identifier.
- invalid_request · 10000 · 400
Check the JSON body and required fields.
When it occurs: Applies when a non-empty request body is sent with a Content-Type other than application/json.
What to do: Correct the parameters for this operation and channel before requesting again. Repeating an unchanged invalid request will not resolve the error.
Illustrative JSON; message varies with the actual cause · 400 · 10000
{ "request_id": "req_example", "error": { "code": "invalid_request", "numeric_code": "10000", "message": "Content-Type must be application/json" } }- invalid_target_workspace · 11003 · 400
The workspace override target is empty or malformed. Remove the override header and use the API key belonging to the intended workspace.
When it occurs: Applies when the request includes the X-Workspace-Id workspace override header.
What to do: Correct the parameters for this operation and channel before requesting again. Repeating an unchanged invalid request will not resolve the error.
Illustrative JSON; message varies with the actual cause · 400 · 11003
{ "request_id": "req_example", "error": { "code": "invalid_target_workspace", "numeric_code": "11003", "message": "Invalid target workspace" } }- invalid_api_key · 11001 · 401
Check whether the API key is correct and enabled.
What to do: Keep request_id and the structured codes, and investigate the current operation before taking another action.
Illustrative JSON; message varies with the actual cause · 401 · 11001
{ "request_id": "req_example", "error": { "code": "invalid_api_key", "numeric_code": "11001", "message": "Invalid API key" } }- missing_api_key · 11000 · 401
Add the X-Api-Key header.
What to do: Keep request_id and the structured codes, and investigate the current operation before taking another action.
Example · 401 · 11000
{ "request_id": "req_xxx", "error": { "code": "missing_api_key", "numeric_code": "11000", "message": "Missing X-Api-Key header" } }- workspace_override_forbidden · 11002 · 403
The request attempts a workspace override that this API key is not allowed to use. Remove the override header and use the API key belonging to the intended workspace.
When it occurs: Applies when the request includes the X-Workspace-Id workspace override header.
What to do: Keep request_id and the structured codes, and investigate the current operation before taking another action.
Illustrative JSON; message varies with the actual cause · 403 · 11002
{ "request_id": "req_example", "error": { "code": "workspace_override_forbidden", "numeric_code": "11002", "message": "Workspace override is not allowed" } }- account_operation_not_found · 20029 · 404
The operation is absent or outside this workspace. Check the original operation_id and API key scope.
What to do: Check the target identifier, resource ownership and current workspace. Do not treat a confirmed missing or inaccessible target as a temporary service failure to retry automatically.
Illustrative JSON; message varies with the actual cause · 404 · 20029
{ "request_id": "req_example", "error": { "code": "account_operation_not_found", "numeric_code": "20029", "message": "Account operation not found" } }- target_workspace_not_found · 11004 · 404
The overridden workspace was not found or is unavailable. Verify workspace ownership, remove the override header and use the intended workspace’s API key; repeated requests do not grant access.
When it occurs: Applies when the request includes the X-Workspace-Id workspace override header.
What to do: Check the target identifier, resource ownership and current workspace. Do not treat a confirmed missing or inaccessible target as a temporary service failure to retry automatically.
Illustrative JSON; message varies with the actual cause · 404 · 11004
{ "request_id": "req_example", "error": { "code": "target_workspace_not_found", "numeric_code": "11004", "message": "Target workspace not found" } }- wallet_workspace_disabled · 20022 · 409
New wallet purchases are disabled; do not assume existing account operations are cancelled.
What to do: Keep request_id and the structured codes, and investigate the current operation before taking another action.
Illustrative JSON; message varies with the actual cause · 409 · 20022
{ "request_id": "req_example", "error": { "code": "wallet_workspace_disabled", "numeric_code": "20022", "message": "New wallet purchases are disabled" } }- wallet_unavailable · 20028 · 503
Wallet data or configuration is temporarily unavailable. A failed write can have an unknown result; reconcile the original operation.
What to do: Keep request_id and check the requested identifiers and account access. Retry this read only after checking the cause; a failed query does not prove an empty or missing resource.
Illustrative JSON; message varies with the actual cause · 503 · 20028
{ "request_id": "req_example", "error": { "code": "wallet_unavailable", "numeric_code": "20028", "message": "Wallet service is unavailable" } }