Suger

Draft a Partnership Invitation Email

POST https://api.suger.cloud/org/{orgId}/prm/partner/invitation/generate-email

Generate a subject line and body for a partnership invitation email, written for a specific recipient using this organization's partnership profile and what is known about the partner company. Use it to prepare wording before inviting someone, or to rewrite a draft. It returns text only — it sends nothing, creates no invitation, and changes no record. Sending is a separate step with CreatePrmInvitation. It calls a language model and records AI usage for the organization, so each call has a cost. Generate once and edit the result; repeated regeneration adds cost with no new information.

Parameters

NameInTypeRequiredDescription
orgId path string yes Organization ID

Request Body

Required. Content-Type: application/json · Schema: GenerateEmailRequest

GenerateEmailRequest fields:

FieldTypeRequiredDescription
aiContext string no
contextMessage string no
organizationName string no
partnerId string no
partnerName string no
partnerOverview string no
purpose string yes
referencedDocuments array<GenerateEmailReferencedDocument> no ReferencedDocuments are the agreements/files the seller attached on the compose step, passed so the AI can write a natural lead-in from each document's description and emit its {{document:<id>}} token inline where the link belongs. The token is replaced with a real link on send.
senderName string no
tone string yes
useTemplatePlaceholder boolean no UseTemplatePlaceholder generates a reusable template (for bulk invite): the model emits the literal "{{partner}}" token wherever the partner company name would go, instead of a specific name. The caller substitutes the token per recipient. When set, PartnerName/PartnerID are not required.

GenerateEmailReferencedDocument fields:

FieldTypeRequiredDescription
description string no
id string no
name string no

Responses

200 — OK

Content-Type: application/json · Schema: GenerateEmailResponse

GenerateEmailResponse fields:

FieldTypeRequiredDescription
body string no
subject string no

400 — Bad request error

Content-Type: application/json

Example

Generated from this operation's schema. Values are placeholders — substitute your own ids, and set SUGER_TOKEN to a bearer token from the OAuth client-credentials exchange.

Request

curl -X POST 'https://api.suger.cloud/org/{orgId}/prm/partner/invitation/generate-email' \
  -H "Authorization: Bearer $SUGER_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
  "purpose": "string",
  "tone": "string"
}'

Response — 200

{
  "body": "string",
  "subject": "string"
}

Error — 400

"string"

View as Markdown · Interactive API reference

Spotted something wrong or out of date on this page? Tell us and we'll correct it.