Skip to navigation

Send an AI-assisted fan reply

Sends an AI-assisted reply to a fan as an ordinary message from the creator.

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

Authorship

Your application declares authorship within the creator’s consent, with operatorRef for a person’s authorship. See message authorship.

Coordination

The reply is coordinated like a plain send, POST /partner/v1/accounts/{creatorId}/conversations/{conversationId}/messages: the conversation lease and its fencingToken, the pause after a person’s reply, handoffs, and expectedLastMessageId (conversation leases).

Only the answer differs. Where a plain send is refused with 409 LEASE_HELD, 409 STALE_FENCING_TOKEN, 409 AUTOMATION_PAUSED or 409 CONVERSATION_ADVANCED, this operation answers 422 SEND_REFUSED without Retry-After, and nothing is sent. Read the conversation’s coordination state with GET /partner/v1/accounts/{creatorId}/conversations/{conversationId}/lease before you try again.

takeover is for people on the agency’s team only. If your application sends takeover: true, the request is refused with 400 INVALID_REQUEST.

Limits

The reply counts against the same send limits as every message your application sends (rate limits). Over a limit, you receive 429 TOO_MANY_MESSAGES. If EVVA cannot check the limits, you receive 503 SERVICE_UNAVAILABLE. Both come with Retry-After, and nothing is written. A retry of a reply that was already sent, with the same Idempotency-Key, costs nothing.

Agency policy

Your application’s call goes through action approval. 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 INVALID_REQUEST — takeover: true from your application, or a malformed fencingToken or expectedLastMessageId.
  • 422 SEND_REFUSED — the message was not delivered. Every coordination refusal answers this code. Nothing was sent.
  • 429 TOO_MANY_MESSAGES — a send limit is full. Retry-After says when to retry: details.retryAfterSec gives the same wait, and details.level names the level that refused.
  • 503 SERVICE_UNAVAILABLE — the send limits cannot be checked, and nothing was written. Retry after Retry-After.

Required scopes: write:ai, write:messages.

Approval: this operation runs through action approval for applications.

Authentication

AuthorizationBearer

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.

Required scopes:write:aiwrite:messages

Path parameters

creatorIdstringRequired>=1 character

The creator profile id — the ONLY source of the creator a request acts for.

Headers

X-Creator-IdstringOptional

Optional echo of the path creatorId; any other value is refused with 403 CREATOR_CONTEXT_MISMATCH.

Idempotency-KeystringRequired1-128 characters

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-IdstringOptionalformat: "^apr_[A-Za-z0-9]{24}$"

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.

Request

This endpoint expects an object.
conversationRefstringRequiredformat: "^[A-Za-z0-9_-]{1,64}$"
bodystringRequired1-5000 characters

The approved text, verbatim — nothing is re-generated.

attachmentRefslist of stringsOptional
humanComposedbooleanOptional

Whether a person read this exact text (AI_DRAFTED_HUMAN_SENT) or approved the act (AI_GENERATED_APPROVED).

authorshipenumOptional

REQUIRED for an application (its own scope within the creator’s consent).

Allowed values:
operatorRefstringOptional1-64 characters
The CRM operator, with a person's authorship only.
expectedLastMessageIdstringOptionalformat: "^[A-Za-z0-9_-]{1,64}$"
Conditional send.
fencingTokenstring or integerOptional

The current fencing token of your application’s own live lease on the conversation. Required while a lease is live. Without it, under another holder’s lease, or with a token that is not current, the send is refused with 422 SEND_REFUSED.

takeoverbooleanOptional

For people on the agency’s team only. If your application sends true, the request is refused with 400 INVALID_REQUEST.

automationRunIdstringOptionalformat: "^[A-Za-z0-9._:-]{1,64}$"

The client’s run reference — audit only.

Response

A retry with the same Idempotency-Key: the same message, not a second one.

messageobject
alreadySentboolean

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
422
Unprocessable Entity Error
429
Too Many Requests Error
500
Internal Server Error
503
Service Unavailable Error