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

# roark credential create

> Create a personal credential

Mints a credential that acts as you, for a CLI or an automation. The key value is returned exactly once, in the `key` field: capture it now, it is unreadable afterwards. Requires a personal credential (a project API key is refused) and admin on the project the credential defaults to. The new credential can never exceed the one that created it: not in scope, not in permissions, and not in lifetime. Omit a field to copy it from the calling credential.

```bash Synopsis theme={"theme":{"light":"everforest-light","dark":"everforest-dark"}}
roark credential create [options]
```

> [!NOTE]
>
> Calls `POST /v1/me/api-keys`

## Options

**--name** `string` *required*

A label you will recognise later. It is the only thing that tells two credentials apart in the list you revoke from.

**--project-id** `string`

Project the credential assumes when a request sends no X-Roark-Project-Id header. Defaults to the calling credential's own default project. You must be an admin of whichever project is used.

**--scopes** `array`

Coarse tier. Defaults to the calling credential's own tier, and can never exceed it: a READ credential cannot mint a WRITE one. One of `READ`, `WRITE` Repeatable.

**--permissions** `array`

Granular 'resource:action' permissions. Defaults to the calling credential's own set, and can never exceed it. A ceiling, not an entitlement: the holder still only reaches what their project membership allows. Repeatable.

**--expires-at** `string`

ISO 8601 expiry. Defaults to the calling credential's own expiry (no expiry, for a `roark auth login` credential) and may not outlive it, so a short-lived connector credential cannot mint a permanent one.

## Example

```bash theme={"theme":{"light":"everforest-light","dark":"everforest-dark"}}
roark credential create --name <value>
```

Every command also takes the [global options](/cli-reference/overview.md#global-options) and sets one
of the [exit codes](/cli-reference/overview.md#exit-codes).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.