YepShield documentation

Screening flow and the hook contract

The YepShield screen hook: request and answer, the actions a gateway performs, downgrade rules, idempotency and what happens when the screen cannot answer.

YepShield documentation

YepShield documentation

  1. Overview
  2. Screening flow and the hook contract
  3. Sender registry
  4. Rules for lists, velocity, campaigns and content
  5. Policy matrix and modes
  6. Evidence, audit chain and appeals
  7. Regulator reporting and SUTEL RCS-151-2026
  8. Deployment and integration

Other products

The gateway calls YepShield once per message, synchronously, and performs the action in the answer. YepShield is always the HTTP server on the message path. The gateway never has to be reachable from YepShield.

The call

POST /shield/v1/screen carries a JSON body and a bearer token. The token identifies the tenant, which is the operator. Calls are idempotent on the message ID, so a retry within a short window returns the stored answer.

Outbound messages are screened before the gateway accepts them from the customer. Inbound messages are screened before delivery.

Request

The request has three parts: who is asking, the message, and where it came from.

{
  "gateway": {"name": "yepmsg", "node": "gw-1", "contract": "1.3",
              "can": ["rewrite", "reject", "deadend", "throttle", "hold"]},
  "sms": {
    "sms_type": 2,
    "id": "11111111-2222-4333-8444-555566667777",
    "sender": "ExampleBank", "receiver": "447700900123",
    "msgdata": "Your account is locked. Verify at example.com/verify",
    "coding": 0,
    "msgdata_b64": "...", "udhdata_b64": ""
  },
  "ingress": {"kind": "esme", "id": "customer-1", "class": "a2p",
              "country": "GB", "international": false, "authorised": true}
}
PartContent
gatewayName, node, contract version and the actions the gateway implements
smsThe message exactly as the gateway sends it to its routing hook, plus PDU fields where known
ingressWhat the gateway knows about the source: customer bind, carrier connector, peer or API; its class hint, country, whether it is an international route, whether it is under a formal A2P agreement, agreed identification attributes and any integrity problem the gateway saw

The ingress comes from the gateway's provisioning. YepShield decides the final traffic class.

Answer

{
  "shield": {
    "id": "shd_01JCA7Q9ZK2M8E4R6T0VXWYZ3N",
    "verdict": "block", "action": "deadend", "mode": "enforce",
    "score": 0.97, "category": "smishing", "class": "a2p", "traceable": true,
    "reasons": ["brand.lookalike", "content.phrase"],
    "policy_revision": "p42"
  }
}

The gateway stamps id on the message and its record and passes the answer to its routing hook. It acts on action only. The verdict, score, category and reasons are informational and recorded.

Actions

ActionOutboundInbound
allowRoute as usualDeliver as usual
labelApply the rewrite to the body or sender, then routeApply, then deliver
throttleAnswer the customer with a throttling status and no record, so they retryNot used
holdAccept, park and screen again after a delay, until the answer changes or a maximum time passes, then apply a fallbackNot used
rejectAnswer the customer with the given SMPP status. Nothing is routed or billedDrop, with a record
deadendAccept, let routing run so the message can be billed, never deliver. The customer receives a normal acceptance and a receipt according to their maskDrop, with a record
dropNot usedDiscard, with a record

Dead-end is the preferred answer to a malicious sender, who learns nothing from it. A gateway that cannot rewrite, hold or dead-end declares that in the request, and YepShield downgrades the action to the nearest one the gateway can perform and records the downgrade on the decision.

Mode and action

The mode field is the mode the deciding category ran in. In observe mode the action is allow whatever the verdict, and the decision is still recorded. See Policy matrix and modes.

The pipeline

Each decision keeps the ordered steps it went through, with an outcome and a one-line detail for each. The console and the API show the same steps.

  1. Decode reads GSM 03.38, UCS-2 and binary bodies, and the user data header: concatenation, port addressing, WAP Push and configuration messages.
  2. Normalise folds look-alike characters, removes zero-width and bidirectional controls and rejoins obfuscated links, and keeps an obfuscation measure as a feature.
  3. Extract finds links, numbers, amounts and brand mentions.
  4. Origin works out the traffic class, the sender type and whether the message is traceable.
  5. Registry resolves the sender against the sender registry.
  6. Lists and phrases check the message against lists and phrase lists.
  7. Velocity applies rate and campaign rules.
  8. Decide applies the policy matrix and mode.
  9. Record writes the decision and any evidence.

When the screen cannot answer

The gateway's deadline bounds the call. For YepMsg, one attempt is made and the message either passes as unscreened or is refused, depending on the failure mode configured per route. An unscreened message is stamped as such on its record, so reports show what went past unscreened and when. A rate limit answer from YepShield is treated the same way.

Other endpoints

EndpointPurpose
DecisionsRead one decision with its steps, or a sender's or receiver's recent decisions. Never returns a body
Subscriber lookupFor care centres: messages stopped or labelled towards a number in a period. Never returns a body, and each lookup is audited
AppealsOpen and follow a case for a sender or a subscriber
Registry export and importThe register of authorised senders as JSON Lines
Intelligence export and importIndicators as JSON Lines, from named sources
Health and metricsLiveness and Prometheus

Authentication is a bearer token per gateway, and mutual TLS is optional on the hook. The contract specification and a gateway stub for testing are provided on request. Get in touch.

Contact sales

Questions about YepShield?

Ask an engineer about your deployment, or request the full interface specifications and a demonstration of YepShield on a traffic profile like yours.

  1. We reply within one business day to arrange a time.
  2. A scoping call about your traffic, network and billing model.
  3. A demonstration on a traffic profile like yours, and a lab deployment if your engineers want one.

Prefer email? hello@yeptelcosoft.com

What would you like?
Interested in

We reply within one business day. We use your details only to respond to your request. Privacy notice