Skip to main content
POST
audience.consent.grant

Authorizations

Authorization
string
header
required

A Lath API key: lath_live_sk… or lath_test_sk… on a server, lath_live_pk… or lath_test_pk… in a browser.

Headers

Idempotency-Key
string

Replays the stored response for the same key and input; refuses different input.

Body

application/json
contactId
string<uuid>
required
Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
channel
enum<string>
required
Available options:
email,
sms
topic
string
required
Pattern: ^[a-z0-9][a-z0-9_-]{0,63}$
wording
string
required

The exact opt-in text the person agreed to

Required string length: 1 - 1000
source
string
required

Where consent was collected, e.g. 'checkout-newsletter-box'

Required string length: 1 - 200
ip
string
Maximum string length: 64

Response

{ activityId, result }. activityId is empty for reads.

activityId
string
required

The activity this call created, or empty for a read.

result
object
required
Last modified on September 13, 2026