← Back to Blog
UnlockLater APIAPI automationscheduled messagescredential sharingemail OTPdeveloper toolsPro API

Automate Time-Locked Messages and Secure Credential Handoffs with an API

Some messages should arrive at a specific moment. Some credentials should be available only to a particular recipient and only for a limited time. When those handoffs are part of a repeatable process, creating each link by hand can become another step to remember.

The UnlockLater Pro API lets your application create scheduled text messages and secure credential shares. That makes it possible to add time-based sharing to an onboarding tool, an internal workflow, a launch checklist, or a small automation script—without building the message and reveal experience yourself.

The API currently creates two types of items:

  • Time-locked text messages that become available at a chosen date and time.
  • Credential shares for passwords, API keys, environment blocks, and private keys.

Both endpoints return a link your workflow can use. Credential values are encrypted before storage and are not included in the API response.

Use case: schedule a message from an existing workflow

Imagine an operations team that prepares a launch checklist in its own system. A teammate needs a reminder or a prepared note at the scheduled launch time, but the note should not be available early.

Instead of asking someone to return later and create the message manually, the internal system can make an API request when the launch date is set. The response includes the reveal time and message URL, which the workflow can save alongside the launch record.

curl -X POST "$BASE_URL/api/v1/messages/text" \
  -H "Authorization: Bearer $UNLOCKLATER_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: launch-note-2027-001" \
  -d '{
    "content": "Launch checklist: confirm the status page, then notify the team.",
    "revealAt": "2027-01-01T09:00:00-08:00",
    "expiryType": "time_based",
    "expiryValue": 7
  }'

The timestamp includes a timezone offset, so the scheduled moment is unambiguous. The returned URL can be shared through the team’s normal coordination channel.

For messages that should be restricted to a recipient’s inbox, include recipientEmail and set requireEmailVerification to true. The recipient requests a one-time code after the message unlocks; the API does not send a text-message invitation when the message is created.

Use case: hand off temporary access during onboarding

Contractor onboarding often involves several steps: assign a task, create an account, and deliver the right login details. Pasting a password or API key into a project ticket can leave a durable copy in comments, notifications, and exports.

An onboarding tool can instead create a credential share and email an invitation to the intended recipient:

curl -X POST "$BASE_URL/api/v1/messages/credentials" \
  -H "Authorization: Bearer $UNLOCKLATER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "credentialType": "api_key",
    "title": "Temporary staging key",
    "secret": "REPLACE_WITH_SECRET",
    "recipientEmail": "[email protected]",
    "visibilityDays": 3,
    "burnAfterReading": true
  }'

When recipientEmail is provided, email OTP verification is enabled by default for the credential share. UnlockLater sends the invitation with the share link; the recipient requests a code from the share page and verifies the invited email before the credential is revealed. burnAfterReading can be used when the link should allow only one successful credential retrieval.

This workflow controls access to the share link. It does not change the permissions of the underlying key or account. Use the narrowest practical permissions, set the shortest useful visibility period, and revoke or rotate the credential at its source when it should stop working.

Use case: make release and incident handoffs repeatable

During a release or incident, teams often need to coordinate information at the right time:

  • A status update prepared ahead of a planned maintenance window
  • A handoff note for the next on-call engineer
  • Temporary staging access for a release reviewer
  • A one-time operational detail shared with a designated teammate

An existing deployment or incident tool can create the UnlockLater item as part of its workflow and store the returned URL with the release or incident record. This keeps the handoff connected to the process that created it, rather than relying on someone to remember to make a separate link later.

Keep sensitive values out of ordinary logs and tickets. In particular, avoid logging API keys, full request bodies containing credentials, or the generated share URL in a system that many people can access.

Decide which reveal protection fits

The API supports different access choices for the two endpoint types:

Text messages

Add recipientEmail to associate the message with a recipient address. Set requireEmailVerification: true when the recipient must verify that email before reveal. The message still remains locked until its scheduled reveal time.

Credential shares

Add recipientEmail to send the recipient an invitation. Email OTP is enabled by default when an address is supplied. To allow direct-link reveal instead, explicitly set requireEmailVerification: false and allowDirectReveal: true.

A direct link can be opened by anyone who obtains it while it remains available. Treat it as a secret and send it only through a channel appropriate for the sensitivity of the content.

Build carefully around the API

The API is available to accounts with an active Pro subscription. API-created items use the same monthly message allowance as items created on the website. Request limits are 60 requests per minute per API key and 120 per minute per account.

A few practices make integrations more reliable:

  1. Keep API keys on the server. Do not place them in browser code, mobile apps, public repositories, or client-side logs.
  2. Use idempotency keys for retries. Repeating a request with the same Idempotency-Key and body returns the original result instead of creating another item.
  3. Use explicit time zones. Send ISO 8601 timestamps with Z or a numeric offset.
  4. Store returned links carefully. Anyone with an unprotected direct-reveal link may be able to access the share.
  5. Set expiry intentionally. Match the availability period to the real handoff window.
  6. Rotate credentials at the source. Expiring or revoking a share does not disable a key at the service that issued it.

The API does not claim end-to-end encryption. Use it as one part of a security-conscious handoff process, and follow your organization’s rules for secrets, access reviews, and credential rotation.

Get started with the UnlockLater API

Pro users can create and revoke API keys from the API access page and review the authenticated API documentation. The documentation includes request fields, responses, rate limits, and error codes.

If your application already knows when a message should become available—or who should receive a temporary credential—an API call can make that handoff part of the workflow you already use.