API Documentation

Integrate SendMeSafe into your existing workflows and applications with our REST API.

Overview

The SendMeSafe API enables programmatic management of upload links, share links, files, and team members. You can use all features of the web interface through the API.

  • -Create, update, and manage upload links
  • -Upload and download files securely
  • -Create share links for secure file sharing
  • -Invite and manage team members

Authentication

Authentication

All API requests require authentication via Bearer token in the Authorization header.

Example

Header
Authorization: Bearer YOUR_API_KEY

Security Note

Only use API keys server-side. Never embed them in client-side code.

Base URL

All API requests are sent to the following base URL:

https://sendmesafe.com/api

Endpoints

Uploads

Endpoints for uploading files via upload links.

POST/api/upload

Generates a pre-signed URL for direct upload to S3.

Parameter

tokenstring*
The upload link token
filenamestring*
Name of the file to upload
sizenumber*
File size in bytes
mimeTypestring
MIME type of the file
passwordstring
Password if the link is protected
curl -X POST https://sendmesafe.com/api/upload \
  -H "Content-Type: application/json" \
  -d '{
    "token": "abc123def456",
    "filename": "document.pdf",
    "size": 1048576,
    "mimeType": "application/pdf"
  }'
Response
200
{
  "url": "https://storage.sendmesafe.com/...",
  "key": "org_123/client_456/uuid-document.pdf"
}
POST/api/upload/complete

Confirms the upload and saves the file metadata.

Parameter

tokenstring*
The upload link token
keystring*
S3 key from the presign response
filenamestring*
Name of the uploaded file
sizenumber*
File size in bytes

Shares

Create secure share links to share files with your clients.

POST/api/share

Creates a new share link.

Parameter

labelstring
Optional label for the share
clientIdstring
Optional client assignment
passwordstring
Optional password (min. 4 characters)
expiresAtISO 8601
Optional expiration date
maxDownloadsnumber
Maximum number of downloads
Response
200
{
  "id": "share_abc123",
  "token": "x7y8z9...",
  "label": "Q4 Reports",
  "expiresAt": "2025-12-31T23:59:59Z",
  "maxDownloads": 5,
  "hasPassword": true
}
GET/api/share

Lists all share links for your organization.

GET/api/share/{id}

Retrieves share link details.

Parameter

idstring*
The unique ID of the share link
DELETE/api/share/{id}

Deletes a share link and all associated files.

Parameter

idstring*
The unique ID of the share link

Files

Manage received and sent files.

GET/api/files

Lists all files with optional filters.

Parameter

typestring
Filter: 'received' or 'sent'
clientstring
Filter by client ID
qstring
Search term for filenames
sortstring
Sort by: 'date', 'name' or 'size'
Response
200
{
  "files": [
    {
      "id": "received-file_123",
      "type": "received",
      "filename": "document.pdf",
      "size": 1048576,
      "mimeType": "application/pdf",
      "createdAt": "2025-01-15T10:30:00Z",
      "clientId": "client_abc",
      "clientName": "Max Mustermann"
    }
  ],
  "counts": {
    "total": 42,
    "received": 30,
    "sent": 12
  }
}
GET/api/files/{id}/download

Downloads a file (streaming).

Parameter

idstring*
The unique file ID (format: 'received-{id}' or 'sent-{id}')
DELETE/api/files/{id}

Permanently deletes a file.

Parameter

idstring*
The unique file ID

Team

Manage team members and invitations.

Note: Team features require the Organisation plan.

GET/api/team/members

Lists all team members and pending invitations.

Response
200
{
  "members": [
    {
      "id": "user_123",
      "name": "Anna Schmidt",
      "email": "anna@company.com",
      "role": "OWNER",
      "createdAt": "2024-01-01T00:00:00Z"
    }
  ],
  "invitations": [
    {
      "id": "inv_456",
      "email": "new@company.com",
      "role": "MEMBER",
      "expiresAt": "2025-01-22T00:00:00Z"
    }
  ]
}
POST/api/team/invitations

Sends an invitation to an email address.

Parameter

emailstring*
Email address of the new member
rolestring
Role: 'ADMIN' or 'MEMBER' (default)
DELETE/api/team/invitations?id={id}

Revokes a pending invitation.

Parameter

idstring*
The invitation ID
DELETE/api/team/members/{id}

Removes a member from the team.

Parameter

idstring*
The user ID

Error Codes

The API uses standard HTTP status codes to indicate success or failure.

CodeStatusDescription
400Bad RequestThe request contains invalid parameters or is malformed.
401UnauthorizedInvalid or missing API key.
403ForbiddenNo permission for this action or subscription upgrade required.
404Not FoundThe requested resource was not found.
410GoneThe resource has expired (e.g., link expired).
500Server ErrorAn internal server error occurred. Please try again later.

Error Response

JSON401
{
  "error": "Unauthorized",
  "message": "Invalid or missing API key"
}

Rate Limits

To ensure service stability, the following rate limits apply:

EndpointLimit
/api/*100 requests per minute
/api/upload50 uploads per minute
/api/search30 search queries per minute

API Support

Have questions about the API or need help with integration? Our developer team is happy to assist.

api@sendmesafe.com