> ## Documentation Index
> Fetch the complete documentation index at: https://docs.whatabot.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Client

> Create a new OAuth client for iframe embedding.

OAuth Clients are **credentials for iframe embedding**. They provide a `clientId` and `clientSecret` pair that your backend uses to authenticate and embed the whatabot flow editor inside your own application via iframe.

Each client is scoped to a single [Workspace](/en/api-reference/workspaces/create-workspace), so the embedded editor can only access flows and sectors within that workspace.

See the full [Embed guide](/en/embed/overview) and [Embed Authentication](/en/embed/authentication) for details.

<ParamField header="X-Api-Key" type="string" required>
  Your API key (prefixed with `wh_`).
</ParamField>

### Body

<ParamField body="name" type="string" required>
  Client display name.
</ParamField>

### Payload examples

<Tabs>
  <Tab title="Create client">
    ```json theme={null}
    {
      "name": "My SaaS Embed"
    }
    ```
  </Tab>
</Tabs>

<RequestExample>
  ```bash theme={null}
  curl -X POST https://api.whatabot.app/api/v1/clients \
    -H "X-Api-Key: wh_your_api_key" \
    -H "Content-Type: application/json" \
    -d '{"name": "My SaaS Embed"}'
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "clientId": "wb_client_abc123",
    "clientSecret": "wb_secret_xyz789",
    "name": "My SaaS Embed"
  }
  ```
</ResponseExample>

<Warning>
  The `clientSecret` is only returned once at creation time. Store it securely.
</Warning>
