API
← Docs
API Reference
REST API Alphasign memungkinkan Anda mengintegrasikan tanda tangan digital ke sistem Anda — buat dokumen, kirim undangan TTD, dan verifikasi keaslian secara programmatic.
Base URL
https://alphasign.pastibisa.app/api/v1
Format
JSON (application/json)
Auth
Bearer Token
Authentication
Semua request (kecuali verification) memerlukan API token di header Authorization.
# Include in every request Authorization: Bearer your_api_token_here
Mendapatkan API Token
- Login ke Settings → API
- Klik Generate Key
- Beri nama (misal: "Backend ERP")
- Salin token — hanya ditampilkan sekali
Penting: Jangan expose token di frontend/client-side code. Token hanya untuk server-to-server communication.
Rate Limits
Rate limit per token berdasarkan paket Anda.
| Paket | Per Menit | Per Hari | Per Bulan |
|---|---|---|---|
| Lontar | 60 | 1,000 | 1,000 |
| Prasasti | 120 | 5,000 | 5,000 |
| Piagam / Keraton | 300 | 10,000 | 10,000 |
| Nusantara | 600 | 20,000 | 20,000 |
Response Headers
X-RateLimit-Limit: 300 X-RateLimit-Remaining: 298 Retry-After: 45 # only on 429
Errors
{
"success": false,
"error": "Human-readable message",
"errors": { "field": ["validation message"] }
}| Code | Meaning |
|---|---|
| 200 | Success |
| 201 | Created |
| 401 | Invalid/missing token |
| 403 | Forbidden |
| 404 | Not found |
| 422 | Validation failed |
| 429 | Rate limited |
Account
/meGet authenticated user info and tenant.
curl -H "Authorization: Bearer YOUR_TOKEN" \
https://alphasign.pastibisa.app/api/v1/meResponse 200
{
"success": true,
"data": {
"id": "uuid",
"name": "John Doe",
"email": "john@example.com",
"role": "owner",
"tenant": { "id": "uuid", "name": "PT Contoh", "plan": "Piagam" }
}
}/me/quotaGet current quota usage (signatures, documents, storage, API requests).
curl -H "Authorization: Bearer YOUR_TOKEN" \
https://alphasign.pastibisa.app/api/v1/me/quotaResponse 200
{
"success": true,
"data": {
"signatures": { "used": 120, "limit": 500 },
"documents": { "used": 85, "limit": 500 },
"storage_bytes": { "used": 5368709120, "limit": 26843545600 },
"api_requests": { "used": 450, "limit": 10000 }
}
}Documents
Kelola dokumen: upload, kirim untuk ditandatangani, dan download hasilnya.
/documentsList all your documents (paginated).
Parameters
| status | string, optional | Filter: draft, pending, completed |
| per_page | integer, optional | 1-100, default 20 |
curl -H "Authorization: Bearer YOUR_TOKEN" \ "https://alphasign.pastibisa.app/api/v1/documents?status=pending&per_page=10"
/documentsUpload PDF dan buat dokumen baru. Opsional: tambahkan penandatangan.
Body (multipart/form-data)
| title * | string | Judul dokumen |
| file * | file (PDF) | Max 20MB |
| signers[] | array | Each: {name, email} |
curl -X POST \ -H "Authorization: Bearer YOUR_TOKEN" \ -F "title=Kontrak Kerja" \ -F "file=@document.pdf" \ -F "signers[0][name]=John Doe" \ -F "signers[0][email]=john@example.com" \ https://alphasign.pastibisa.app/api/v1/documents
/documents/{'{id}'}Get document detail with signers and status.
curl -H "Authorization: Bearer YOUR_TOKEN" \ https://alphasign.pastibisa.app/api/v1/documents/uuid-here
/documents/{'{id}'}/sendKirim undangan tanda tangan ke semua signers. Mengubah status dari draft → pending.
curl -X POST -H "Authorization: Bearer YOUR_TOKEN" \ https://alphasign.pastibisa.app/api/v1/documents/uuid/send
/documents/{'{id}'}/downloadDownload signed PDF file.
curl -H "Authorization: Bearer YOUR_TOKEN" \ -o signed.pdf \ https://alphasign.pastibisa.app/api/v1/documents/uuid/download
/documents/{'{id}'}Hapus dokumen draft. Dokumen pending/completed tidak bisa dihapus.
curl -X DELETE -H "Authorization: Bearer YOUR_TOKEN" \ https://alphasign.pastibisa.app/api/v1/documents/uuid
Contacts
/contactsList all contacts in your organization.
curl -H "Authorization: Bearer YOUR_TOKEN" \
https://alphasign.pastibisa.app/api/v1/contacts/contactsCreate a new contact.
Body (JSON)
| name * | string | Nama kontak |
| email * | string | Alamat email |
| phone | string | Nomor telepon |
| company | string | Nama perusahaan |
curl -X POST \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{"name":"Jane Smith","email":"jane@co.id","company":"PT ABC"}' \ https://alphasign.pastibisa.app/api/v1/contacts
Verification
Endpoint ini tidak memerlukan authentication.
/verify/{'{hash}'}Verifikasi keaslian dokumen berdasarkan hash. Bisa dipanggil tanpa token.
curl https://alphasign.pastibisa.app/api/v1/verify/abc123def456Response 200
{
"success": true,
"data": {
"valid": true,
"document": { "title": "Kontrak Kerja", "status": "completed" },
"signers": [{ "name": "John", "signed_at": "2026-06-15T10:00:00Z" }]
}
}Code Examples
PHP
$response = Http::withToken('TOKEN') ->get('https://alphasign.pastibisa.app/api/v1/me'); $data = $response->json();
Python
import requests r = requests.get( "https://alphasign.pastibisa.app/api/v1/me", headers={"Authorization": "Bearer TOKEN"} )
JavaScript
const res = await fetch( `https://alphasign.pastibisa.app/api/v1/me`, { headers: { Authorization: `Bearer TOKEN` }} );