sesame request is the core command of the Sesame CLI — it replaces curl for any API call that requires authentication. Instead of embedding API keys in your shell history or environment variables, you send the request through the Sesame broker, which looks up the right credentials for the target hostname and injects the Authorization header server-side before forwarding the call.
Syntax
Arguments and flags
string
required
The HTTP method to use. Accepts
GET, POST, PUT, PATCH, DELETE, and any other valid HTTP verb.string
required
The full URL of the API endpoint, including scheme and any query parameters.
string
Add a request header. Use the same
"Name: Value" syntax as curl. Repeat the flag to add multiple headers.string
Request body data. Pass a raw string or use shell substitution to read from a file. Use with
POST, PUT, and PATCH requests.flag
Output the raw response body without any formatting or colour highlighting. Useful for piping the response into other tools such as
jq, grep, or a file.Examples
First-time approval for a new hostname
The first time you send a request to a hostname, the broker pauses and waits for you to approve it. You will receive an approval prompt in the Sesame app, the Sesame dashboard, or via your configured Telegram notification. Tap Approve to allow the request and establish the policy for that hostname. All subsequent requests to the same hostname use the cached policy and proceed without interruption.
How it works
When you runsesame request, the following happens in order:
- The CLI attaches your JWT to the outbound call and sends it to the Sesame broker.
- The broker verifies the JWT signature against your registered device public key.
- The broker checks whether the target hostname has an active policy for your agent.
- If this is the first request to that hostname, the broker blocks and sends you an approval prompt.
- Once the policy check passes, the broker looks up the stored secret for that hostname and injects the
Authorizationheader (or whichever auth header the provider requires). - The broker forwards the request to the target API and streams the response back to your CLI.