Request
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer token with your API key: Bearer YOUR_API_KEY |
Content-Type | Yes | multipart/form-data for file uploads, application/x-www-form-urlencoded for text-only |
Body Parameters
Description of why you’re sending the message. This is shown to the user in the UIP app as the message subject/title.Example:
"Sign Employment Contract" or "Review Q4 Financial Report"The message content/body. This is the actual message text the recipient will read.Example:
"Please review and sign your employment contract by January 15, 2025"Notification priority level that controls how the message appears to the user.Valid values:
LOW, MEDIUM, HIGH, EXTREMEDefault behavior:LOW- Silent delivery, no notificationMEDIUM- Standard notificationHIGH- Attention-required notificationEXTREME- Emergency alert (use sparingly)
The UIP ID of the message recipient. Must be a valid UIP user identifier.Example:
"user_abc123def456"Flag indicating whether the recipient must sign the message.Valid values:
true, falseWhen set to true, the message requires biometric signature before it can be marked as complete.Expiry date for signature requests. Only applies when
signature_required is true.Format: RFC3339 format (ISO 8601 timestamp)Example: "2025-01-15T17:00:00Z"Default behavior:- If omitted when signature is required: Defaults to 7 days from message creation
- Maximum allowed: 3 months from message creation
- Cannot be in the past
Optional document file(s) to attach to the message.Form field name:
attachments (use this exact name in multipart form)File restrictions:- Format: PDF only (
.pdfextension required) - Size limit: 20MB combined for all attachments
- Multiple files: Supported, but total size cannot exceed 20MB
- Message without attachment: $0.03
- Message with attachment: $0.10 (regardless of number of PDFs, as long as total ≤ 20MB)
Only PDF files are accepted. Attempting to upload other file types will result in error code
request/invalid-file-type.Response
Success Response (200 OK)
Returns a JSON object containing the message ID. Response type:application/json
Example response:
Save the
message_id to track message status and reference it in your webhook handlers.Example Requests
Text Message Without Signature
Text Message With Signature Required
Message With PDF Attachments
Message With PDF Attachments + Signature
Errors
See the Error Handling Guide for comprehensive error handling strategies. Possible error codes for this endpoint: Authentication Errors:auth/missing-api-key- No API key provided in Authorization headerauth/invalid-api-key- Invalid API keyauth/revoked-api-key- API key has been revokedauth/business-archived- Business account has been archivedauth/verification-required- UIP account must be verified before using this endpoint
request/invalid-payload- Request payload is invalid or missing required fields- Intent is required
- Message cannot be empty
- Priority must be LOW, MEDIUM, HIGH, or EXTREME
- Receiver UIP ID cannot be empty
- Must specify if signature is required
- Signature expiry date format invalid (use RFC3339)
- Signature expiry cannot be more than 3 months ahead
- Signature expiry cannot be in the past
request/invalid-file-type- Only PDF files are allowedrequest/file-too-large- Combined file size exceeds 20MB limitrequest/not-found- No such registered route in API service Payment Errors:payment/insufficient-funds- Insufficient account balance to complete request
resource/not-found- Recipient UIP ID not found
internal/server-error- Failed to create message, parse form data, or process requestdata/corrupt- Corrupt data detected
Webhook Callback
The Message API sends webhook events only for signature-required messages.Event: message
Webhook event sent when user signs or declines a signature-required message.event- Always"message"for signature-related eventsdata.signing_uip_id- The UIP ID of the user who signed or declineddata.message_id- The message ID from your original requestdata.audit_id- Permanent audit trail reference ID (save this for compliance)
signature_required: true):
- Sent when user signs the message with biometric verification
- Sent when user declines to sign with biometric verification
- Both actions create permanent audit records for legal traceability
- Query the audit trail using
audit_idto determine if the message was signed or declined
Determining Action Taken: The webhook structure is identical for both signed and declined messages. To determine whether the user signed or declined, query the Audit API using the
audit_id to retrieve the specific action details.Implementation Flow
Send Message
Call the Message endpoint with intent, message content, priority, recipient UIP ID, and signature settings
User Receives Notification
Recipient receives push notification based on priority level (unless LOW priority)
User Takes Action
- If signature not required: User reads message (no webhook sent)
- If signature required: User signs or declines with biometric verification, webhook sent
Receive Webhook (Signature-Required Only)
For signature-required messages, your webhook receives the
message event with signing UIP ID and audit trail referenceBest Practices
Clear Intent & Message
Use descriptive intent titles and clear message content. Recipients need to understand what action is required.
Appropriate Priority
Use correct priority levels. Reserve HIGH and EXTREME for urgent matters only. Most messages should use MEDIUM.
PDF Only for Attachments
Only PDF files are supported. Convert documents to PDF before uploading. Keep total size under 20MB.
Signature Expiry Dates
For signature-required messages, set realistic expiry dates (default: 7 days). Don’t exceed 3-month maximum.
Save Audit IDs
Always save audit_id from webhook responses for permanent proof, compliance, and legal verification.
Query Audit Trail
For signature-required messages: Use the audit_id to query the Audit API and determine whether the user signed or declined.