Skip to content

hs sandbox create fails with error "unable to deduce user-brief from this request" #1593

@davidrebellon

Description

@davidrebellon

CLI Version

8.2.0

Node.js Version

22.18.0

Operating System

macOS 15.7.3

Description

hs sandbox create sends double-serialized JSON body to sandbox-hubs/v2/sandboxes, resulting in 400 error (v8.2.0)

Running hs sandbox create fails when attempting to create a developer sandbox. The POST request body sent to sandbox-hubs/v2/sandboxes is double-JSON-stringified — the payload object is serialized to a string, then serialized again — causing the API to return a 400 error.

Steps to Reproduce

  1. Run hs sandbox create --debug
  2. Select Development sandbox when prompted
  3. Enter a name for the sandbox

Expected Behavior

Development Sandbox is created under selected account

Screenshots

No response

Additional Context

The CLI sends a malformed request body where the JSON payload is double-serialized:

payload: "\"{\\\"name\\\":\\\"development\\\",\\\"type\\\":\\\"DEVELOPER\\\",\\\"syncObjectRecords\\\":false}\""

The API responds with:

status: 400
message: Unable to deduce user-brief from this request.
correlationId: 019d3f02-922c-7f7e-af5e-b1ebff9dae88

Debug Output (relevant excerpt)

[DEBUG] {
  method: 'post',
  baseURL: 'https://api.hubapi.com',
  url: 'sandbox-hubs/v2/sandboxes',
  data: {
    status: 'error',
    message: 'Unable to deduce user-brief from this request.',
    correlationId: '019d3f02-922c-7f7e-af5e-b1ebff9dae88'
  },
  status: 400
}
[ERROR] Unable to deduce user-brief from this request.

Additional Context

  • Account usage check confirms sandbox slot is available: DEVELOPER: { used: 0, available: 1, limit: 1 }
  • All required feature flags are enabled (sandboxes:v2:cliEnabled: true, sandboxes:v2:enabled: true)
  • The user is a super admin with full permissions on the Personal Access Key

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions