Skip to main content
POST
Create mapping schema

Restrictions

Usage

  • Requires the Pro plan or higher; otherwise NoLicense.
  • schema_name must be unique among the account’s non-deleted schemas.
  • source_labels (1–3) form the lookup key; result_labels (1–10) are written to alerts on a match. Label names must match ^[a-zA-Z_][a-zA-Z0-9_]*$, be unique within each list, and not appear in both lists. Neither list can be changed later.
  • An account holds at most 20 non-deleted mapping schemas by default (some accounts have a higher limit); exceeding it returns InvalidParameter.
  • Concurrent create calls in one account return RequestTooFrequently.
  • Every call is recorded in the account audit log. Don’t put secrets in request fields.

Authorizations

app_key
string
query
required

APP Key created in the Flashduty console under My → APP Key. Send it as the app_key query parameter or in the Fd-App-Key request header. Its effective access is the intersection of the key's permission scope and the creator's current role permissions. Keep it secret.

Body

application/json
schema_name
string
required

Schema name, unique among the account's non-deleted schemas (max 39 characters).

Maximum string length: 39
source_labels
string[]
required

Lookup key label names (1–3). Each must match ^[a-zA-Z_][a-zA-Z0-9_]*$; entries must be unique and must not overlap with result_labels.

Required array length: 1 - 3 elements
Pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$
result_labels
string[]
required

Output label names written on a match (1–10). Each must match ^[a-zA-Z_][a-zA-Z0-9_]*$; entries must be unique and must not overlap with source_labels.

Required array length: 1 - 10 elements
Pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$
description
string

Optional description (max 500 chars).

Maximum string length: 500
team_id
integer<int64>

Owning team ID from POST /team/list. 0 or omitted means no team; a non-zero ID must be an existing team.

Response

Success

Success response envelope. On every 2xx response, request_id identifies the call (also mirrored in the Flashcat-Request-Id header) and data holds the endpoint-specific payload. Failure responses use a different shape — see ErrorResponse.

request_id
string
required

Unique ID for this request. Mirrored in the Flashcat-Request-Id response header. Include it when reporting issues.

Example:

"01HK8XQE3Z7JM2NTFQ5YJ8P9R4"

data
object

Operation-specific payload, documented in each operation's 200 response. Operations without a payload return {} or omit data entirely.