Accept the AI assistant terms
POST
/api/v1/mailbox/ai/consentRecords the holder's acceptance of the CURRENT terms version -- 409 with error_code terms_version_stale if the submitted version is not current, so a client holding yesterday's text can never bind the holder to words they did not see. On success the acceptance is written to an append-only ledger together with a sealed PDF record (mailbox, both decisions, the full terms text as agreed, timestamp, actor), and the response carries its consent_id and document_url.
Request body
Request
POST
/api/v1/mailbox/ai/consentcurl -X POST 'https://app.mailyte.com/api/v1/mailbox/ai/consent' \
-H 'Authorization: Bearer MAILBOX_TOKEN'const response = await fetch('https://app.mailyte.com/api/v1/mailbox/ai/consent', {
method: 'POST',
headers: {
Authorization: 'Bearer MAILBOX_TOKEN',
},
});
const { data } = await response.json();import requests
response = requests.post(
"https://app.mailyte.com/api/v1/mailbox/ai/consent",
headers={"Authorization": "Bearer MAILBOX_TOKEN"},
)
data = response.json()["data"]<?php
$response = Http::withToken('MAILBOX_TOKEN')
->post('https://app.mailyte.com/api/v1/mailbox/ai/consent');
$data = $response->json('data');require "net/http"
require "json"
uri = URI("https://app.mailyte.com/api/v1/mailbox/ai/consent")
request = Net::HTTP::Post.new(uri)
request["Authorization"] = "Bearer MAILBOX_TOKEN"
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }Response
Successful Response
Returned inside the standard envelope.
Errors
| Status | When |
|---|---|
422 | Validation Error |
Every status, with what causes it and what to do, is on the error reference.