Skip to main content
GET
/
api
/
signing
/
request
/
:id
/
status
Get Signature Status
curl --request GET \
  --url https://api.example.com/api/signing/request/:id/status
{
  "status": "<string>",
  "signature": "<string>",
  "resolvedAt": "<string>",
  "error": "<string>"
}

Path Parameters

id
string
required
The signature request ID returned from the create request endpoint

Query Parameters

clientId
string
required
Your OAuth app’s client ID. Used to verify you own this request.

Response

status
string
The current status of the signature request. One of:
  • pending - Waiting for user to sign
  • signed - User has signed the payload
  • denied - User denied the signature request
  • expired - Request has expired
signature
string
The cryptographic signature (only present when status is signed)
resolvedAt
string
ISO 8601 timestamp when the request was resolved (signed, denied, or expired)

Code Example

import { getSignatureStatus } from "ave-sdk";

const config = {
  clientId: "your_client_id",
  issuer: "https://aveid.net", // optional
};

// Poll for signature status
const status = await getSignatureStatus(config, "request-id-here");

if (status.status === "signed") {
  console.log("Signature received:", status.signature);
  console.log("Signed at:", status.resolvedAt);
} else if (status.status === "denied") {
  console.log("User denied the request");
} else if (status.status === "expired") {
  console.log("Request expired");
} else {
  console.log("Still pending...");
}

Polling Strategy

This endpoint is designed for polling. Recommended approach:
import { getSignatureStatus } from "ave-sdk";

const config = {
  clientId: "your_client_id",
};

async function waitForSignature(requestId: string, timeoutMs = 300000) {
  const startTime = Date.now();
  
  while (Date.now() - startTime < timeoutMs) {
    const result = await getSignatureStatus(config, requestId);
    
    if (result.status !== "pending") {
      return result;
    }
    
    // Wait 2 seconds before next poll
    await new Promise(resolve => setTimeout(resolve, 2000));
  }
  
  throw new Error("Timeout waiting for signature");
}

const result = await waitForSignature("request-id-here");
console.log("Final status:", result.status);

Automatic Expiration

If a request’s expiration time has passed and the status is still pending, this endpoint will automatically update the status to expired and return that in the response.

Error Responses

error
string
Error message describing what went wrong

Common Errors

  • 404 Not Found - Request ID not found
  • 403 Forbidden - The clientId does not match the app that created this request

Build docs developers (and LLMs) love