> For the complete documentation index, see [llms.txt](https://k4k3ru.gitbook.io/k4k3ru-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://k4k3ru.gitbook.io/k4k3ru-docs/api/crm/request-api-credential-otp.md).

# Request an API Credential OTP by Email

Request a one-time password (OTP) to create an API credential for an existing K4K3RU account. The OTP is sent to the email address associated with the account.

## Endpoint

| Property       | Value                                     |
| -------------- | ----------------------------------------- |
| URL            | `https://api.k4k3ru.com/`                 |
| HTTP method    | `POST`                                    |
| RPC method     | `AccountAPI.RequestCredentialCreationOTP` |
| Authentication | Not required                              |

## Request

### Request Body

This method uses the common [JSON-RPC request envelope](/k4k3ru-docs/api/json-rpc.md#request-envelope). Set `method` to `AccountAPI.RequestCredentialCreationOTP`.

### Params Fields

The request envelope's `params` object accepts:

| Field   | Type   | Required | Description                                       |
| ------- | ------ | -------- | ------------------------------------------------- |
| `email` | string | Yes      | Email address associated with the K4K3RU account. |

### Example Request

```bash
curl --request POST 'https://api.k4k3ru.com/' \
  --header 'Content-Type: application/json' \
  --data '{
    "id": "1",
    "method": "AccountAPI.RequestCredentialCreationOTP",
    "params": {
      "email": "alex@example.com"
    }
  }'
```

## Response

### Response Body

Successful requests use the common [JSON-RPC success response envelope](/k4k3ru-docs/api/json-rpc.md#success-response-envelope). Failed requests use the common [JSON-RPC error response envelope](/k4k3ru-docs/api/json-rpc.md#error-response-envelope).

### Result Fields

| Field       | Type   | Description                                                                                 |
| ----------- | ------ | ------------------------------------------------------------------------------------------- |
| `purpose`   | string | Purpose assigned to the OTP. For this method, the value is `account.api.create_credential`. |
| `email`     | string | Email address supplied in the request.                                                      |
| `expiresAt` | string | Time at which the OTP expires, formatted as an RFC 3339 timestamp.                          |

### Errors

| Code                | When it occurs                                                                                                                   |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| `invalid_parameter` | The `params` object is invalid, no email address is provided, or the email address is not associated with an account credential. |
| `unexpected`        | The request cannot be completed because of an unexpected processing, storage, or email-delivery failure.                         |

### Example Success Response

```json
{
  "id": "1",
  "result": {
    "purpose": "account.api.create_credential",
    "email": "alex@example.com",
    "expiresAt": "2026-08-08T13:12:59Z"
  }
}
```

The `expiresAt` value shown above is an example. Use the value returned by the API for the actual expiration time.

### Example Error Response

```json
{
  "id": "1",
  "error": {
    "code": "invalid_parameter"
  }
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://k4k3ru.gitbook.io/k4k3ru-docs/api/crm/request-api-credential-otp.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
