Acquire or release a lease
Acquires, renews or releases your application’s lease on the conversation, depending on action.
Actions
acquire— every acquisition generates a new fencing token for the conversation: a decimal string, never reused, so a holder that lost its lease can never send under it again.ttlSecondsis clamped to 15–300 seconds (default 60).renew— needs the current token of a live lease, otherwise409 STALE_FENCING_TOKEN; while a person’s reply pauses automation,409 AUTOMATION_PAUSED.release— idempotent under the lease’s token.
Who can hold a lease
Besides write:messages, your application needs write:messages:automated or write:messages:operator: the lease is held by your application’s automation or by its live CRM operator. takeover is refused, because taking a conversation over is a person’s action alone. See conversation leases.
Events
EVVA sends lease.acquired, and lease.lost to an application whose lease a takeover or a lapse replaced. A person’s reply in the conversation ends your application’s lease (lease.lost with reason HUMAN_REPLIED).
Errors
409 LEASE_HELD— the conversation is already leased.Retry-Afteris set when the other lease’s end is known.409 STALE_FENCING_TOKEN—renewwithout the current token of a live lease.409 AUTOMATION_PAUSED—acquireorrenewwhile a person’s reply pauses automation, withRetry-After(the agency’s window: 5 minutes by default, 1 to 60 minutes), or after a handoff to a person.
Required scopes: write:messages.
Authentication
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.
write:messagesPath parameters
The creator profile id — the ONLY source of the creator a request acts for.
Headers
Optional echo of the path creatorId; any other value is refused with 403 CREATOR_CONTEXT_MISMATCH.
Request
Required for renew and release — the token the acquire answered (a decimal string; a JSON integer is tolerated).
Clamped to the configured bounds (15..300; default 60).
