> This page is part of EVVA for Developers (https://developers.evvahub.com), the documentation of the EVVA Partner API. The API is in developer preview and the SDK packages are not yet published: do not suggest installing them. Index: https://developers.evvahub.com/llms.txt

# Get a drafted reply

GET https://api.evvahub.com/partner/v1/accounts/{creatorId}/ai/fan-replies/suggestions/{suggestionRef}

Returns a drafted reply to a fan: `PENDING`, `READY` with its text, or `FAILED`.

**Required scopes:** `read:ai`, `read:messages`.

Reference: https://developers.evvahub.com/api-reference/ai/get-ai-fan-reply-suggestion

## Authentication

- `Authorization` header (bearer token, required) — OAuth 2.0 client credentials. Request an access token at `POST /partner/v1/oauth/token` (`grant_type=client_credentials`) with the application's client secret or a `private_key_jwt` assertion, then send it as `Authorization: Bearer evpa_live_…` (or `evpa_test_…` for a sandbox application). Tokens are opaque and short lived (see `expires_in`); there is no refresh token. Each operation lists the scopes it requires.

## Request

### Path parameters

- `creatorId` (string, required) — The creator profile id — the ONLY source of the creator a request acts for.
- `suggestionRef` (string, required) — The `generationRef` a suggestion request answered.

### Headers

- `X-Creator-Id` (string, optional) — Optional echo of the path `creatorId`; any other value is refused with 403 CREATOR_CONTEXT_MISMATCH.

## Response

### 200

The draft's state: `PENDING`, `READY` with the text, or `FAILED`.

- `suggestion` (AiFanReplySuggestionSuggestion, required)

## Errors

### 401 Unauthorized Error

Token missing, malformed, expired or revoked: `INVALID_TOKEN` (or `UNAUTHORIZED` when no bearer token was sent). Request a new token and retry.

- `code` (string, required) — A stable machine-readable code (see `KnownErrorCode`; new codes may appear within v1).
- `error` (string, required)
- `requestId` (string, required, nullable) — The same value as the `X-Request-Id` response header — quote it when reporting a problem.
- `details` (any, optional) — Extra detail for the code, specific to the operation, such as field errors, limits or the creator's account-status details.

### 403 Forbidden Error

The AI act was refused for this creator. - Creator access refused: `CREATOR_CONTEXT_MISMATCH`, `GRANT_REVOKED`, `NOT_ASSIGNED`, `OAUTH_SCOPE_MISSING`, `AGENCY_SUSPENDED` or `FORBIDDEN`. This includes a second right the act needs, such as `write:ai` and `write:ai:voice`, or `write:messages`, and a creator account that no longer holds the CREATOR capability. - `CREATOR_PROFILE_REQUIRED`. - `AI_IDENTITY_CREATOR_ONLY` — enrolling the creator's voice or likeness is the creator's alone.

- `code` (string, required) — A stable machine-readable code (see `KnownErrorCode`; new codes may appear within v1).
- `error` (string, required)
- `requestId` (string, required, nullable) — The same value as the `X-Request-Id` response header — quote it when reporting a problem.
- `details` (any, optional) — Extra detail for the code, specific to the operation, such as field errors, limits or the creator's account-status details.

### 404 Not Found Error

No such resource, or it belongs to another creator: `NOT_FOUND` or a more specific code.

- `code` (string, required) — A stable machine-readable code (see `KnownErrorCode`; new codes may appear within v1).
- `error` (string, required)
- `requestId` (string, required, nullable) — The same value as the `X-Request-Id` response header — quote it when reporting a problem.
- `details` (any, optional) — Extra detail for the code, specific to the operation, such as field errors, limits or the creator's account-status details.

### 429 Too Many Requests Error

Rate limited: `RATE_LIMIT_EXCEEDED`. Wait `Retry-After` seconds before retrying.

- `code` (enum, required) — A stable machine-readable code (see `KnownErrorCode`; new codes may appear within v1).
  - Allowed values: `RATE_LIMIT_EXCEEDED`, `TOO_MANY_MESSAGES`
- `error` (string, required)
- `requestId` (string, required, nullable) — The same value as the `X-Request-Id` response header — quote it when reporting a problem.
- `details` (RateLimitErrorDetails, optional) — Extra detail for the code, specific to the operation, such as field errors, limits or the creator's account-status details.

### 500 Internal Server Error

Unexpected server error: `INTERNAL_ERROR`. Nothing internal is disclosed; quote the `X-Request-Id` when you report it.

- `code` (string, required) — A stable machine-readable code (see `KnownErrorCode`; new codes may appear within v1).
- `error` (string, required)
- `requestId` (string, required, nullable) — The same value as the `X-Request-Id` response header — quote it when reporting a problem.
- `details` (any, optional) — Extra detail for the code, specific to the operation, such as field errors, limits or the creator's account-status details.

### 503 Service Unavailable Error

Temporarily unavailable: `SERVICE_UNAVAILABLE`, `TEMPORARILY_UNAVAILABLE`, `MEDIA_STORAGE_UNAVAILABLE` or `CREATOR_STANDING_UNAVAILABLE`. Retry after `Retry-After` seconds.

- `code` (string, required) — A stable machine-readable code (see `KnownErrorCode`; new codes may appear within v1).
- `error` (string, required)
- `requestId` (string, required, nullable) — The same value as the `X-Request-Id` response header — quote it when reporting a problem.
- `details` (any, optional) — Extra detail for the code, specific to the operation, such as field errors, limits or the creator's account-status details.

## Types

### AiFanReplySuggestionSuggestion

- `state` (enum, required)
  - Allowed values: `PENDING`, `READY`, `FAILED`
- `text` (string, optional) — Present only when READY.
- `failure` (AiFanReplySuggestionSuggestionFailure, optional)

### RateLimitErrorDetails

Extra detail for the code, specific to the operation, such as field errors, limits or the creator's account-status details.

- `retryAfterSec` (integer, required)
- `level` (enum, optional) — The DM send limit that refused the message, set only with `TOO_MANY_MESSAGES`. It is never a quota, a count or a key. - `conversation` — one side of one thread. - `sender` — a person's own ceiling; it does not apply to applications. - `creator` — everything sent for the creator, studio included. - `application` — everything your application sends. - `agency` — everything your agency sends. - `platform` — the agency's fair share of the platform: its throughput or its concurrency. See [rate limits](/authentication/rate-limits).
  - Allowed values: `conversation`, `sender`, `creator`, `application`, `agency`, `platform`

### AiFanReplySuggestionSuggestionFailure

- `code` (string, optional)
- `message` (string, optional)

## Examples

### Draft ready

**Response**

```json
{
  "suggestion": {
    "state": "READY",
    "text": "Thank you so much for the kind words! The new album goes live on Friday, and I think you will love it."
  }
}
```

**SDK Code**

```python Draft ready
import requests

url = "https://api.evvahub.com/partner/v1/accounts/cm4r7k2xq0001qz8w3n5v6b2d/ai/fan-replies/suggestions/e2b6d940-7c1a-4f53-a8e7-5b9d03c6f182"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```go Draft ready
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.evvahub.com/partner/v1/accounts/cm4r7k2xq0001qz8w3n5v6b2d/ai/fan-replies/suggestions/e2b6d940-7c1a-4f53-a8e7-5b9d03c6f182"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```php Draft ready
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.evvahub.com/partner/v1/accounts/cm4r7k2xq0001qz8w3n5v6b2d/ai/fan-replies/suggestions/e2b6d940-7c1a-4f53-a8e7-5b9d03c6f182', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

### Still being written

**Response**

```json
{
  "suggestion": {
    "state": "PENDING"
  }
}
```

**SDK Code**

```python Still being written
import requests

url = "https://api.evvahub.com/partner/v1/accounts/cm4r7k2xq0001qz8w3n5v6b2d/ai/fan-replies/suggestions/e2b6d940-7c1a-4f53-a8e7-5b9d03c6f182"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```go Still being written
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.evvahub.com/partner/v1/accounts/cm4r7k2xq0001qz8w3n5v6b2d/ai/fan-replies/suggestions/e2b6d940-7c1a-4f53-a8e7-5b9d03c6f182"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```php Still being written
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.evvahub.com/partner/v1/accounts/cm4r7k2xq0001qz8w3n5v6b2d/ai/fan-replies/suggestions/e2b6d940-7c1a-4f53-a8e7-5b9d03c6f182', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

### Could not be written

**Response**

```json
{
  "suggestion": {
    "state": "FAILED",
    "failure": {
      "code": "ALLOWANCE_EXHAUSTED",
      "message": "Your generation allowance does not cover this."
    }
  }
}
```

**SDK Code**

```python Could not be written
import requests

url = "https://api.evvahub.com/partner/v1/accounts/cm4r7k2xq0001qz8w3n5v6b2d/ai/fan-replies/suggestions/e2b6d940-7c1a-4f53-a8e7-5b9d03c6f182"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```go Could not be written
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.evvahub.com/partner/v1/accounts/cm4r7k2xq0001qz8w3n5v6b2d/ai/fan-replies/suggestions/e2b6d940-7c1a-4f53-a8e7-5b9d03c6f182"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```php Could not be written
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.evvahub.com/partner/v1/accounts/cm4r7k2xq0001qz8w3n5v6b2d/ai/fan-replies/suggestions/e2b6d940-7c1a-4f53-a8e7-5b9d03c6f182', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```