STIR/SHAKEN API

The STIR/SHAKEN API (STI-AS) is a web service that signs a call and returns its STIR/SHAKEN attestation level and identity token. Use the result for call routing and verification.

This API requires an API key. Find your key on the Organization settings page of the Smart Carrier dashboard. If you cannot find it, contact support@smartcarrier.io.

To review past requests, see the STIR/SHAKEN log.

Web service information

FieldValue
Endpointhttps://api.smartcarrier.io/v2/sti-as?
MethodGET
ParametersToNumber, FromNumber
Headerx-api-key (get your API key)
Examplehttps://api.smartcarrier.io/v2/sti-as?ToNumber=12025550143&FromNumber=8005550199

Request parameters

ParameterTypeDescription
ToNumberstringThe destination telephone number for the call.
FromNumberstringThe originating telephone number (calling party or ANI).

Sample response

{
  "RequestGuid": "11111111-2222-3333-4444-555555555555",
  "AccountGuid": "12345678-1234-1234-1234-123456789012",
  "APIKey": "YOUR_API_KEY",
  "FromNumber": "18005550199",
  "ToNumber": "12025550143",
  "Prefix": "",
  "LERG_ToNumber": {
    "RequestGuid": "66666666-7777-8888-9999-000000000000",
    "RoutingNumber": "12025550000",
    "NPA": "202",
    "NXX": "555",
    "Block": "1",
    "USState": "DC",
    "Company": "EXAMPLE TELECOM, INC.",
    "OCN": "1234",
    "RateCenter": "EXAMPLE",
    "CLLI": "EXMPLDCXX01",
    "Assigned_Date": null,
    "PrefixType": "CLEC",
    "SwitchName": "",
    "SwitchType": "",
    "LATA": "999",
    "Country": "US",
    "TollFree": false,
    "IsValid": true,
    "RequestedAt": "2025-01-01T12:00:01.0000000Z",
    "ElapsedMilliseconds": 0
  },
  "NationalDNCStatus": "0",
  "AttestationLevel": "B",
  "STI_Token": "",
  "Identity": "<header>.<payload>.<signature>;info=<https://certificates.smartcarrier.io/CERTIFICATE_ID.cer>;alg=ES256;ppt=shaken",
  "RequestingIP": "203.0.113.10",
  "ProcessingTime": 574,
  "ApplicationVersion": "18",
  "DateTimeRequested": "2025-01-01T12:00:00.0000000Z"
}

The sample shortens Identity. A real response holds the full signed token in each of the three parts.

What do these values mean?

FieldDescription
RequestGuidA unique identifier assigned to this request.
AccountGuidThe account associated with this request.
APIKeyThe API key used for the request.
FromNumberThe originating telephone number (calling party or ANI).
ToNumberThe destination telephone number.
PrefixThe prefix (trunk) associated with the request. Empty when none applies.
LERG_ToNumberThe Local Exchange Routing Guide record for the destination number. It has the same fields as the LERG object in the Enhanced Insights API.
NationalDNCStatusThe National Do Not Call status for the destination number. 0 means the number was not flagged.
AttestationLevelThe attestation level assigned to the call.
  • A: Full attestation.
  • B: Partial attestation.
  • C: Gateway attestation.
STI_TokenThe identity token as a standalone value. Empty when the token is returned in Identity.
IdentityThe complete SIP Identity header value: the signed token (PASSporT), then the info, alg, and ppt parameters. Place it in the SIP Identity header as is.
RequestingIPThe IP which initiated the request.
ProcessingTimeTotal time to complete the request, in milliseconds.
ApplicationVersionThe version of the service that handled the request.
DateTimeRequestedWhen the request was received (UTC).

Inside the identity token

The token in Identity has three parts, separated by periods: header, payload, and signature. The header and payload are Base64URL-encoded JSON.

Decoded header:

{
  "alg": "ES256",
  "typ": "passport",
  "ppt": "shaken",
  "x5u": "https://certificates.smartcarrier.io/CERTIFICATE_ID.cer"
}

Decoded payload:

{
  "attest": "B",
  "dest": { "tn": ["12025550143"] },
  "iat": 1735732800,
  "orig": { "tn": "18005550199" },
  "origid": "12345678-1234-1234-1234-123456789012"
}
FieldDescription
x5uThe URL of the public certificate that verifies the signature.
attestThe attestation level (A, B, or C).
dest.tnThe destination telephone number.
orig.tnThe originating telephone number.
iatWhen the token was issued, in seconds since 1970-01-01 (UTC).
origidAn identifier for the originator of the call. It matches your AccountGuid.