import requests
# Replace these with your values
ENVIRONMENT = "<eu-or-us>"
INTERACTION_ID = "<your-interaction-id>"
TEMPLATE_ID = "<your-template-id>"
TENANT = "<your-tenant-name>"
TOKEN = "<your-access-token>"
response = requests.post(
f"https://api.{ENVIRONMENT}.corti.app/v2/documents",
headers={
"Authorization": f"Bearer {TOKEN}",
"Tenant-Name": TENANT,
"Content-Type": "application/json",
},
json={
"outputLanguage": "en-US",
"interactionId": INTERACTION_ID,
"templateRef": {"templateId": TEMPLATE_ID},
},
)
response.raise_for_status()
result = response.json()