---
agent:
  instructions: "Use this search API to find relevant content across this site with keywords or natural-language queries, instead of crawling individual pages. Results are returned in Markdown."
  endpoint: "https://segmentstream.com/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
---

# segmentstream api-key create

Create a personal API key; it is shown only once

## Usage

Command syntax

```
segmentstream api-key create [OPTIONS]
```

## Options

- `--name TEXT`

  A label to recognize the key, such as \`ci\` \[required]

- `--expires-in-days INTEGER RANGE`

  Days until the key expires (at most 90) \[default: 30; 1<=x<=90]

- `--api-url URL`

  SegmentStream control-plane origin

- `--output [table|json]`

  Output format \[default: table]

- `--scope TEXT`

  Platform permission; repeat for each permission \[default: workspace:view]

- `--organization-id TEXT`

  Restrict the key to one organization

- `--workspace-id TEXT`

  Restrict the key to one workspace

- `--organization ORG-ID`

  Organization for this command

- `--help`

  Show this message and exit.

[Read as Markdown ↗](https://segmentstream.com/docs/cli/api-key/create.md)
