Skip to content

POST /api/admin/suspend/v1

Note

This page was generated by extracting information from a JSON Schema data file for the API. It may be missing some information, or otherwise suggest approximate or placeholder values based on information in the schema file; this is due to limitations on how that data is extracted from the underlying Rust code and into the JSON Schema, and then again from there and into these docs.

Define a suspension for a scheduled queue

Request Body

The request body is required.

The Content-Type header must be set to application/json.

This is an object value, with the following properties:

  • campaign - optional nullable string. The campaign name to match. If omitted, any campaign will match.

  • domain - optional nullable string. The domain name to match. If omitted, any domain will match.

  • duration - optional nullable string. Specifies how long this suspension remains active.

  • expires - optional nullable string (date-time). instead of specifying the duration, you can set an explicit expiration timestamp

  • queue_names - optional array of string. If present, queue_names takes precedence over campaign, tenant, and domain and specifies the exact set of scheduled queue names to which the suspension applies.

  • reason - required string. The reason for the suspension

  • tenant - optional nullable string. The tenant name to match. If omitted, any tenant will match.

Examples

{
  "campaign": "campaign_name",
  "domain": "example.com",
  "duration": "string",
  "expires": "1990-12-31T23:59:60Z",
  "queue_names": [
    "campaign_name:tenant_name@example.com"
  ],
  "reason": "pause while working on resolving a block with the destination postmaster",
  "tenant": "tenant_name"
}

Responses

Status 200

Suspended

Content-Type: application/json

This is an object value, with the following properties:

  • id - required string (uuid). The id of the suspension. This can be used later to cancel the suspension.

Examples

{
  "id": "9511a32e-66f8-42aa-b151-ccb176df47d9"
}