Skip to navigation

Create a saved reply

Saves a reply the creator can reuse.

The same limits and text rules apply as when the creator saves a reply.

Priced replies

A reply with unlockPrice must include at least one file, and its price is checked like this:

  1. Your application’s effective access must cover write:paid_messages (scopes and grants). Otherwise the reply is refused and nothing is saved.
  2. The request must carry an Idempotency-Key.
  3. It then goes through action approval like a PPV send, with the price as the amount. Within the agency’s own automatic limits the reply is saved. Otherwise you receive 202 APPROVAL_REQUIRED: once a person approves, re-send the same request with Partner-Approval-Id.

A free reply needs neither the scope nor approval.

Idempotency

With an Idempotency-Key, the rules of a message send apply, in your application’s own key space (idempotency). The same key with the same reply returns 200 with the stored template.

Errors

  • 400 IDEMPOTENCY_KEY_REQUIRED — a priced reply without an Idempotency-Key. Nothing is saved.
  • 400 INVALID_REQUEST — for example a priced reply with no file (details.unlockPrice).
  • 403 PRICE_NOT_PERMITTED — a priced reply, and your application’s effective access lacks write:paid_messages. details.requiredScope is write:paid_messages and details.reason is CONSENT. Nothing is saved.
  • 403 ACTION_DENIED_BY_POLICY — the agency’s policy does not allow your application to price a reply.
  • 409 IDEMPOTENCY_KEY_REUSED — the key was already used with a different reply.
  • 409 TEMPLATE_LIMIT_REACHED — the creator has reached the maximum number of saved replies.

Required scopes: write:messages.

Approval: setting or changing unlockPrice 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.

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.
namestringRequired1-80 characters
textstringRequired1-2000 characters
attachmentslist of stringsOptional

Omitted means none (the write replaces whole).

unlockPriceobject or nullOptional

A priced reply — needs at least one attachment and the grant’s write:paid_messages.

Response

A retry with the same Idempotency-Key and the same reply: the stored reply.

templateobject

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