POST Endpoint

POST /message

Send encrypted messages with document attachments and signature requests to verified UIP users.

Endpoint

API Endpoint
POST https://msg.api.uip.id/v1

Headers

Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Request Body

{
  "recipient_uip_id": "uip_user_1234567890",
  "webhook_url": "https://yourapp.com/webhooks/uip/msg",
  "subject": "Employment Contract Review",
  "message": "Please review and sign the attached contract.",
  "severity": "high",
  "requires_signature": true,
  "attachment": {
    "filename": "contract.pdf",
    "content_type": "application/pdf",
    "data": "base64_encoded_pdf_data",
    "size": 1048576
  }
}

Parameters

ParameterTypeRequiredDescription
recipient_uip_idstringYesUIP ID of the message recipient
webhook_urlstringYesURL to receive delivery and response events
subjectstringYesMessage subject/title
messagestringYesMessage content/body
severitystringNoNotification priority: low, medium, high, extreme (default: medium)
attachmentobjectNoDocument attachment (up to 20MB)
requires_signaturebooleanNoWhether document requires signature (default: false)

Response

{
  "message_id": "msg_1234567890abcdef",
  "status": "sent",
  "recipient_uip_id": "uip_user_1234567890",
  "estimated_delivery": "2024-01-15T10:30:00Z",
  "requires_signature": true,
  "cost": 0.10
}