Skip to main content

Pre-announce a call

POST 

/partner/v1/businesses/{businessId}/call-authentication/pre-announce

Declare an outbound call to Hiya immediately before placing it, identifying the business by its Hiya businessId. A matching call placed within timeToLiveSeconds is authenticated and/or branded for the recipient.

This is a real-time, per-call action, called by the originator's calling infrastructure (not the management console).

Path Parameters​


    businessId string<uuid>required

    The ID of the business, assigned by Hiya. A value that can't be parsed as a UUID is rejected with 400 INVALID_FIELD; any other value that doesn't name one of your businesses returns 404.

    Example: 9b8a1c4e-2c0f-4f3d-9a1e-7b3a2b4c6d8f

Body

required

application/json

    originatingPhonestringrequired

    The calling number — also the display number (CLI). The From value in a SIP INVITE. Send it in E.164 (with leading +).

    Example: +442011111111

    terminatingPhonestringrequired

    The number being called. The To value in a SIP INVITE. Send it in E.164 (with leading +).

    Example: +442022222222

    timeToLiveSecondsintegerrequired

    Validity window, in seconds, counted from when Hiya receives the request. A matching call placed within it is authenticated and/or branded. A negative value is rejected with 400 INVALID_FIELD. A value of 0 is accepted, but the pre-announce is already expired, so no call matches it.

    Format: integer<int64>

    Possible values: >= 0

    Example: 15

    pAssertedIdentitystring

    The number from the P-Asserted-Identity SIP header, in E.164, when it differs from the originating number. Bare number only — no display name, SIP URI, or header formatting. Optional.

    Example: +442033333333

    callReasonstring

    The reason for the call, shown to the recipient only when it matches a call reason you have pre-registered and had approved with Hiya. Any other value is accepted, and the call is still authenticated and/or branded, but no reason is shown. A blank value shows no reason. The 50-character limit counts UTF-16 code units, so a character outside the Basic Multilingual Plane, such as most emoji, counts as two. Optional.

    Possible values: <= 50 characters

    Example: Appointment reminder

    callTracingInfoobject

    Opaque metadata subdocument stored with the pre-announce message. Hiya accepts arbitrary flat key-value pairs; each value must be a scalar (string, number, or boolean). Hiya stores this object as-is and does not interpret or act on its contents. The structure is shapeless — the example keys are illustrative only and are not validated. Optional.

    A request is rejected with 400 INVALID_FIELD when:

    • a value is a nested object, an array or null — 'callTracingInfo.<key>' must be a string, number or boolean;

    • the object has too many keys or is too large — 'callTracingInfo' has &lt;keys&gt; keys in <bytes&gt; bytes, over the limit of &lt;maxKeys&gt; keys in &lt;maxBytes&gt; bytes.


    property name*object

    string

Responses​

The pre-announce was stored in every region responsible for the call.

Response Body

application/json

    requestIdstringrequired

    An ID Hiya generates for this call. Quote it when contacting support.

    Example: 5f0b2c8e-6a1d-4c3b-9e7f-2a4d6c8e0b13

    timestampstringrequired

    When Hiya handled the request.

    Format: string<date-time>

    Possible values: Value must match regular expression ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,9})?Z$

    Example: 2026-05-28T14:32:10.264Z

    expiresAtstringrequired

    When the validity window closes (accept time plus timeToLiveSeconds).

    Format: string<date-time>

    Possible values: Value must match regular expression ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,9})?Z$

    Example: 2026-05-28T14:32:25.809Z

    regionalResponsesobject[]required

    One entry per AWS region responsible for the call. The country of terminatingPhone can map to more than one region.

  • Array [


  • regionstringrequired

    The region, as an AWS region code (for example us-east-1, eu-west-2, ca-central-1). Not an ISO country code.

    Example: us-east-1

    statusintegerrequired

    Whether the pre-announce was stored in the region:

    | status | meaning | |---|---| | 200 | The pre-announce was stored in the region. | | 503 | The pre-announce couldn't be stored in the region. |

    Format: integer<int32>
    Example: 200
  • ]

Example from Schema​

{
"requestId": "5f0b2c8e-6a1d-4c3b-9e7f-2a4d6c8e0b13",
"timestamp": "2026-05-28T14:32:10.264Z",
"expiresAt": "2026-05-28T14:32:25.809Z",
"regionalResponses": [
{
"region": "us-east-1",
"status": 200
}
]
}