Reserve a verify code before sending
POST
/v1/communications/reserve
const url = 'https://api.fromenance.com/v1/communications/reserve';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"recipient_hash":"example","template_id":"example","campaign_id":"example","provider":"api","from_address":"example","expires_in_hours":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.fromenance.com/v1/communications/reserve \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "recipient_hash": "example", "template_id": "example", "campaign_id": "example", "provider": "api", "from_address": "example", "expires_in_hours": 1 }'For ESPs that need the code as a merge field before the send event exists. Complete it with PATCH /v1/communications/{id} or through the ESP webhook. Unfinished reservations expire after 24 hours and count as a coverage gap.
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”Media typeapplication/json
object
recipient_hash
string
template_id
string | null
campaign_id
string | null
provider
string
from_address
string
expires_in_hours
integer
Responses
Section titled “ Responses ”Reserved
Media typeapplication/json
object
id
required
string
verify_code
required
string
expires_at
required
string
sandbox
required
boolean
Example
{ "verify_code": "KX73-PQ9G"}