> 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

# Approve a copilot proposal

POST https://api.evvahub.com/partner/v1/accounts/{creatorId}/ai/copilot/proposals/{proposalRef}/approve
Content-Type: application/json

Approves an action the Copilot, EVA, proposed for the creator.

EVVA first checks your application's own rights against the action the proposal actually carries out:

- `send_fan_message` needs `write:messages` and `write:messages:automated`.
- `generate_voice` and `generate_image` need `write:ai` and `write:ai:voice`.
- `read_creator_overview`, `read_content_engagement` and `read_link_traffic` need `read:analytics`.
- `draft_post` and `draft_fan_message` need nothing more.
- `read_account_balance` is never available to an application. It is refused with `403 FORBIDDEN`, and so is any
  action EVVA cannot classify.

Where the call uses AI, it spends the creator's AI allowance, exactly as the creator's own request does.

**Sending a message**

Approving a `send_fan_message` proposal sends a message, so the request body declares its `authorship` exactly as a send does (`AI_AUTOMATED`, or a person's authorship with `operatorRef`). The send limits of every message your application sends
apply ([rate limits](/authentication/rate-limits)). Over a limit, you receive `429 TOO_MANY_MESSAGES`; if EVVA cannot
check the limits, `503 SERVICE_UNAVAILABLE`. Both come with `Retry-After`, and the proposal stays undecided.

The message is coordinated like any send, but this call carries no `fencingToken`. If coordination refuses it, for
example because a lease on the conversation is live, you receive `422 TOOL_REFUSED` and the proposal is recorded as
failed ([conversation leases](/conversation-leases)).

**Agency policy**

Your application's call goes through [action approval](/approvals). It runs automatically within the daily count the agency's own rule sets, or once an authorised person approves it. With no rule, you receive `202` with an `ApprovalRequired` body and nothing is done. After approval, send the same request again with `Partner-Approval-Id`.

**Errors**

- `400 AUTHORSHIP_REQUIRED` / `AUTHORSHIP_INVALID` / `OPERATOR_REF_REQUIRED` — a `send_fan_message` approval whose body does not declare the message's `authorship` (with `operatorRef` for a person's authorship). Nothing is sent.
- `403 FORBIDDEN` — the action is `read_account_balance`, or EVVA cannot classify it.
- `422 TOOL_REFUSED` — the proposed message could not be sent. The proposal is recorded as failed.
- `429 TOO_MANY_MESSAGES` — a send limit is full. `details.level` names the level that refused.
- `503 SERVICE_UNAVAILABLE` — the send limits cannot be checked. Nothing was sent.

**Required scopes:** `write:ai`.

**Approval:** this operation runs through [action approval](/approvals) for applications.

Reference: https://developers.evvahub.com/api-reference/ai/approve-ai-copilot-proposal

## 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.
- `proposalRef` (string, required)

### Headers

- `X-Creator-Id` (string, optional) — Optional echo of the path `creatorId`; any other value is refused with 403 CREATOR_CONTEXT_MISMATCH.
- `Idempotency-Key` (string, required) — Required on every AI write: 1..128 characters, otherwise `400 IDEMPOTENCY_KEY_REQUIRED`. EVVA never generates a key for you, because a generated key would turn a retry into a second charge. The same key answers the same act (`200`) and never reserves the allowance twice. The key is never echoed.
- `Partner-Approval-Id` (string, optional) — The `approvalId` a previous `202 APPROVAL_REQUIRED` returned, for an operation your application may run only with approval. Re-send it with the same payload once a person has approved. A blank value is no approval. The approval is spent once, for exactly that agency, application, creator, operation and payload digest, the same amount and currency, and at most the units it was given for. It is claimed for the request's `Idempotency-Key` (required) and becomes final when the operation succeeds: - A refusal before the effect, a `4xx` or `429`, hands it back for your next attempt. - A `5xx`, `503` included, keeps it claimed for this key, because the effect may have happened. It is handed back only when EVVA knows nothing was done. - The same key re-sent replays the request and never has a second effect. You get the stored result where the operation keeps one, otherwise `409 APPROVAL_CONSUMED` with `details.replay: true`: read the resource to see the result. - Another key is `409 APPROVAL_CONSUMED`. When the approval cannot be used, the request is refused with `403` (`APPROVAL_INVALID`, `APPROVAL_MISMATCH` or `APPROVAL_DECLINED`) or `409` (`APPROVAL_PENDING`, `APPROVAL_EXPIRED` or `APPROVAL_CONSUMED`). See [action approval](/approvals).

### Body (application/json)

This endpoint expects an AiCopilotProposalApproveRequest.

- `authorship` (enum, optional) — Required for an application approving `send_fan_message`.
  - Allowed values: `AI_AUTOMATED`, `HUMAN_AUTHORED`, `AI_DRAFTED_HUMAN_SENT`
- `operatorRef` (string, optional) — The CRM operator, with a person's authorship only.

## Response

### 200

Decided. A proposal that was already decided also answers `200`, with `alreadyDecided: true`.

- `proposal` (AiCopilotProposalDecisionProposal, required)
- `alreadyDecided` (boolean, required)

### 202

The action waits for an authorised person of the agency, and nothing was done. It waits because the agency has no policy for it, its policy requires approval, or the action is over the agency's own automatic limit (`LIMIT_EXCEEDED`). Once an `approval.decided` event approves it, re-send the same request with `Partner-Approval-Id: <approvalId>`. See [action approval](/approvals).

- `code` (enum, required)
  - Allowed values: `APPROVAL_REQUIRED`
- `error` (string, required)
- `approvalId` (string, required)
- `status` (enum, required) — The status of an approval request. Reads show the effective status. - `PENDING` becomes `APPROVED`, `DECLINED`, `EXPIRED` or `REVOKED`. - `APPROVED` becomes `CONSUMED`, `EXPIRED` or `REVOKED`. - `REVOKED` means the request was voided: its access was withdrawn (grant or consent link), the application or agency stopped, the creator was held or restricted, or the policy that governed it was replaced. `revokedReason` says which.
  - Allowed values: `PENDING`, `APPROVED`, `DECLINED`, `EXPIRED`, `CONSUMED`, `REVOKED`
- `reason` (enum, required) — Why the action was not automatic: no policy (the default), a policy that asks for approval, or over a limit.
  - Allowed values: `NO_POLICY`, `POLICY_REQUIRES_APPROVAL`, `LIMIT_EXCEEDED`
- `expiresAt` (datetime, required)
- `requestId` (string, optional, nullable)

## Errors

### 400 Bad Request Error

Invalid or missing parameters: `INVALID_REQUEST` (`details` names the fields), or a more specific code of the operation.

- `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.

### 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

Not your creator, or a right the AI act needs is missing: `GRANT_REVOKED`, `OAUTH_SCOPE_MISSING`, `INSUFFICIENT_SCOPE`, `CREATOR_PROFILE_REQUIRED`, or `AI_IDENTITY_CREATOR_ONLY` (enrolling a 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.

### 409 Conflict Error

Conflicts with the current state: `IDEMPOTENCY_KEY_REUSED` (the key was used for a different request), an approval that is still pending or already used, or a more specific code of the operation.

- `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.

### 422 Unprocessable Entity Error

The creator's AI settings refused the act — the same answer the creator gets: `POLICY_REFUSED`, `CONSENT_REFUSED`, `ALLOWANCE_EXHAUSTED`, `PROVIDER_UNAVAILABLE`, `SEND_REFUSED`, … The message is EVVA's own wording.

- `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

### AiCopilotProposalDecisionProposal

- `ref` (string, optional)
- `state` (string, 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`

## Examples

### Approved and carried out

**Response**

```json
{
  "proposal": {
    "ref": "9a7c3e5b-1f24-4d89-8b6a-e3f0c2d71a54",
    "state": "EXECUTED"
  },
  "alreadyDecided": false
}
```

**SDK Code**

```python Approved and carried out
import requests

url = "https://api.evvahub.com/partner/v1/accounts/cm4r7k2xq0001qz8w3n5v6b2d/ai/copilot/proposals/9a7c3e5b-1f24-4d89-8b6a-e3f0c2d71a54/approve"

headers = {
    "Idempotency-Key": "a1cc34b8-9e1d-49cc-b8c3-3da5b03f6672",
    "Authorization": "Bearer <token>"
}

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

print(response.json())
```

```go Approved and carried out
package main

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

func main() {

	url := "https://api.evvahub.com/partner/v1/accounts/cm4r7k2xq0001qz8w3n5v6b2d/ai/copilot/proposals/9a7c3e5b-1f24-4d89-8b6a-e3f0c2d71a54/approve"

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

	req.Header.Add("Idempotency-Key", "a1cc34b8-9e1d-49cc-b8c3-3da5b03f6672")
	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 Approved and carried out
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.evvahub.com/partner/v1/accounts/cm4r7k2xq0001qz8w3n5v6b2d/ai/copilot/proposals/9a7c3e5b-1f24-4d89-8b6a-e3f0c2d71a54/approve', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Idempotency-Key' => 'a1cc34b8-9e1d-49cc-b8c3-3da5b03f6672',
  ],
]);

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

### Decided earlier — one act happened

**Response**

```json
{
  "proposal": {
    "ref": "9a7c3e5b-1f24-4d89-8b6a-e3f0c2d71a54",
    "state": "EXECUTED"
  },
  "alreadyDecided": true
}
```

**SDK Code**

```python Decided earlier — one act happened
import requests

url = "https://api.evvahub.com/partner/v1/accounts/cm4r7k2xq0001qz8w3n5v6b2d/ai/copilot/proposals/9a7c3e5b-1f24-4d89-8b6a-e3f0c2d71a54/approve"

headers = {
    "Idempotency-Key": "a1cc34b8-9e1d-49cc-b8c3-3da5b03f6672",
    "Authorization": "Bearer <token>"
}

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

print(response.json())
```

```go Decided earlier — one act happened
package main

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

func main() {

	url := "https://api.evvahub.com/partner/v1/accounts/cm4r7k2xq0001qz8w3n5v6b2d/ai/copilot/proposals/9a7c3e5b-1f24-4d89-8b6a-e3f0c2d71a54/approve"

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

	req.Header.Add("Idempotency-Key", "a1cc34b8-9e1d-49cc-b8c3-3da5b03f6672")
	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 Decided earlier — one act happened
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.evvahub.com/partner/v1/accounts/cm4r7k2xq0001qz8w3n5v6b2d/ai/copilot/proposals/9a7c3e5b-1f24-4d89-8b6a-e3f0c2d71a54/approve', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Idempotency-Key' => 'a1cc34b8-9e1d-49cc-b8c3-3da5b03f6672',
  ],
]);

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

### AI_approveAiCopilotProposal_example

**Request**

```json
{
  "authorship": "AI_AUTOMATED"
}
```

**Response**

```json
{
  "approvalId": "apr_8sKq2VnT4xLm7RcB1pYw9ZdH",
  "code": "APPROVAL_REQUIRED",
  "error": "This action needs the approval of an authorised person",
  "expiresAt": "2026-12-03T14:31:00.000Z",
  "reason": "NO_POLICY",
  "requestId": "2ac01c39-6b45-4a0b-8db1-be67984d2cac",
  "status": "PENDING"
}
```

**SDK Code**

```python AI_approveAiCopilotProposal_example
import requests

url = "https://api.evvahub.com/partner/v1/accounts/cm4r7k2xq0001qz8w3n5v6b2d/ai/copilot/proposals/9a7c3e5b-1f24-4d89-8b6a-e3f0c2d71a54/approve"

payload = { "authorship": "AI_AUTOMATED" }
headers = {
    "Idempotency-Key": "a1cc34b8-9e1d-49cc-b8c3-3da5b03f6672",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```go AI_approveAiCopilotProposal_example
package main

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

func main() {

	url := "https://api.evvahub.com/partner/v1/accounts/cm4r7k2xq0001qz8w3n5v6b2d/ai/copilot/proposals/9a7c3e5b-1f24-4d89-8b6a-e3f0c2d71a54/approve"

	payload := strings.NewReader("{\n  \"authorship\": \"AI_AUTOMATED\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Idempotency-Key", "a1cc34b8-9e1d-49cc-b8c3-3da5b03f6672")
	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

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

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

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

}
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.evvahub.com/partner/v1/accounts/cm4r7k2xq0001qz8w3n5v6b2d/ai/copilot/proposals/9a7c3e5b-1f24-4d89-8b6a-e3f0c2d71a54/approve', [
  'body' => '{
  "authorship": "AI_AUTOMATED"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'Idempotency-Key' => 'a1cc34b8-9e1d-49cc-b8c3-3da5b03f6672',
  ],
]);

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