Skip to navigation

Send a message

Sends a message in the conversation as the creator: text in body, at least one attachment, or both.

replyToMessageRef and templateRef are optional. viewOnce or expiresAt makes a view-once or expiring message, which is a sensitive send (see View-once and expiring messages). The fan sees an ordinary message from the creator. The same rules hold for every item of POST /partner/v1/bulk/messages.

Authorship

Every request must declare authorship (see message authorship):

  • AI_AUTOMATED needs the write:messages:automated scope, and the creator’s account must allow BULK_MESSAGING.
  • HUMAN_AUTHORED or AI_DRAFTED_HUMAN_SENT needs operatorRef and the write:messages:operator scope, for a live operator in the agency’s CRM.

Coordination

Sends respect conversation leases:

  • While a lease is live, a send must carry the lease’s current fencingToken, or it is refused with 409 LEASE_HELD. This includes the holding application’s own sends, so two instances of one application never write at once.
  • A fencingToken that is not the current lease’s is refused with 409 STALE_FENCING_TOKEN.
  • While another holder leases the conversation, or it is reserved for another application, sends are refused with 409 LEASE_HELD.
  • After a person’s reply (for 5 minutes by default; the agency may set 1 to 60 minutes) or a handoff to a person, automated sends are refused with 409 AUTOMATION_PAUSED.
  • A message you declare as an operator’s (HUMAN_AUTHORED or AI_DRAFTED_HUMAN_SENT) is paused only by a reply from a person on the agency’s team, never by the creator’s or the operator’s own replies. It is also refused with 409 AUTOMATION_PAUSED while a handoff to a person has been taken up, until a person hands the conversation back. It may answer a handoff that nobody has taken up yet.
  • expectedLastMessageId makes the send conditional: when the newest message is another one, it is refused with 409 CONVERSATION_ADVANCED.
  • takeover is refused: taking a conversation over is a person’s action alone.

Idempotency

Idempotency-Key is optional and lives in your application’s own key space. The same key with the same message returns 200 with the stored message. A replay is answered before any coordination check. See idempotency.

Limits

Sends are limited per conversation (30 per minute) and per creator (300 per minute), both shared with the creator’s own sends, and per application and per agency, scaled by active creators. A replay or a refused request costs nothing. See rate limits.

View-once and expiring messages

A send that sets a lifetime (viewOnce or expiresAt) also needs the write:messages:view_once scope. Without it, the send is refused with 403 OAUTH_SCOPE_MISSING before any approval is asked. With it, the send goes through action approval:

  • The agency’s policy may refuse it: 403 ACTION_DENIED_BY_POLICY.
  • Under AUTO_WITHIN_LIMITS, it is sent while it stays within the agency’s own limits.
  • Otherwise you get 202 APPROVAL_REQUIRED. Re-send with the Partner-Approval-Id header. The approval is bound to the conversation, the files and the lifetime, and is spent once.

An ordinary send asks for no approval.

Errors

  • 400 AUTHORSHIP_REQUIRED — authorship is missing.
  • 400 AUTHORSHIP_INVALID — the value is not one an application may declare.
  • 400 OPERATOR_REF_REQUIRED, 400 OPERATOR_REF_INVALID — operatorRef is missing, malformed or misplaced.
  • 403 AUTHORSHIP_NOT_PERMITTED — the creator has not consented to this authorship. details.requiredScope names the missing scope.
  • 403 CREATOR_SUSPENDED — an automated send for a suspended creator.
  • 403 RECIPIENT_NOT_ACCEPTING_MESSAGES — the fan muted or blocked the creator, which refuses every creator-side send.
  • 409 IDEMPOTENCY_KEY_REUSED — the key was already used for a different message.
  • 409 MEDIA_NOT_READY — an attachment is not ready.
  • 409 LEASE_HELD, 409 STALE_FENCING_TOKEN, 409 AUTOMATION_PAUSED, 409 CONVERSATION_ADVANCED — see Coordination.
  • 429 TOO_MANY_MESSAGES — a send limit is full. Retry-After says when to retry, and details.level names the level that refused.
  • 503 SERVICE_UNAVAILABLE — the limits cannot be checked, and nothing was written. Retry after Retry-After.

Required scopes: write:messages.

Approval: setting or changing viewOnce, expiresAt runs through action approval.

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:messages

Path parameters

creatorIdstringRequired>=1 character

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

conversationIdstringRequired>=1 character

Headers

X-Creator-IdstringOptional

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

Idempotency-KeystringOptionalformat: "^[A-Za-z0-9_-]*$"<=128 characters

Optional key for the send; blank means no key. Otherwise 1..128 characters of [A-Za-z0-9_-], or 400 INVALID_REQUEST before anything is written. The same key with the same message answers 200 with the stored message; with a different message it is 409 IDEMPOTENCY_KEY_REUSED (formerly CONFLICT). The key is scoped to the sender, your application, and 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.
bodystring or nullOptional<=2000 characters

Trimmed length ≤ 2000; no NUL, no lone surrogate. Optional when attachments are sent.

replyToMessageRefstringOptional>=1 character

The message this one answers (must be in this conversation, checked in the send transaction).

viewOncebooleanOptional

A free message the fan may open once. It needs a grant carrying write:messages:view_once, which is not part of the default consent; otherwise 403. For an application it also goes through action approval: 202 APPROVAL_REQUIRED unless the agency’s policy lets it through. 409 ASSET_REACHABLE_ELSEWHERE when the fan can already open the file from another message.

expiresAtdatetimeOptional

When the media stops being servable: 5 minutes to 30 days ahead.

templateRefstringOptional

The saved reply this message came from — counts one use when a message is created.

attachmentslist of stringsOptional

Vault asset ids, with no duplicates: at most the per-message attachment limit, 10 by default.

authorshipenumOptional

REQUIRED for an application: AI_AUTOMATED needs write:messages:automated; HUMAN_AUTHORED / AI_DRAFTED_HUMAN_SENT need write:messages:operator and operatorRef.

Allowed values:
operatorRefstringOptional1-64 characters

The external CRM’s opaque operator id — required with HUMAN_AUTHORED / AI_DRAFTED_HUMAN_SENT, refused otherwise. Stored in the agency audit only.

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

Makes the send conditional: the message is written only while this is the conversation’s newest live message, otherwise 409 CONVERSATION_ADVANCED. The check is made inside the write transaction, so two sends that expected the same last message cannot both be written.

fencingTokenstring or integerOptional

The fencing token of the conversation’s current lease; a token that is not current is 409 STALE_FENCING_TOKEN. An application must send it while the lease is live: without it the send is 409 LEASE_HELD, even the lease holder’s own. See conversation leases.

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

The client’s own reference for the automation run (metadata); stored in the agency audit, never shown to the buyer.

Response

An idempotent replay of a message already sent.
messageobject

Errors

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