๐Ÿ“„ Affidavits

Affidavits API

The Affidavits API provides read access to generated affidavits of service. Affidavits are created by Proxiant when a job is completed โ€” they cannot be created or modified via the API. eService affidavits are locked at generation.

โ„น๏ธ
Read-only resource. Affidavits are generated by Proxiant automatically when the required conditions are met. The API gives you programmatic access to list, retrieve, and download them. To be notified when an affidavit is generated, use the affidavit.generated webhook event.

List Affidavits

GET /affidavits

Returns a paginated list of affidavits for your firm, sorted by generated_at descending.

Query Parameters

ParameterTypeDescription
job_iduuidFilter to affidavits for a specific job
statusstringFilter by status: draft ยท generated ยท signed
pageintegerPage number, default 1
per_pageintegerResults per page, default 50, max 100

Affidavit Statuses

draft generated signed

Affidavits start as draft while being prepared, become generated when the PDF is ready, and move to signed once the server has electronically signed them.

Affidavit Object Fields

FieldTypeDescription
iduuidAffidavit identifier
job_iduuidParent job identifier
job_numberstringHuman-readable job number (e.g., FH-2025-04812)
statusstringdraft ยท generated ยท signed
template_namestringName of the affidavit template used
generated_atISO 8601 | nullWhen the PDF was generated
signed_atISO 8601 | nullWhen the server signed the affidavit
versionintegerVersion number, incremented on regeneration

Example Request

bash
curl "https://api.proxiant.co/v1/affidavits?status=signed&per_page=20" \
  -H "Authorization: Bearer prx_live_xxxxxxxxxxxx"

Example Response

json
{
  "data": [
    {
      "id":            "c1d2e3f4-aaaa-1111-bbbb-2222cccc3333",
      "job_id":        "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
      "job_number":    "FH-2025-04812",
      "status":        "signed",
      "template_name": "Texas Affidavit of Service โ€” Personal",
      "generated_at":  "2025-04-15T09:18:44Z",
      "signed_at":     "2025-04-15T09:22:11Z",
      "version":       1
    }
  ],
  "meta": { "page": 1, "per_page": 20, "total": 84 }
}

Get Affidavit

GET /affidavits/:id

Returns the full affidavit object, including template details and which photos and citation pages were included.

Additional Fields (single affidavit)

FieldTypeDescription
template_iduuidID of the affidavit template used
photo_ids_includedarrayIDs of attempt photos embedded in the affidavit PDF
has_citation_pagesbooleantrue if citation pages are appended (eService)
bash
curl https://api.proxiant.co/v1/affidavits/c1d2e3f4-aaaa-1111-bbbb-2222cccc3333 \
  -H "Authorization: Bearer prx_live_xxxxxxxxxxxx"
json โ€” Response
{
  "data": {
    "id":                 "c1d2e3f4-aaaa-1111-bbbb-2222cccc3333",
    "job_id":             "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
    "job_number":         "FH-2025-04812",
    "status":             "signed",
    "template_id":        "tmpl_tx_personal_v4",
    "template_name":      "Texas Affidavit of Service โ€” Personal",
    "generated_at":       "2025-04-15T09:18:44Z",
    "signed_at":          "2025-04-15T09:22:11Z",
    "version":            1,
    "photo_ids_included": [
      "ph_11112222-3333-4444-5555-666677778888",
      "ph_aaaabbbb-cccc-dddd-eeee-ffff00001111"
    ],
    "has_citation_pages": false
  }
}

Download Affidavit PDF

GET /affidavits/:id/download

Returns a redirect to a signed, temporary URL for downloading the affidavit PDF. The URL expires 15 minutes after issuance.

โš ๏ธ
Returns 302 Redirect. This endpoint redirects to a signed S3 URL. Most HTTP clients follow redirects automatically. If yours doesn't, follow the Location header. The URL expires in 15 minutes โ€” generate a fresh download URL each time rather than caching it.
๐Ÿ”’
eService affidavits are locked. Affidavits generated for electronic service are permanently locked once generated โ€” their content cannot be changed. The version field will always be 1 for eService affidavits.

Example Request

bash
# -L flag follows the redirect automatically
curl -L https://api.proxiant.co/v1/affidavits/c1d2e3f4-aaaa-1111-bbbb-2222cccc3333/download \
  -H "Authorization: Bearer prx_live_xxxxxxxxxxxx" \
  -o affidavit-FH-2025-04812.pdf

Response Flow

http
# Step 1 โ€” Proxiant API
HTTP/2 302
Location: https://storage.proxiant.co/affidavits/signed?token=eyJ...
# URL expires in 15 minutes

# Step 2 โ€” Storage redirect returns the PDF
HTTP/2 200
Content-Type: application/pdf
Content-Disposition: attachment; filename="affidavit-FH-2025-04812-v1.pdf"

Returns 404 not_found if the affidavit doesn't exist or isn't accessible to your key. Returns 409 conflict if the affidavit is in draft status and no PDF has been generated yet.