Leypal Corp Docs

API Overview

Base URL, authentication, rate limiting, and HTTP status codes

API Overview

The Leypal REST API lets you integrate electronic signatures and identity verification into your own systems. This page covers the foundational knowledge you need before making your first request: where to send requests, how to authenticate, what limits apply, and how to interpret responses.


Base URL

All API requests go to a single production endpoint:

https://api.leypal.dev
  • There is no separate staging or sandbox URL. Use API keys scoped to a test organization for development and QA.
  • All requests must use HTTPS. Plain HTTP is rejected.
  • All endpoints are versioned under /api/v1.

Full example:

https://api.leypal.dev/api/v1/signatures

Authentication

Every request requires an API key passed as a Bearer token in the Authorization header.

Authorization: Bearer YOUR_API_KEY

Example

curl https://api.leypal.dev/api/v1/signatures \
  -H "Authorization: Bearer YOUR_API_KEY"

Key Facts

  • API keys are scoped to an organization. Each request is authenticated as that organization.
  • Keys have no built-in expiration but can be revoked at any time from the dashboard.
  • Never expose your API key in client-side code or public repositories.

For key creation, rotation, and revocation steps, see Generating API Keys.


Rate Limiting

TierLimit
Free100 requests / minute per API key
EnterpriseCustom — contact sales

When a request exceeds the limit, the API returns HTTP 429 Too Many Requests.

Rate Limit Headers

Every response includes these headers so you can track consumption:

HeaderDescription
X-RateLimit-LimitMaximum requests allowed in the current window
X-RateLimit-RemainingRequests remaining before the limit resets
X-RateLimit-ResetUnix timestamp (seconds) when the window resets

Handling 429 Responses

Read X-RateLimit-Reset and wait until that timestamp before retrying. For bulk operations, implement exponential backoff with jitter to avoid thundering-herd retries.


HTTP Status Codes

CodeNameWhen It Occurs
200OKRequest succeeded; response body contains the result
201CreatedResource created successfully; response body contains the new resource
204No ContentRequest succeeded; no response body (e.g., DELETE operations)
400Bad RequestInvalid or missing request parameters; fix the request before retrying
401UnauthorizedMissing or invalid API key
403ForbiddenAuthenticated, but not authorized to access this resource
404Not FoundThe requested resource does not exist
429Too Many RequestsRate limit exceeded; wait for X-RateLimit-Reset before retrying
500Internal Server ErrorUnexpected server error; safe to retry with exponential backoff

Check the HTTP status code first. Use the error field in the response body for programmatic branching.


Error Response Format

All error responses return JSON with a consistent structure:

{
  "statusCode": 400,
  "message": "Invalid signer email",
  "error": "ValidationError"
}
FieldTypeDescription
statusCodenumberHTTP status code (mirrors the response status)
messagestringHuman-readable description of the error
errorstringMachine-readable error type for programmatic handling

Common Error Types

error ValueMeaning
ValidationErrorRequest payload failed validation
UnauthorizedExceptionAPI key missing or invalid
ForbiddenExceptionInsufficient permissions
NotFoundExceptionResource not found
TooManyRequestsExceptionRate limit exceeded

SDK Recommendations

Official SDKs are on the roadmap but not yet released.

In the meantime, use your language's native HTTP client:

LanguageRecommended Client
JavaScript / TypeScriptfetch (native) or axios
Pythonrequests or httpx
PHPGuzzleHttp
Rubynet/http or faraday
Gonet/http (standard library)
Java / KotlinOkHttp or Retrofit

All code examples in this documentation use curl for clarity. Translating to any HTTP client is straightforward.


API Endpoints by Feature

FeatureWhat You Can DoReference
Electronic SignaturesCreate signature requests, add signers, send for signing, track status, cancelElectronic Signature Endpoints
Identity VerificationInitiate verification sessions, poll status, retrieve results and evidenceIdentity Verification Endpoints
API KeysGenerate, list, and revoke organization API keysAPI Authentication

Next Steps

On this page