Getting started
Three requests take you from credentials to data: get a token, find the user you act on behalf of, then call an endpoint.
Before you begin
You need a client ID and client secret, issued by SignersChoice for the environment you are integrating against. Credentials are environment-specific — a DEV client will not authenticate against production.
Your credentials are also provisioned with a set of scopes that determine which
endpoints you may call. For the calls below you need Users.Search and Files.List.
Step 1 — Get an access token
curl -X POST 'https://publicapi.dev.signerschoice.com/v1/auth/token' \
-H 'Content-Type: application/json' \
-d '{
"client_id": "your-client-id",
"client_secret": "your-client-secret"
}'
{
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
"token_type": "Bearer",
"expires_in": 3600,
"scope": "Users.Search Files.List"
}
The token is valid for 60 minutes. Cache it rather than requesting one per call — repeated failures count toward a lockout.
Step 2 — Find your sender
Every resource call is made on behalf of a SignersChoice user of your organization, sent
in the X-Sender-Id header. Look the user up by name or email:
curl 'https://publicapi.dev.signerschoice.com/v1/users?search=jane' \
-H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIs...' \
-H 'X-Sender-Id: <a known user id>'
{
"users": [
{
"userId": "7d3c1a52-9e4b-4f0a-b2d6-1c8e5f7a9b30",
"firstName": "Jane",
"lastName": "Doe",
"email": "jane.doe@acmetitle.example",
"status": "Active"
}
],
"total": 1
}
Your integration usually stores the sender ID once (for example per user of your own system) rather than searching on every call.
Step 3 — Call an endpoint
curl 'https://publicapi.dev.signerschoice.com/v1/files?page=1&pageSize=20' \
-H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIs...' \
-H 'X-Sender-Id: 7d3c1a52-9e4b-4f0a-b2d6-1c8e5f7a9b30'
The response lists the files that sender can see — every file of the organization for an org admin, otherwise the files they created and the files shared with their teams, exactly as in the SignersChoice web portal.
Note what you did not send: there is no organization parameter. The API reads
organization_id from your token, so you can only ever see your own organization's data.
Response envelope
Successful responses wrap their payload in a consistent envelope:
| Field | Type | Meaning |
|---|---|---|
success | boolean | Whether the operation succeeded |
message | string | Optional detail. Omitted when there is nothing to add |
Endpoint-specific fields sit alongside these. Errors always use the error envelope.
A complete example
C# — token caching and a single retry on 401
public sealed class SignersChoiceClient
{
private readonly HttpClient _http;
private readonly string _clientId;
private readonly string _clientSecret;
private string? _token;
private DateTimeOffset _expiresAt = DateTimeOffset.MinValue;
public SignersChoiceClient(HttpClient http, string clientId, string clientSecret)
{
_http = http;
_clientId = clientId;
_clientSecret = clientSecret;
}
private async Task<string> GetTokenAsync(CancellationToken ct)
{
// Refresh at 80% of lifetime so clock skew cannot serve an expired token.
if (_token is not null && DateTimeOffset.UtcNow < _expiresAt)
{
return _token;
}
var response = await _http.PostAsJsonAsync(
"/v1/auth/token",
new { client_id = _clientId, client_secret = _clientSecret },
ct);
response.EnsureSuccessStatusCode();
var token = await response.Content.ReadFromJsonAsync<TokenResponse>(ct)
?? throw new InvalidOperationException("Empty token response.");
_token = token.AccessToken;
_expiresAt = DateTimeOffset.UtcNow.AddSeconds(token.ExpiresIn * 0.8);
return _token;
}
public async Task<string> ListFilesAsync(Guid senderId, CancellationToken ct = default)
{
var result = await SendAsync(ct);
// A cached token can expire mid-flight. Retry exactly once: more than
// that turns a genuinely bad credential into a request storm.
if (result.StatusCode == HttpStatusCode.Unauthorized)
{
_token = null;
result = await SendAsync(ct);
}
result.EnsureSuccessStatusCode();
return await result.Content.ReadAsStringAsync(ct);
async Task<HttpResponseMessage> SendAsync(CancellationToken token)
{
using var request = new HttpRequestMessage(HttpMethod.Get, "/v1/files");
request.Headers.Authorization =
new AuthenticationHeaderValue("Bearer", await GetTokenAsync(token));
request.Headers.Add("X-Sender-Id", senderId.ToString());
return await _http.SendAsync(request, token);
}
}
private sealed record TokenResponse(
[property: JsonPropertyName("access_token")] string AccessToken,
[property: JsonPropertyName("expires_in")] int ExpiresIn);
}
Node.js — the same pattern
class SignersChoiceClient {
#token = null;
#expiresAt = 0;
constructor(baseUrl, clientId, clientSecret) {
this.baseUrl = baseUrl;
this.clientId = clientId;
this.clientSecret = clientSecret;
}
async #getToken() {
if (this.#token && Date.now() < this.#expiresAt) return this.#token;
const res = await fetch(`${this.baseUrl}/v1/auth/token`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
client_id: this.clientId,
client_secret: this.clientSecret,
}),
});
if (!res.ok) throw new Error(`Authentication failed: ${res.status}`);
const { access_token, expires_in } = await res.json();
this.#token = access_token;
// Refresh at 80% of lifetime.
this.#expiresAt = Date.now() + expires_in * 800;
return this.#token;
}
async listFiles(senderId) {
const call = async () =>
fetch(`${this.baseUrl}/v1/files`, {
headers: {
Authorization: `Bearer ${await this.#getToken()}`,
'X-Sender-Id': senderId,
},
});
let res = await call();
if (res.status === 401) {
this.#token = null; // Expired mid-flight — retry once.
res = await call();
}
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
return res.json();
}
}
Next steps
- Authentication — lifetime, lockout and the sender header.
- Scopes — why a valid token can still be refused.
- Errors — the error envelope and how to handle each status.
- Environments — base URLs for DEV, QA, UAT and production.
- API reference — every endpoint, with a console to try it.