{
  "openapi": "3.1.0",
  "jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
  "info": {
    "title": "levios public API",
    "version": "1"
  },
  "servers": [
    {
      "url": "https://levios.app"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/api/v1/accounts": {
      "get": {
        "tags": [
          "account"
        ],
        "operationId": "accounts.list",
        "summary": "List Instagram accounts",
        "description": "Returns the Instagram accounts this API key can access.",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-levios-semantic-id": "api.v1.accounts.list",
        "x-levios-required-scope": null,
        "x-levios-account-scope": "none",
        "x-levios-effect": "read",
        "x-levios-idempotency": "safe",
        "x-levios-rate-limit": {
          "descriptor_id": "accounts.list",
          "cost_class": "read",
          "tenant_scope": "account_catalog"
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "ig_username": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9._]+$",
                            "minLength": 1,
                            "maxLength": 30
                          },
                          "public_id": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9]+$",
                            "minLength": 12,
                            "maxLength": 16
                          },
                          "status": {
                            "description": "Values: `active`: the Instagram access token is ready to use; `token_expired`: the Instagram access token must be renewed.",
                            "type": "string",
                            "enum": [
                              "active",
                              "token_expired"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "ig_username",
                          "public_id",
                          "status"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 50
                    },
                    "next_cursor": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 1024
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "items",
                    "next_cursor"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_content_length"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "Invalid Content-Length."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_json"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request body is not valid JSON."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_request_url"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request URL is invalid."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_utf8"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request body is not valid UTF-8."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              },
              "WWW-Authenticate": {
                "description": "API key Bearer challenge.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "Bearer"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_unauthorized"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Authentication required."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_account_not_granted"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_forbidden"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_scope_denied"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_body_too_large"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The JSON request body exceeds 1 MiB."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_json_too_deep"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The JSON request body exceeds maximum depth."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "415": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_unsupported_media_type"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Content-Type must be application/json."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_cursor"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The projection cursor is invalid for this resource."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_limit"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The page limit must be an integer between 1 and 50."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_validation_error"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "details": {
                              "type": "object",
                              "properties": {
                                "issues": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 64
                                      },
                                      "path": {
                                        "type": "array",
                                        "items": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "maxItems": 16
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "path"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "maxItems": 32
                                }
                              },
                              "required": [
                                "issues"
                              ],
                              "additionalProperties": false
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request does not match the declared schema."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "rate_limited"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Rate limit exceeded."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_internal_error"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request could not be completed."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_projection"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The projected list contains an invalid item key."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_projection_too_large"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The first projected item exceeds the result byte limit."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_account_resolution_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The reachable account set could not be read."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "rate_limiter_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "Rate limiter unavailable."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/accounts/{accountId}/media": {
      "get": {
        "tags": [
          "account_media"
        ],
        "operationId": "accounts.media.list",
        "summary": "List Instagram media",
        "description": "Returns a cursor-paginated list of posts or stories for one Instagram account.",
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "surface",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "posts",
                "stories"
              ]
            }
          }
        ],
        "x-levios-semantic-id": "api.v1.accounts.media.list",
        "x-levios-required-scope": "automations:read",
        "x-levios-account-scope": "required",
        "x-levios-effect": "read",
        "x-levios-idempotency": "safe",
        "x-levios-rate-limit": {
          "descriptor_id": "accounts.media.list",
          "cost_class": "read",
          "tenant_scope": "selected_account"
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicInstagramMediaPageV1"
                }
              }
            }
          },
          "400": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_content_length"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "Invalid Content-Length."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_json"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request body is not valid JSON."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_request_url"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request URL is invalid."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_utf8"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request body is not valid UTF-8."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              },
              "WWW-Authenticate": {
                "description": "API key Bearer challenge.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "Bearer"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_unauthorized"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Authentication required."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_account_not_granted"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_forbidden"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_scope_denied"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_automation_media_not_found"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "The referenced Instagram media was not found."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "413": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_body_too_large"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The JSON request body exceeds 1 MiB."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_json_too_deep"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The JSON request body exceeds maximum depth."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "415": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_unsupported_media_type"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Content-Type must be application/json."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_automation_invalid_configuration"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "Configuration fields do not match the public automation contract."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_cursor"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The projection cursor is invalid for this resource."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_limit"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The page limit must be an integer between 1 and 50."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_validation_error"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "details": {
                              "type": "object",
                              "properties": {
                                "issues": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 64
                                      },
                                      "path": {
                                        "type": "array",
                                        "items": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "maxItems": 16
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "path"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "maxItems": 32
                                }
                              },
                              "required": [
                                "issues"
                              ],
                              "additionalProperties": false
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request does not match the declared schema."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "rate_limited"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Rate limit exceeded."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_internal_error"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "The request could not be completed."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_account_resolution_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The reachable account set could not be read."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_instagram_media_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "Instagram media is temporarily unavailable."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "rate_limiter_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "Rate limiter unavailable."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/automations": {
      "get": {
        "tags": [
          "automation"
        ],
        "operationId": "automations.list",
        "summary": "List automations",
        "description": "Returns a cursor-paginated list of automations for one Instagram account.",
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-levios-semantic-id": "api.v1.automations.list",
        "x-levios-required-scope": "automations:read",
        "x-levios-account-scope": "required",
        "x-levios-effect": "read",
        "x-levios-idempotency": "safe",
        "x-levios-rate-limit": {
          "descriptor_id": "automations.list",
          "cost_class": "read",
          "tenant_scope": "selected_account"
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicAutomationListResponseV1"
                }
              }
            }
          },
          "400": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_content_length"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "Invalid Content-Length."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_json"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request body is not valid JSON."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_request_url"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request URL is invalid."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_utf8"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request body is not valid UTF-8."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              },
              "WWW-Authenticate": {
                "description": "API key Bearer challenge.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "Bearer"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_unauthorized"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Authentication required."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_account_not_granted"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_forbidden"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_scope_denied"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_body_too_large"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The JSON request body exceeds 1 MiB."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_json_too_deep"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The JSON request body exceeds maximum depth."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "415": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_unsupported_media_type"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Content-Type must be application/json."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_cursor"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The projection cursor is invalid for this resource."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_limit"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The page limit must be an integer between 1 and 50."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_validation_error"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "details": {
                              "type": "object",
                              "properties": {
                                "issues": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 64
                                      },
                                      "path": {
                                        "type": "array",
                                        "items": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "maxItems": 16
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "path"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "maxItems": 32
                                }
                              },
                              "required": [
                                "issues"
                              ],
                              "additionalProperties": false
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request does not match the declared schema."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "rate_limited"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Rate limit exceeded."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_internal_error"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request could not be completed."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_projection"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The projected list contains an invalid item key."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_projection_too_large"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The first projected item exceeds the result byte limit."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_account_resolution_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The reachable account set could not be read."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_automation_authoring_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The automation could not be authored."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "rate_limiter_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "Rate limiter unavailable."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "automation"
        ],
        "operationId": "automations.create",
        "summary": "Create an automation",
        "description": "Creates a completely configured draft or live automation for one Instagram account.",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicAutomationCreateV1"
              }
            }
          }
        },
        "x-levios-semantic-id": "api.v1.automations.create",
        "x-levios-required-scope": "automations:write",
        "x-levios-account-scope": "required",
        "x-levios-effect": "write",
        "x-levios-idempotency": "non_idempotent",
        "x-levios-rate-limit": {
          "descriptor_id": "automations.create",
          "cost_class": "write",
          "tenant_scope": "selected_account"
        },
        "responses": {
          "201": {
            "description": "Successful response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicAutomationDetailResponseV1"
                }
              }
            }
          },
          "400": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_content_length"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "Invalid Content-Length."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_json"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request body is not valid JSON."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_request_url"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request URL is invalid."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_utf8"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request body is not valid UTF-8."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              },
              "WWW-Authenticate": {
                "description": "API key Bearer challenge.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "Bearer"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_unauthorized"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Authentication required."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "402": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_automation_plan_limit"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "details": {
                          "$ref": "#/components/schemas/PublicAutomationPlanDetailsV1"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "The account plan does not allow this automation."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_account_not_granted"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_forbidden"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_scope_denied"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_automation_media_not_found"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The referenced Instagram media was not found."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_contact_tag_not_found"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The referenced contact tag was not found."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_body_too_large"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The JSON request body exceeds 1 MiB."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_json_too_deep"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The JSON request body exceeds maximum depth."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "415": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_unsupported_media_type"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Content-Type must be application/json."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_automation_follow_up_missing"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "details": {
                              "$ref": "#/components/schemas/PublicAutomationValidationDetailsV1"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "A start_follow_up opening button requires a follow-up."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_automation_follow_up_requires_button"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "details": {
                              "$ref": "#/components/schemas/PublicAutomationValidationDetailsV1"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "A follow-up requires exactly one start_follow_up opening button."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_automation_invalid_configuration"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "details": {
                              "$ref": "#/components/schemas/PublicAutomationValidationDetailsV1"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "Configuration fields do not match the public automation contract."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_automation_unsupported_action_order"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "details": {
                              "$ref": "#/components/schemas/PublicAutomationValidationDetailsV1"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "Follow-up actions are not in a supported order."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_automation_unsupported_trigger"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "details": {
                              "$ref": "#/components/schemas/PublicAutomationValidationDetailsV1"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "Trigger fields do not match a supported public automation type."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_validation_error"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "details": {
                              "type": "object",
                              "properties": {
                                "issues": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 64
                                      },
                                      "path": {
                                        "type": "array",
                                        "items": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "maxItems": 16
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "path"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "maxItems": 32
                                }
                              },
                              "required": [
                                "issues"
                              ],
                              "additionalProperties": false
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request does not match the declared schema."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "rate_limited"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Rate limit exceeded."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_automation_committed_response_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "details": {
                              "type": "object",
                              "properties": {
                                "committed": {
                                  "type": "boolean",
                                  "enum": [
                                    true
                                  ]
                                },
                                "retryable": {
                                  "type": "boolean",
                                  "enum": [
                                    false
                                  ]
                                }
                              },
                              "required": [
                                "committed",
                                "retryable"
                              ],
                              "additionalProperties": false
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The automation committed, but its response could not be verified. Do not retry automatically."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_internal_error"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request could not be completed."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_account_resolution_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The reachable account set could not be read."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_automation_authoring_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The automation could not be authored."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_credential_attribution_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The credential attribution is unavailable."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "rate_limiter_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "Rate limiter unavailable."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/automations/{automationId}": {
      "get": {
        "tags": [
          "automation"
        ],
        "operationId": "automations.get",
        "summary": "Get an automation",
        "description": "Returns one automation with its current status, configuration, and timestamps.",
        "parameters": [
          {
            "name": "automationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-levios-semantic-id": "api.v1.automations.get",
        "x-levios-required-scope": "automations:read",
        "x-levios-account-scope": "required",
        "x-levios-effect": "read",
        "x-levios-idempotency": "safe",
        "x-levios-rate-limit": {
          "descriptor_id": "automations.get",
          "cost_class": "read",
          "tenant_scope": "selected_account"
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicAutomationDetailResponseV1"
                }
              }
            }
          },
          "400": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_content_length"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "Invalid Content-Length."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_json"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request body is not valid JSON."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_request_url"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request URL is invalid."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_utf8"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request body is not valid UTF-8."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              },
              "WWW-Authenticate": {
                "description": "API key Bearer challenge.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "Bearer"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_unauthorized"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Authentication required."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_account_not_granted"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_forbidden"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_scope_denied"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_automation_not_found"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "The requested automation was not found."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "413": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_body_too_large"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The JSON request body exceeds 1 MiB."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_json_too_deep"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The JSON request body exceeds maximum depth."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "415": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_unsupported_media_type"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Content-Type must be application/json."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "properties": {
                            "issues": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 64
                                  },
                                  "path": {
                                    "type": "array",
                                    "items": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "maxItems": 16
                                  }
                                },
                                "required": [
                                  "code",
                                  "path"
                                ],
                                "additionalProperties": false
                              },
                              "maxItems": 32
                            }
                          },
                          "required": [
                            "issues"
                          ],
                          "additionalProperties": false
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "The request does not match the declared schema."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "rate_limited"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Rate limit exceeded."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_internal_error"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request could not be completed."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_projection_too_large"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The projected result exceeds the result byte limit."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_account_resolution_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The reachable account set could not be read."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_automation_authoring_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The automation could not be authored."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "rate_limiter_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "Rate limiter unavailable."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "automation"
        ],
        "operationId": "automations.update",
        "summary": "Update an automation",
        "description": "Renames an automation or replaces its complete configuration without changing its status.",
        "parameters": [
          {
            "name": "automationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicAutomationUpdateV1"
              }
            }
          }
        },
        "x-levios-semantic-id": "api.v1.automations.update",
        "x-levios-required-scope": "automations:write",
        "x-levios-account-scope": "required",
        "x-levios-effect": "write",
        "x-levios-idempotency": "idempotent",
        "x-levios-rate-limit": {
          "descriptor_id": "automations.update",
          "cost_class": "write",
          "tenant_scope": "selected_account"
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicAutomationDetailResponseV1"
                }
              }
            }
          },
          "400": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_content_length"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "Invalid Content-Length."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_json"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request body is not valid JSON."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_request_url"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request URL is invalid."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_utf8"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request body is not valid UTF-8."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              },
              "WWW-Authenticate": {
                "description": "API key Bearer challenge.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "Bearer"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_unauthorized"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Authentication required."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "402": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_automation_plan_limit"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "details": {
                          "$ref": "#/components/schemas/PublicAutomationPlanDetailsV1"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "The account plan does not allow this automation."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_account_not_granted"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_forbidden"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_scope_denied"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_automation_media_not_found"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The referenced Instagram media was not found."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_automation_not_found"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The requested automation was not found."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_contact_tag_not_found"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The referenced contact tag was not found."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_automation_version_conflict"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "The automation changed after the supplied version."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "413": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_body_too_large"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The JSON request body exceeds 1 MiB."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_json_too_deep"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The JSON request body exceeds maximum depth."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "415": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_unsupported_media_type"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Content-Type must be application/json."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_automation_follow_up_missing"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "details": {
                              "$ref": "#/components/schemas/PublicAutomationValidationDetailsV1"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "A start_follow_up opening button requires a follow-up."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_automation_follow_up_requires_button"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "details": {
                              "$ref": "#/components/schemas/PublicAutomationValidationDetailsV1"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "A follow-up requires exactly one start_follow_up opening button."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_automation_invalid_configuration"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "details": {
                              "$ref": "#/components/schemas/PublicAutomationValidationDetailsV1"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "Configuration fields do not match the public automation contract."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_automation_unsupported_action_order"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "details": {
                              "$ref": "#/components/schemas/PublicAutomationValidationDetailsV1"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "Follow-up actions are not in a supported order."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_automation_unsupported_trigger"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "details": {
                              "$ref": "#/components/schemas/PublicAutomationValidationDetailsV1"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "Trigger fields do not match a supported public automation type."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_validation_error"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "details": {
                              "type": "object",
                              "properties": {
                                "issues": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 64
                                      },
                                      "path": {
                                        "type": "array",
                                        "items": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "maxItems": 16
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "path"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "maxItems": 32
                                }
                              },
                              "required": [
                                "issues"
                              ],
                              "additionalProperties": false
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request does not match the declared schema."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "rate_limited"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Rate limit exceeded."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_automation_committed_response_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "details": {
                              "type": "object",
                              "properties": {
                                "committed": {
                                  "type": "boolean",
                                  "enum": [
                                    true
                                  ]
                                },
                                "retryable": {
                                  "type": "boolean",
                                  "enum": [
                                    false
                                  ]
                                }
                              },
                              "required": [
                                "committed",
                                "retryable"
                              ],
                              "additionalProperties": false
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The automation committed, but its response could not be verified. Do not retry automatically."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_internal_error"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request could not be completed."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_account_resolution_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The reachable account set could not be read."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_automation_authoring_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The automation could not be authored."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_credential_attribution_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The credential attribution is unavailable."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "rate_limiter_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "Rate limiter unavailable."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "automation"
        ],
        "operationId": "automations.delete",
        "summary": "Delete an automation",
        "description": "Archives an automation so it no longer processes new Instagram activity.",
        "parameters": [
          {
            "name": "automationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "expected_updated_at",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:(?:(?!0000)\\d{4})-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|02-(?:0[1-9]|1\\d|2[0-8]))|(?:(?!0000)(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00))-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d{1,6})?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$",
              "minLength": 20,
              "maxLength": 32
            }
          }
        ],
        "x-levios-semantic-id": "api.v1.automations.delete",
        "x-levios-required-scope": "automations:write",
        "x-levios-account-scope": "required",
        "x-levios-effect": "write",
        "x-levios-idempotency": "idempotent",
        "x-levios-rate-limit": {
          "descriptor_id": "automations.delete",
          "cost_class": "write",
          "tenant_scope": "selected_account"
        },
        "responses": {
          "204": {
            "description": "Successful response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            }
          },
          "400": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_content_length"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "Invalid Content-Length."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_json"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request body is not valid JSON."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_request_url"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request URL is invalid."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_utf8"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request body is not valid UTF-8."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              },
              "WWW-Authenticate": {
                "description": "API key Bearer challenge.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "Bearer"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_unauthorized"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Authentication required."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_account_not_granted"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_forbidden"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_scope_denied"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_automation_not_found"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "The requested automation was not found."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_automation_version_conflict"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "The automation changed after the supplied version."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "413": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_body_too_large"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The JSON request body exceeds 1 MiB."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_json_too_deep"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The JSON request body exceeds maximum depth."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "415": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_unsupported_media_type"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Content-Type must be application/json."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "properties": {
                            "issues": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 64
                                  },
                                  "path": {
                                    "type": "array",
                                    "items": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "maxItems": 16
                                  }
                                },
                                "required": [
                                  "code",
                                  "path"
                                ],
                                "additionalProperties": false
                              },
                              "maxItems": 32
                            }
                          },
                          "required": [
                            "issues"
                          ],
                          "additionalProperties": false
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "The request does not match the declared schema."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "rate_limited"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Rate limit exceeded."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_internal_error"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "The request could not be completed."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_account_resolution_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The reachable account set could not be read."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_automation_delete_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The automation could not be archived."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_credential_attribution_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The credential attribution is unavailable."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "rate_limiter_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "Rate limiter unavailable."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/automations/{automationId}/activate": {
      "post": {
        "tags": [
          "automation"
        ],
        "operationId": "automations.activate",
        "summary": "Activate an automation",
        "description": "Publishes pending changes and activates an automation after checking the supplied version.",
        "parameters": [
          {
            "name": "automationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "account_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "expected_updated_at": {
                    "type": "string",
                    "pattern": "^(?:(?:(?!0000)\\d{4})-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|02-(?:0[1-9]|1\\d|2[0-8]))|(?:(?!0000)(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00))-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d{1,6})?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$",
                    "minLength": 20,
                    "maxLength": 32
                  }
                },
                "required": [
                  "account_id",
                  "expected_updated_at"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-levios-semantic-id": "api.v1.automations.activate",
        "x-levios-required-scope": "automations:activate",
        "x-levios-account-scope": "required",
        "x-levios-effect": "write",
        "x-levios-idempotency": "non_idempotent",
        "x-levios-rate-limit": {
          "descriptor_id": "automations.activate",
          "cost_class": "activation",
          "tenant_scope": "selected_account"
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicAutomationDetailResponseV1"
                }
              }
            }
          },
          "400": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_content_length"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "Invalid Content-Length."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_json"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request body is not valid JSON."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_request_url"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request URL is invalid."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_utf8"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request body is not valid UTF-8."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              },
              "WWW-Authenticate": {
                "description": "API key Bearer challenge.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "Bearer"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_unauthorized"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Authentication required."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "402": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_automation_plan_limit"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "details": {
                          "$ref": "#/components/schemas/PublicAutomationPlanDetailsV1"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "The account plan does not allow this automation."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_account_not_granted"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_forbidden"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_scope_denied"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_automation_not_found"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "The requested automation was not found."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_automation_version_conflict"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "The automation changed after the supplied version."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "413": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_body_too_large"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The JSON request body exceeds 1 MiB."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_json_too_deep"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The JSON request body exceeds maximum depth."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "415": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_unsupported_media_type"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Content-Type must be application/json."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_automation_invalid_configuration"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "details": {
                              "$ref": "#/components/schemas/PublicAutomationValidationDetailsV1"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "Configuration fields do not match the public automation contract."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_validation_error"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "details": {
                              "type": "object",
                              "properties": {
                                "issues": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 64
                                      },
                                      "path": {
                                        "type": "array",
                                        "items": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "maxItems": 16
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "path"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "maxItems": 32
                                }
                              },
                              "required": [
                                "issues"
                              ],
                              "additionalProperties": false
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request does not match the declared schema."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "rate_limited"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Rate limit exceeded."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_automation_committed_response_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "details": {
                              "type": "object",
                              "properties": {
                                "committed": {
                                  "type": "boolean",
                                  "enum": [
                                    true
                                  ]
                                },
                                "retryable": {
                                  "type": "boolean",
                                  "enum": [
                                    false
                                  ]
                                }
                              },
                              "required": [
                                "committed",
                                "retryable"
                              ],
                              "additionalProperties": false
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The automation committed, but its response could not be verified. Do not retry automatically."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_internal_error"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request could not be completed."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_account_resolution_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The reachable account set could not be read."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_automation_authoring_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The automation could not be authored."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_credential_attribution_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The credential attribution is unavailable."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "rate_limiter_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "Rate limiter unavailable."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/automations/{automationId}/deactivate": {
      "post": {
        "tags": [
          "automation"
        ],
        "operationId": "automations.deactivate",
        "summary": "Deactivate an automation",
        "description": "Pauses new trigger processing after checking the supplied automation version.",
        "parameters": [
          {
            "name": "automationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "account_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "expected_updated_at": {
                    "type": "string",
                    "pattern": "^(?:(?:(?!0000)\\d{4})-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|02-(?:0[1-9]|1\\d|2[0-8]))|(?:(?!0000)(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00))-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d{1,6})?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$",
                    "minLength": 20,
                    "maxLength": 32
                  }
                },
                "required": [
                  "account_id",
                  "expected_updated_at"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-levios-semantic-id": "api.v1.automations.deactivate",
        "x-levios-required-scope": "automations:activate",
        "x-levios-account-scope": "required",
        "x-levios-effect": "write",
        "x-levios-idempotency": "non_idempotent",
        "x-levios-rate-limit": {
          "descriptor_id": "automations.deactivate",
          "cost_class": "activation",
          "tenant_scope": "selected_account"
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicAutomationDetailResponseV1"
                }
              }
            }
          },
          "400": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_content_length"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "Invalid Content-Length."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_json"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request body is not valid JSON."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_request_url"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request URL is invalid."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_utf8"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request body is not valid UTF-8."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              },
              "WWW-Authenticate": {
                "description": "API key Bearer challenge.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "Bearer"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_unauthorized"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Authentication required."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "402": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_automation_plan_limit"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "details": {
                          "$ref": "#/components/schemas/PublicAutomationPlanDetailsV1"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "The account plan does not allow this automation."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_account_not_granted"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_forbidden"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_scope_denied"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_automation_not_found"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "The requested automation was not found."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_automation_version_conflict"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "The automation changed after the supplied version."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "413": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_body_too_large"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The JSON request body exceeds 1 MiB."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_json_too_deep"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The JSON request body exceeds maximum depth."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "415": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_unsupported_media_type"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Content-Type must be application/json."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_automation_invalid_configuration"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "details": {
                              "$ref": "#/components/schemas/PublicAutomationValidationDetailsV1"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "Configuration fields do not match the public automation contract."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_validation_error"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "details": {
                              "type": "object",
                              "properties": {
                                "issues": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 64
                                      },
                                      "path": {
                                        "type": "array",
                                        "items": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "maxItems": 16
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "path"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "maxItems": 32
                                }
                              },
                              "required": [
                                "issues"
                              ],
                              "additionalProperties": false
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request does not match the declared schema."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "rate_limited"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Rate limit exceeded."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_automation_committed_response_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "details": {
                              "type": "object",
                              "properties": {
                                "committed": {
                                  "type": "boolean",
                                  "enum": [
                                    true
                                  ]
                                },
                                "retryable": {
                                  "type": "boolean",
                                  "enum": [
                                    false
                                  ]
                                }
                              },
                              "required": [
                                "committed",
                                "retryable"
                              ],
                              "additionalProperties": false
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The automation committed, but its response could not be verified. Do not retry automatically."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_internal_error"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request could not be completed."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_account_resolution_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The reachable account set could not be read."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_automation_authoring_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The automation could not be authored."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_credential_attribution_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The credential attribution is unavailable."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "rate_limiter_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "Rate limiter unavailable."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/automations/{automationId}/metrics": {
      "get": {
        "tags": [
          "automation_metric"
        ],
        "operationId": "automations.metrics.get",
        "summary": "Get automation metrics",
        "description": "Returns activation and direct-message totals for one automation.",
        "parameters": [
          {
            "name": "automationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-levios-semantic-id": "api.v1.automations.metrics.get",
        "x-levios-required-scope": "metrics:read",
        "x-levios-account-scope": "required",
        "x-levios-effect": "read",
        "x-levios-idempotency": "safe",
        "x-levios-rate-limit": {
          "descriptor_id": "automations.metrics.get",
          "cost_class": "read",
          "tenant_scope": "selected_account"
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicAutomationMetrics"
                }
              }
            }
          },
          "400": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_content_length"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "Invalid Content-Length."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_json"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request body is not valid JSON."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_request_url"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request URL is invalid."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_utf8"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request body is not valid UTF-8."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              },
              "WWW-Authenticate": {
                "description": "API key Bearer challenge.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "Bearer"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_unauthorized"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Authentication required."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_account_not_granted"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_forbidden"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_scope_denied"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_automation_metrics_not_found"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "The requested automation metrics were not found."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "413": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_body_too_large"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The JSON request body exceeds 1 MiB."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_json_too_deep"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The JSON request body exceeds maximum depth."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "415": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_unsupported_media_type"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Content-Type must be application/json."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "properties": {
                            "issues": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 64
                                  },
                                  "path": {
                                    "type": "array",
                                    "items": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "maxItems": 16
                                  }
                                },
                                "required": [
                                  "code",
                                  "path"
                                ],
                                "additionalProperties": false
                              },
                              "maxItems": 32
                            }
                          },
                          "required": [
                            "issues"
                          ],
                          "additionalProperties": false
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "The request does not match the declared schema."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "rate_limited"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Rate limit exceeded."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_internal_error"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request could not be completed."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_projection"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The automation metrics projection is invalid."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_projection_too_large"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The projected result exceeds the result byte limit."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_metrics_read_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The automation metrics could not be read."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "rate_limiter_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "Rate limiter unavailable."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/contact-tags": {
      "get": {
        "tags": [
          "contact_tag"
        ],
        "operationId": "contact_tags.list",
        "summary": "List contact tags",
        "description": "Returns a cursor-paginated list of tags for one Instagram account.",
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-levios-semantic-id": "api.v1.contact_tags.list",
        "x-levios-required-scope": "contacts:write",
        "x-levios-account-scope": "required",
        "x-levios-effect": "read",
        "x-levios-idempotency": "safe",
        "x-levios-rate-limit": {
          "descriptor_id": "contact_tags.list",
          "cost_class": "read",
          "tenant_scope": "selected_account"
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicContactTagPage"
                }
              }
            }
          },
          "400": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_content_length"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "Invalid Content-Length."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_json"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request body is not valid JSON."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_request_url"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request URL is invalid."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_utf8"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request body is not valid UTF-8."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              },
              "WWW-Authenticate": {
                "description": "API key Bearer challenge.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "Bearer"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_unauthorized"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Authentication required."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_account_not_granted"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_forbidden"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_scope_denied"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_body_too_large"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The JSON request body exceeds 1 MiB."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_json_too_deep"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The JSON request body exceeds maximum depth."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "415": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_unsupported_media_type"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Content-Type must be application/json."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_cursor"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The contact-tag cursor is invalid for this account."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_limit"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The page limit must be an integer between 1 and 50."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_validation_error"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "details": {
                              "type": "object",
                              "properties": {
                                "issues": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 64
                                      },
                                      "path": {
                                        "type": "array",
                                        "items": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "maxItems": 16
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "path"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "maxItems": 32
                                }
                              },
                              "required": [
                                "issues"
                              ],
                              "additionalProperties": false
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request does not match the declared schema."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "rate_limited"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Rate limit exceeded."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_internal_error"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request could not be completed."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_projection"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The contact-tag projection is invalid."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_projection_too_large"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The projected result exceeds the result byte limit."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_account_resolution_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The reachable account set could not be read."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_audit_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The security audit log is unavailable."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_contact_tag_read_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The contact-tag catalog could not be read."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "rate_limiter_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "Rate limiter unavailable."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "contact_tag"
        ],
        "operationId": "contact_tags.create",
        "summary": "Create a contact tag",
        "description": "Creates a reusable contact tag for one Instagram account.",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "account_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "$ref": "#/components/schemas/PublicContactTagNameInput"
                  }
                },
                "required": [
                  "account_id",
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-levios-semantic-id": "api.v1.contact_tags.create",
        "x-levios-required-scope": "contacts:write",
        "x-levios-account-scope": "required",
        "x-levios-effect": "write",
        "x-levios-idempotency": "idempotent",
        "x-levios-rate-limit": {
          "descriptor_id": "contact_tags.create",
          "cost_class": "write",
          "tenant_scope": "selected_account"
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicContactTagCreateResult"
                }
              }
            }
          },
          "400": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_content_length"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "Invalid Content-Length."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_json"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request body is not valid JSON."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_request_url"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request URL is invalid."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_utf8"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request body is not valid UTF-8."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              },
              "WWW-Authenticate": {
                "description": "API key Bearer challenge.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "Bearer"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_unauthorized"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Authentication required."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_account_not_granted"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_forbidden"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_scope_denied"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_contact_tag_conflict"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "A contact tag with that name already exists."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_contact_tag_limit_reached"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The contact tag limit has been reached."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_body_too_large"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The JSON request body exceeds 1 MiB."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_json_too_deep"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The JSON request body exceeds maximum depth."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "415": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_unsupported_media_type"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Content-Type must be application/json."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_contact_tag_invalid"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The contact tag is invalid."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_validation_error"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "details": {
                              "type": "object",
                              "properties": {
                                "issues": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 64
                                      },
                                      "path": {
                                        "type": "array",
                                        "items": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "maxItems": 16
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "path"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "maxItems": 32
                                }
                              },
                              "required": [
                                "issues"
                              ],
                              "additionalProperties": false
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request does not match the declared schema."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "rate_limited"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Rate limit exceeded."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_contact_tag_response_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "details": {
                              "type": "object",
                              "properties": {
                                "committed": {
                                  "type": "boolean",
                                  "enum": [
                                    true
                                  ]
                                },
                                "retryable": {
                                  "type": "boolean",
                                  "enum": [
                                    false
                                  ]
                                }
                              },
                              "required": [
                                "committed",
                                "retryable"
                              ],
                              "additionalProperties": false
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The contact tag changed, but its response could not be verified. Do not retry automatically."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_internal_error"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request could not be completed."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_account_resolution_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The reachable account set could not be read."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_contact_tag_write_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The contact tag could not be changed."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "rate_limiter_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "Rate limiter unavailable."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/contact-tags/{tagId}": {
      "patch": {
        "tags": [
          "contact_tag"
        ],
        "operationId": "contact_tags.update",
        "summary": "Update a contact tag",
        "description": "Renames a reusable contact tag.",
        "parameters": [
          {
            "name": "tagId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "account_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "$ref": "#/components/schemas/PublicContactTagNameInput"
                  }
                },
                "required": [
                  "account_id",
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-levios-semantic-id": "api.v1.contact_tags.update",
        "x-levios-required-scope": "contacts:write",
        "x-levios-account-scope": "required",
        "x-levios-effect": "write",
        "x-levios-idempotency": "idempotent",
        "x-levios-rate-limit": {
          "descriptor_id": "contact_tags.update",
          "cost_class": "write",
          "tenant_scope": "selected_account"
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicContactTagMutationResult"
                }
              }
            }
          },
          "400": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_content_length"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "Invalid Content-Length."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_json"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request body is not valid JSON."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_request_url"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request URL is invalid."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_utf8"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request body is not valid UTF-8."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              },
              "WWW-Authenticate": {
                "description": "API key Bearer challenge.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "Bearer"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_unauthorized"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Authentication required."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_account_not_granted"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_forbidden"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_scope_denied"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_contact_tag_not_found"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "The requested contact tag was not found."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_contact_tag_conflict"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "A contact tag with that name already exists."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_contact_tag_in_use"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The contact tag is referenced by an automation."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_body_too_large"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The JSON request body exceeds 1 MiB."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_json_too_deep"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The JSON request body exceeds maximum depth."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "415": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_unsupported_media_type"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Content-Type must be application/json."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_contact_tag_invalid"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The contact tag is invalid."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_validation_error"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "details": {
                              "type": "object",
                              "properties": {
                                "issues": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 64
                                      },
                                      "path": {
                                        "type": "array",
                                        "items": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "maxItems": 16
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "path"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "maxItems": 32
                                }
                              },
                              "required": [
                                "issues"
                              ],
                              "additionalProperties": false
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request does not match the declared schema."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "rate_limited"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Rate limit exceeded."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_contact_tag_response_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "details": {
                              "type": "object",
                              "properties": {
                                "committed": {
                                  "type": "boolean",
                                  "enum": [
                                    true
                                  ]
                                },
                                "retryable": {
                                  "type": "boolean",
                                  "enum": [
                                    false
                                  ]
                                }
                              },
                              "required": [
                                "committed",
                                "retryable"
                              ],
                              "additionalProperties": false
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The contact tag changed, but its response could not be verified. Do not retry automatically."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_internal_error"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request could not be completed."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_account_resolution_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The reachable account set could not be read."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_contact_tag_write_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The contact tag could not be changed."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "rate_limiter_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "Rate limiter unavailable."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "contact_tag"
        ],
        "operationId": "contact_tags.delete",
        "summary": "Delete a contact tag",
        "description": "Deletes a reusable contact tag from one Instagram account.",
        "parameters": [
          {
            "name": "tagId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-levios-semantic-id": "api.v1.contact_tags.delete",
        "x-levios-required-scope": "contacts:write",
        "x-levios-account-scope": "required",
        "x-levios-effect": "write",
        "x-levios-idempotency": "idempotent",
        "x-levios-rate-limit": {
          "descriptor_id": "contact_tags.delete",
          "cost_class": "write",
          "tenant_scope": "selected_account"
        },
        "responses": {
          "204": {
            "description": "Successful response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            }
          },
          "400": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_content_length"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "Invalid Content-Length."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_json"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request body is not valid JSON."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_request_url"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request URL is invalid."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_utf8"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request body is not valid UTF-8."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              },
              "WWW-Authenticate": {
                "description": "API key Bearer challenge.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "Bearer"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_unauthorized"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Authentication required."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_account_not_granted"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_forbidden"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_scope_denied"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_contact_tag_not_found"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "The requested contact tag was not found."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_contact_tag_in_use"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "The contact tag is referenced by an automation."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "413": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_body_too_large"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The JSON request body exceeds 1 MiB."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_json_too_deep"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The JSON request body exceeds maximum depth."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "415": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_unsupported_media_type"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Content-Type must be application/json."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "properties": {
                            "issues": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 64
                                  },
                                  "path": {
                                    "type": "array",
                                    "items": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "maxItems": 16
                                  }
                                },
                                "required": [
                                  "code",
                                  "path"
                                ],
                                "additionalProperties": false
                              },
                              "maxItems": 32
                            }
                          },
                          "required": [
                            "issues"
                          ],
                          "additionalProperties": false
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "The request does not match the declared schema."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "rate_limited"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Rate limit exceeded."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_contact_tag_response_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "details": {
                              "type": "object",
                              "properties": {
                                "committed": {
                                  "type": "boolean",
                                  "enum": [
                                    true
                                  ]
                                },
                                "retryable": {
                                  "type": "boolean",
                                  "enum": [
                                    false
                                  ]
                                }
                              },
                              "required": [
                                "committed",
                                "retryable"
                              ],
                              "additionalProperties": false
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The contact tag changed, but its response could not be verified. Do not retry automatically."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_internal_error"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request could not be completed."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_account_resolution_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The reachable account set could not be read."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_contact_tag_write_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The contact tag could not be changed."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "rate_limiter_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "Rate limiter unavailable."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/contacts": {
      "get": {
        "tags": [
          "contact"
        ],
        "operationId": "contacts.list",
        "summary": "List contacts",
        "description": "Returns full contact records for one Instagram account, with an optional exact Instagram username filter.",
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            }
          },
          {
            "name": "instagram_username",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicInstagramUsernameFilter"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-levios-semantic-id": "api.v1.contacts.list",
        "x-levios-required-scope": "contacts:read_pii",
        "x-levios-account-scope": "required",
        "x-levios-effect": "read",
        "x-levios-idempotency": "safe",
        "x-levios-rate-limit": {
          "descriptor_id": "contacts.list",
          "cost_class": "contact_pii",
          "tenant_scope": "selected_account"
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicContactPage"
                }
              }
            }
          },
          "400": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_content_length"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "Invalid Content-Length."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_json"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request body is not valid JSON."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_request_url"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request URL is invalid."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_utf8"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request body is not valid UTF-8."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              },
              "WWW-Authenticate": {
                "description": "API key Bearer challenge.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "Bearer"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_unauthorized"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Authentication required."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_account_not_granted"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_forbidden"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_scope_denied"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_body_too_large"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The JSON request body exceeds 1 MiB."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_json_too_deep"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The JSON request body exceeds maximum depth."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "415": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_unsupported_media_type"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Content-Type must be application/json."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_instagram_username_invalid"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The Instagram username is malformed."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_cursor"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The contact cursor is invalid for this account and filter."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_limit"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The page limit must be an integer between 1 and 50."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_validation_error"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "details": {
                              "type": "object",
                              "properties": {
                                "issues": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 64
                                      },
                                      "path": {
                                        "type": "array",
                                        "items": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "maxItems": 16
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "path"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "maxItems": 32
                                }
                              },
                              "required": [
                                "issues"
                              ],
                              "additionalProperties": false
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request does not match the declared schema."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "rate_limited"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Rate limit exceeded."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_internal_error"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request could not be completed."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_projection"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The contact projection is invalid."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_projection_too_large"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The projected result exceeds the result byte limit."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_account_resolution_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The reachable account set could not be read."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_audit_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The security audit log is unavailable."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_contact_read_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The contact data could not be read."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "rate_limiter_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "Rate limiter unavailable."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/contacts/{contactId}": {
      "get": {
        "tags": [
          "contact"
        ],
        "operationId": "contacts.get",
        "summary": "Get a contact",
        "description": "Returns one contact with profile data, attributes, tags, and a paginated interaction timeline.",
        "parameters": [
          {
            "name": "contactId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "timeline_cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048
            }
          },
          {
            "name": "timeline_limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-levios-semantic-id": "api.v1.contacts.get",
        "x-levios-required-scope": "contacts:read_pii",
        "x-levios-account-scope": "required",
        "x-levios-effect": "read",
        "x-levios-idempotency": "safe",
        "x-levios-rate-limit": {
          "descriptor_id": "contacts.get",
          "cost_class": "contact_pii",
          "tenant_scope": "selected_account"
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicContactDetailResult"
                }
              }
            }
          },
          "400": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_content_length"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "Invalid Content-Length."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_json"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request body is not valid JSON."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_request_url"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request URL is invalid."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_utf8"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request body is not valid UTF-8."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              },
              "WWW-Authenticate": {
                "description": "API key Bearer challenge.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "Bearer"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_unauthorized"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Authentication required."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_account_not_granted"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_forbidden"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_scope_denied"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_contact_not_found"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "The requested contact was not found."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "413": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_body_too_large"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The JSON request body exceeds 1 MiB."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_json_too_deep"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The JSON request body exceeds maximum depth."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "415": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_unsupported_media_type"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Content-Type must be application/json."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_cursor"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The contact timeline cursor is invalid."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_limit"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The page limit must be an integer between 1 and 50."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_validation_error"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "details": {
                              "type": "object",
                              "properties": {
                                "issues": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 64
                                      },
                                      "path": {
                                        "type": "array",
                                        "items": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "maxItems": 16
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "path"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "maxItems": 32
                                }
                              },
                              "required": [
                                "issues"
                              ],
                              "additionalProperties": false
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request does not match the declared schema."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "rate_limited"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Rate limit exceeded."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_internal_error"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request could not be completed."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_projection"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The contact projection is invalid."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_projection_too_large"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The projected result exceeds the result byte limit."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_account_resolution_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The reachable account set could not be read."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_audit_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The security audit log is unavailable."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_contact_read_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The contact data could not be read."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "rate_limiter_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "Rate limiter unavailable."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/contacts/{contactId}/tags/{tagId}": {
      "put": {
        "tags": [
          "contact_tag"
        ],
        "operationId": "contact_tags.attach",
        "summary": "Add a tag to a contact",
        "description": "Adds an existing account tag to a contact and returns the contact's current tags.",
        "parameters": [
          {
            "name": "contactId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tagId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "account_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "account_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-levios-semantic-id": "api.v1.contact_tags.attach",
        "x-levios-required-scope": "contacts:write",
        "x-levios-account-scope": "required",
        "x-levios-effect": "write",
        "x-levios-idempotency": "idempotent",
        "x-levios-rate-limit": {
          "descriptor_id": "contact_tags.attach",
          "cost_class": "write",
          "tenant_scope": "selected_account"
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicContactTagAssignmentResult"
                }
              }
            }
          },
          "400": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_content_length"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "Invalid Content-Length."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_json"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request body is not valid JSON."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_request_url"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request URL is invalid."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_utf8"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request body is not valid UTF-8."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              },
              "WWW-Authenticate": {
                "description": "API key Bearer challenge.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "Bearer"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_unauthorized"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Authentication required."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_account_not_granted"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_forbidden"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_scope_denied"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_contact_tag_not_found"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "The requested contact tag was not found."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_contact_tag_limit_reached"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "The contact tag limit has been reached."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "413": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_body_too_large"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The JSON request body exceeds 1 MiB."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_json_too_deep"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The JSON request body exceeds maximum depth."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "415": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_unsupported_media_type"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Content-Type must be application/json."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "properties": {
                            "issues": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 64
                                  },
                                  "path": {
                                    "type": "array",
                                    "items": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "maxItems": 16
                                  }
                                },
                                "required": [
                                  "code",
                                  "path"
                                ],
                                "additionalProperties": false
                              },
                              "maxItems": 32
                            }
                          },
                          "required": [
                            "issues"
                          ],
                          "additionalProperties": false
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "The request does not match the declared schema."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "rate_limited"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Rate limit exceeded."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_contact_tag_response_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "details": {
                              "type": "object",
                              "properties": {
                                "committed": {
                                  "type": "boolean",
                                  "enum": [
                                    true
                                  ]
                                },
                                "retryable": {
                                  "type": "boolean",
                                  "enum": [
                                    false
                                  ]
                                }
                              },
                              "required": [
                                "committed",
                                "retryable"
                              ],
                              "additionalProperties": false
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The contact tag changed, but its response could not be verified. Do not retry automatically."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_internal_error"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request could not be completed."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_account_resolution_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The reachable account set could not be read."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_contact_tag_write_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The contact tag could not be changed."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "rate_limiter_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "Rate limiter unavailable."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "contact_tag"
        ],
        "operationId": "contact_tags.detach",
        "summary": "Remove a tag from a contact",
        "description": "Removes an assigned tag from a contact and returns the contact's current tags.",
        "parameters": [
          {
            "name": "contactId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tagId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-levios-semantic-id": "api.v1.contact_tags.detach",
        "x-levios-required-scope": "contacts:write",
        "x-levios-account-scope": "required",
        "x-levios-effect": "write",
        "x-levios-idempotency": "idempotent",
        "x-levios-rate-limit": {
          "descriptor_id": "contact_tags.detach",
          "cost_class": "write",
          "tenant_scope": "selected_account"
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicContactTagAssignmentResult"
                }
              }
            }
          },
          "400": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_content_length"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "Invalid Content-Length."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_json"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request body is not valid JSON."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_request_url"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request URL is invalid."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_utf8"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request body is not valid UTF-8."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              },
              "WWW-Authenticate": {
                "description": "API key Bearer challenge.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "Bearer"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_unauthorized"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Authentication required."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_account_not_granted"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_forbidden"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_scope_denied"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_contact_tag_not_found"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "The requested contact tag was not found."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "413": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_body_too_large"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The JSON request body exceeds 1 MiB."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_json_too_deep"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The JSON request body exceeds maximum depth."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "415": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_unsupported_media_type"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Content-Type must be application/json."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "properties": {
                            "issues": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 64
                                  },
                                  "path": {
                                    "type": "array",
                                    "items": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "maxItems": 16
                                  }
                                },
                                "required": [
                                  "code",
                                  "path"
                                ],
                                "additionalProperties": false
                              },
                              "maxItems": 32
                            }
                          },
                          "required": [
                            "issues"
                          ],
                          "additionalProperties": false
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "The request does not match the declared schema."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "rate_limited"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Rate limit exceeded."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_contact_tag_response_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "details": {
                              "type": "object",
                              "properties": {
                                "committed": {
                                  "type": "boolean",
                                  "enum": [
                                    true
                                  ]
                                },
                                "retryable": {
                                  "type": "boolean",
                                  "enum": [
                                    false
                                  ]
                                }
                              },
                              "required": [
                                "committed",
                                "retryable"
                              ],
                              "additionalProperties": false
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The contact tag changed, but its response could not be verified. Do not retry automatically."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_internal_error"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request could not be completed."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_account_resolution_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The reachable account set could not be read."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_contact_tag_write_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The contact tag could not be changed."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "rate_limiter_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "Rate limiter unavailable."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/metrics": {
      "get": {
        "tags": [
          "metric"
        ],
        "operationId": "metrics.get",
        "summary": "Get account metrics",
        "description": "Returns account KPIs and top automations for a 7-day or 30-day window.",
        "parameters": [
          {
            "name": "account_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "window",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Values: `30d`: the trailing 30-day period; `7d`: the trailing 7-day period.",
              "type": "string",
              "enum": [
                "30d",
                "7d"
              ]
            }
          }
        ],
        "x-levios-semantic-id": "api.v1.metrics.get",
        "x-levios-required-scope": "metrics:read",
        "x-levios-account-scope": "required",
        "x-levios-effect": "read",
        "x-levios-idempotency": "safe",
        "x-levios-rate-limit": {
          "descriptor_id": "metrics.get",
          "cost_class": "read",
          "tenant_scope": "selected_account"
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "kpis": {
                      "type": "object",
                      "properties": {
                        "active_automations": {
                          "type": "object",
                          "properties": {
                            "active": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "paused": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "total": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "active",
                            "paused",
                            "total"
                          ],
                          "additionalProperties": false
                        },
                        "dms_sent": {
                          "type": "object",
                          "properties": {
                            "delta_pct": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "prev": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "value": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "delta_pct",
                            "prev",
                            "value"
                          ],
                          "additionalProperties": false
                        },
                        "leads": {
                          "type": "object",
                          "properties": {
                            "last_window": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "total": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "last_window",
                            "total"
                          ],
                          "additionalProperties": false
                        },
                        "new_contacts": {
                          "type": "object",
                          "properties": {
                            "delta_pct": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "prev": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "value": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "delta_pct",
                            "prev",
                            "value"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "active_automations",
                        "dms_sent",
                        "leads",
                        "new_contacts"
                      ],
                      "additionalProperties": false
                    },
                    "top_automations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "dms_last_7d": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "last_fired_at": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^(?!0000-)(?:(?:(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)|(?:\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|02-(?:0[1-9]|1\\d|2[0-8]))))T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d{1,6})?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$",
                                "minLength": 20,
                                "maxLength": 32
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "status": {
                            "description": "Values: `draft`: saved but not processing new triggers; `live`: active and able to process matching triggers; `paused`: inactive until it is activated again.",
                            "type": "string",
                            "enum": [
                              "draft",
                              "live",
                              "paused"
                            ]
                          }
                        },
                        "required": [
                          "dms_last_7d",
                          "id",
                          "last_fired_at",
                          "name",
                          "status"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 5
                    },
                    "window": {
                      "description": "Values: `30d`: the trailing 30-day period; `7d`: the trailing 7-day period.",
                      "type": "string",
                      "enum": [
                        "30d",
                        "7d"
                      ]
                    }
                  },
                  "required": [
                    "kpis",
                    "top_automations",
                    "window"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_content_length"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "Invalid Content-Length."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_json"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request body is not valid JSON."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_request_url"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request URL is invalid."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_utf8"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request body is not valid UTF-8."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              },
              "WWW-Authenticate": {
                "description": "API key Bearer challenge.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "Bearer"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_unauthorized"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Authentication required."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_account_not_granted"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_forbidden"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_scope_denied"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "This credential is not authorized for the request."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_body_too_large"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The JSON request body exceeds 1 MiB."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_json_too_deep"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The JSON request body exceeds maximum depth."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "415": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_unsupported_media_type"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Content-Type must be application/json."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "api_validation_error"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "properties": {
                            "issues": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 64
                                  },
                                  "path": {
                                    "type": "array",
                                    "items": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "maxItems": 16
                                  }
                                },
                                "required": [
                                  "code",
                                  "path"
                                ],
                                "additionalProperties": false
                              },
                              "maxItems": 32
                            }
                          },
                          "required": [
                            "issues"
                          ],
                          "additionalProperties": false
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "The request does not match the declared schema."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "rate_limited"
                          ]
                        },
                        "correlation_id": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string",
                          "enum": [
                            "Rate limit exceeded."
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "500": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_internal_error"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The request could not be completed."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_invalid_projection"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The metrics projection is invalid."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_projection_too_large"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The projected result exceeds the result byte limit."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Error response.",
            "headers": {
              "X-Correlation-ID": {
                "description": "Correlation identifier for this request.",
                "schema": {
                  "type": "string",
                  "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "api_metrics_read_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "The account metrics could not be read."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "rate_limiter_unavailable"
                              ]
                            },
                            "correlation_id": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string",
                              "enum": [
                                "Rate limiter unavailable."
                              ]
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Levios API key sent as a Bearer token."
      }
    },
    "schemas": {
      "PublicAutomationCreateV1": {
        "$defs": {
          "PublicAutomationCreateV1": {
            "additionalProperties": false,
            "examples": [
              {
                "account_id": "11111111-1111-4111-8111-111111111111",
                "configuration": {
                  "contact_filter": "anyone",
                  "extras": {
                    "cooldown": {
                      "mode": "fixed",
                      "seconds": 21600
                    }
                  },
                  "follow_up": {
                    "actions": [
                      {
                        "delay_seconds": 0,
                        "expires_in_seconds": 86400,
                        "max_attempts": 3,
                        "message": "What is your best email address?",
                        "retry_exhausted_action": "stop",
                        "retry_message": "Send a valid email address.",
                        "type": "ask_for_email"
                      },
                      {
                        "buttons": [
                          {
                            "title": "Open content",
                            "type": "url",
                            "url": "https://example.com/content"
                          }
                        ],
                        "delay_seconds": 0,
                        "text": "Here is your access link.",
                        "type": "send_message"
                      },
                      {
                        "type": "finish"
                      }
                    ]
                  },
                  "opening": {
                    "direct_message": {
                      "delay_seconds": 0,
                      "message": {
                        "buttons": [
                          {
                            "title": "Continue",
                            "type": "start_follow_up"
                          }
                        ],
                        "text": "Tap below to continue."
                      }
                    },
                    "public_reply": {
                      "delay_seconds": 0,
                      "enabled": true,
                      "max_per_post": 50,
                      "mention_mode": "none",
                      "messages": [
                        "I sent it by DM."
                      ],
                      "rotation": "random"
                    }
                  },
                  "trigger": {
                    "keywords": {
                      "match_mode": "whole_word",
                      "mode": "specific",
                      "values": [
                        "guide"
                      ]
                    },
                    "publication": {
                      "mode": "specific",
                      "reference": {
                        "type": "url",
                        "value": "https://www.instagram.com/p/ABC123/"
                      }
                    },
                    "type": "comment"
                  }
                },
                "name": "Send the guide by DM",
                "status": "draft"
              }
            ],
            "properties": {
              "account_id": {
                "format": "uuid",
                "type": "string"
              },
              "configuration": {
                "additionalProperties": false,
                "properties": {
                  "contact_filter": {
                    "description": "`anyone` — every eligible contact; `followers_only` — confirmed followers; `non_followers_only` — confirmed non-followers; `previous_dm_contacts` — contacts with an inbound DM before this trigger; `existing_contacts` — contacts already known before this trigger.",
                    "enum": [
                      "anyone",
                      "followers_only",
                      "non_followers_only",
                      "previous_dm_contacts",
                      "existing_contacts"
                    ],
                    "type": "string"
                  },
                  "extras": {
                    "additionalProperties": false,
                    "properties": {
                      "cooldown": {
                        "anyOf": [
                          {
                            "additionalProperties": false,
                            "properties": {
                              "mode": {
                                "const": "none",
                                "type": "string"
                              }
                            },
                            "required": [
                              "mode"
                            ],
                            "type": "object"
                          },
                          {
                            "additionalProperties": false,
                            "properties": {
                              "mode": {
                                "const": "fixed",
                                "type": "string"
                              },
                              "seconds": {
                                "maximum": 2592000,
                                "minimum": 1,
                                "type": "integer"
                              }
                            },
                            "required": [
                              "mode",
                              "seconds"
                            ],
                            "type": "object"
                          }
                        ]
                      }
                    },
                    "required": [
                      "cooldown"
                    ],
                    "type": "object"
                  },
                  "follow_up": {
                    "anyOf": [
                      {
                        "type": "null"
                      },
                      {
                        "additionalProperties": false,
                        "properties": {
                          "actions": {
                            "items": {
                              "anyOf": [
                                {
                                  "anyOf": [
                                    {
                                      "additionalProperties": false,
                                      "properties": {
                                        "buttons": {
                                          "items": {
                                            "additionalProperties": false,
                                            "properties": {
                                              "title": {
                                                "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                                "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                                "type": "string"
                                              },
                                              "type": {
                                                "const": "url",
                                                "type": "string"
                                              },
                                              "url": {
                                                "pattern": "^(?![\\s\\S]*[\\u0000\\uD800-\\uDFFF])[Hh][Tt][Tt][Pp][Ss]?:\\/\\/[^\\s\\/:?#%]+(?::[0-9]{1,5})?(?:[\\/?#](?:[^\\s%]|%[0-9A-Fa-f]{2})*)?$",
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "title",
                                              "url"
                                            ],
                                            "type": "object"
                                          },
                                          "maxItems": 0,
                                          "minItems": 0,
                                          "type": "array"
                                        },
                                        "delay_seconds": {
                                          "maximum": 86399,
                                          "minimum": 0,
                                          "type": "integer"
                                        },
                                        "text": {
                                          "description": "Message text. Length is 1 through 1000 Unicode scalar values.",
                                          "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,1000}$",
                                          "type": "string"
                                        },
                                        "type": {
                                          "const": "send_message",
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "delay_seconds",
                                        "text",
                                        "buttons"
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "additionalProperties": false,
                                      "properties": {
                                        "buttons": {
                                          "items": {
                                            "additionalProperties": false,
                                            "properties": {
                                              "title": {
                                                "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                                "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                                "type": "string"
                                              },
                                              "type": {
                                                "const": "url",
                                                "type": "string"
                                              },
                                              "url": {
                                                "pattern": "^(?![\\s\\S]*[\\u0000\\uD800-\\uDFFF])[Hh][Tt][Tt][Pp][Ss]?:\\/\\/[^\\s\\/:?#%]+(?::[0-9]{1,5})?(?:[\\/?#](?:[^\\s%]|%[0-9A-Fa-f]{2})*)?$",
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "title",
                                              "url"
                                            ],
                                            "type": "object"
                                          },
                                          "maxItems": 3,
                                          "minItems": 1,
                                          "type": "array"
                                        },
                                        "delay_seconds": {
                                          "maximum": 86399,
                                          "minimum": 0,
                                          "type": "integer"
                                        },
                                        "text": {
                                          "description": "Message text. Length is 1 through 640 Unicode scalar values.",
                                          "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,640}$",
                                          "type": "string"
                                        },
                                        "type": {
                                          "const": "send_message",
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "delay_seconds",
                                        "text",
                                        "buttons"
                                      ],
                                      "type": "object"
                                    }
                                  ]
                                },
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "delay_seconds": {
                                      "maximum": 86399,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "media_type": {
                                      "description": "`image`, `video`, `audio`, or `file` identifies the outbound Instagram attachment type.",
                                      "enum": [
                                        "image",
                                        "video",
                                        "audio",
                                        "file"
                                      ],
                                      "type": "string"
                                    },
                                    "type": {
                                      "const": "send_media",
                                      "type": "string"
                                    },
                                    "url": {
                                      "pattern": "^(?![\\s\\S]*[\\u0000\\uD800-\\uDFFF])[Hh][Tt][Tt][Pp][Ss]?:\\/\\/[^\\s\\/:?#%]+(?::[0-9]{1,5})?(?:[\\/?#](?:[^\\s%]|%[0-9A-Fa-f]{2})*)?$",
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "delay_seconds",
                                    "media_type",
                                    "url"
                                  ],
                                  "type": "object"
                                },
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "cards": {
                                      "items": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "buttons": {
                                            "items": {
                                              "additionalProperties": false,
                                              "properties": {
                                                "title": {
                                                  "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                                  "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                                  "type": "string"
                                                },
                                                "type": {
                                                  "const": "url",
                                                  "type": "string"
                                                },
                                                "url": {
                                                  "pattern": "^(?![\\s\\S]*[\\u0000\\uD800-\\uDFFF])[Hh][Tt][Tt][Pp][Ss]?:\\/\\/[^\\s\\/:?#%]+(?::[0-9]{1,5})?(?:[\\/?#](?:[^\\s%]|%[0-9A-Fa-f]{2})*)?$",
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "type",
                                                "title",
                                                "url"
                                              ],
                                              "type": "object"
                                            },
                                            "maxItems": 3,
                                            "minItems": 1,
                                            "type": "array"
                                          },
                                          "image_url": {
                                            "pattern": "^(?![\\s\\S]*[\\u0000\\uD800-\\uDFFF])[Hh][Tt][Tt][Pp][Ss]?:\\/\\/[^\\s\\/:?#%]+(?::[0-9]{1,5})?(?:[\\/?#](?:[^\\s%]|%[0-9A-Fa-f]{2})*)?$",
                                            "type": "string"
                                          },
                                          "subtitle": {
                                            "description": "Card subtitle. Length is 0 through 80 Unicode scalar values.",
                                            "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){0,80}$",
                                            "type": "string"
                                          },
                                          "title": {
                                            "description": "Card title. Length is 1 through 80 Unicode scalar values.",
                                            "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,80}$",
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "title",
                                          "image_url",
                                          "buttons"
                                        ],
                                        "type": "object"
                                      },
                                      "maxItems": 10,
                                      "minItems": 1,
                                      "type": "array"
                                    },
                                    "delay_seconds": {
                                      "maximum": 86399,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "type": {
                                      "const": "send_carousel",
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "delay_seconds",
                                    "cards"
                                  ],
                                  "type": "object"
                                },
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "buttons": {
                                      "additionalProperties": false,
                                      "properties": {
                                        "confirm_title": {
                                          "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                          "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                          "type": "string"
                                        },
                                        "open_profile_title": {
                                          "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                          "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "open_profile_title",
                                        "confirm_title"
                                      ],
                                      "type": "object"
                                    },
                                    "delay_seconds": {
                                      "maximum": 86399,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "expires_in_seconds": {
                                      "maximum": 604800,
                                      "minimum": 60,
                                      "type": "integer"
                                    },
                                    "max_attempts": {
                                      "maximum": 10,
                                      "minimum": 1,
                                      "type": "integer"
                                    },
                                    "message": {
                                      "description": "Message text. Length is 1 through 640 Unicode scalar values.",
                                      "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,640}$",
                                      "type": "string"
                                    },
                                    "not_following_message": {
                                      "anyOf": [
                                        {
                                          "description": "Message text. Length is 1 through 640 Unicode scalar values.",
                                          "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,640}$",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "description": "Message text. Length is 1 through 640 Unicode scalar values."
                                    },
                                    "recheck_after_seconds": {
                                      "maximum": 86400,
                                      "minimum": 60,
                                      "type": "integer"
                                    },
                                    "retry_exhausted_action": {
                                      "description": "`continue` — continue after the retry limit; `stop` — end the active gate after the retry limit.",
                                      "enum": [
                                        "continue",
                                        "stop"
                                      ],
                                      "type": "string"
                                    },
                                    "type": {
                                      "const": "ask_to_follow",
                                      "type": "string"
                                    },
                                    "verification_mode": {
                                      "description": "`trusted_click` — trust the confirmation click; `strict` — verify follow status with Instagram.",
                                      "enum": [
                                        "trusted_click",
                                        "strict"
                                      ],
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "delay_seconds",
                                    "message",
                                    "buttons",
                                    "verification_mode",
                                    "not_following_message",
                                    "max_attempts",
                                    "retry_exhausted_action",
                                    "recheck_after_seconds",
                                    "expires_in_seconds"
                                  ],
                                  "type": "object"
                                },
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "delay_seconds": {
                                      "maximum": 86399,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "expires_in_seconds": {
                                      "maximum": 604800,
                                      "minimum": 60,
                                      "type": "integer"
                                    },
                                    "max_attempts": {
                                      "maximum": 5,
                                      "minimum": 1,
                                      "type": "integer"
                                    },
                                    "message": {
                                      "description": "Message text. Length is 1 through 1000 Unicode scalar values.",
                                      "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,1000}$",
                                      "type": "string"
                                    },
                                    "retry_exhausted_action": {
                                      "description": "`continue` — continue after the retry limit; `stop` — end the active gate after the retry limit.",
                                      "enum": [
                                        "continue",
                                        "stop"
                                      ],
                                      "type": "string"
                                    },
                                    "retry_message": {
                                      "description": "Message text. Length is 1 through 1000 Unicode scalar values.",
                                      "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,1000}$",
                                      "type": "string"
                                    },
                                    "type": {
                                      "const": "ask_for_email",
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "delay_seconds",
                                    "message",
                                    "retry_message",
                                    "max_attempts",
                                    "retry_exhausted_action",
                                    "expires_in_seconds"
                                  ],
                                  "type": "object"
                                },
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "delay_seconds": {
                                      "maximum": 86399,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "expires_in_seconds": {
                                      "maximum": 604800,
                                      "minimum": 60,
                                      "type": "integer"
                                    },
                                    "max_attempts": {
                                      "maximum": 5,
                                      "minimum": 1,
                                      "type": "integer"
                                    },
                                    "message": {
                                      "description": "Message text. Length is 1 through 1000 Unicode scalar values.",
                                      "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,1000}$",
                                      "type": "string"
                                    },
                                    "retry_exhausted_action": {
                                      "description": "`continue` — continue after the retry limit; `stop` — end the active gate after the retry limit.",
                                      "enum": [
                                        "continue",
                                        "stop"
                                      ],
                                      "type": "string"
                                    },
                                    "retry_message": {
                                      "description": "Message text. Length is 1 through 1000 Unicode scalar values.",
                                      "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,1000}$",
                                      "type": "string"
                                    },
                                    "type": {
                                      "const": "ask_for_phone",
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "delay_seconds",
                                    "message",
                                    "retry_message",
                                    "max_attempts",
                                    "retry_exhausted_action",
                                    "expires_in_seconds"
                                  ],
                                  "type": "object"
                                },
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "delay_seconds": {
                                      "maximum": 2592000,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "tag_id": {
                                      "format": "uuid",
                                      "type": "string"
                                    },
                                    "type": {
                                      "const": "add_contact_tag",
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "delay_seconds",
                                    "tag_id"
                                  ],
                                  "type": "object"
                                },
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "type": {
                                      "const": "finish",
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "type"
                                  ],
                                  "type": "object"
                                }
                              ]
                            },
                            "maxItems": 20,
                            "minItems": 1,
                            "type": "array"
                          }
                        },
                        "required": [
                          "actions"
                        ],
                        "type": "object"
                      }
                    ]
                  },
                  "opening": {
                    "additionalProperties": false,
                    "properties": {
                      "direct_message": {
                        "additionalProperties": false,
                        "properties": {
                          "delay_seconds": {
                            "maximum": 86400,
                            "minimum": 0,
                            "type": "integer"
                          },
                          "message": {
                            "anyOf": [
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "buttons": {
                                    "items": {
                                      "anyOf": [
                                        {
                                          "additionalProperties": false,
                                          "properties": {
                                            "title": {
                                              "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                              "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                              "type": "string"
                                            },
                                            "type": {
                                              "const": "start_follow_up",
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "title"
                                          ],
                                          "type": "object"
                                        },
                                        {
                                          "additionalProperties": false,
                                          "properties": {
                                            "title": {
                                              "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                              "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                              "type": "string"
                                            },
                                            "type": {
                                              "const": "url",
                                              "type": "string"
                                            },
                                            "url": {
                                              "pattern": "^(?![\\s\\S]*[\\u0000\\uD800-\\uDFFF])[Hh][Tt][Tt][Pp][Ss]?:\\/\\/[^\\s\\/:?#%]+(?::[0-9]{1,5})?(?:[\\/?#](?:[^\\s%]|%[0-9A-Fa-f]{2})*)?$",
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "title",
                                            "url"
                                          ],
                                          "type": "object"
                                        }
                                      ]
                                    },
                                    "maxItems": 0,
                                    "minItems": 0,
                                    "type": "array"
                                  },
                                  "text": {
                                    "description": "Message text. Length is 1 through 1000 Unicode scalar values.",
                                    "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,1000}$",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "text",
                                  "buttons"
                                ],
                                "type": "object"
                              },
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "buttons": {
                                    "items": {
                                      "anyOf": [
                                        {
                                          "additionalProperties": false,
                                          "properties": {
                                            "title": {
                                              "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                              "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                              "type": "string"
                                            },
                                            "type": {
                                              "const": "start_follow_up",
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "title"
                                          ],
                                          "type": "object"
                                        },
                                        {
                                          "additionalProperties": false,
                                          "properties": {
                                            "title": {
                                              "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                              "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                              "type": "string"
                                            },
                                            "type": {
                                              "const": "url",
                                              "type": "string"
                                            },
                                            "url": {
                                              "pattern": "^(?![\\s\\S]*[\\u0000\\uD800-\\uDFFF])[Hh][Tt][Tt][Pp][Ss]?:\\/\\/[^\\s\\/:?#%]+(?::[0-9]{1,5})?(?:[\\/?#](?:[^\\s%]|%[0-9A-Fa-f]{2})*)?$",
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "title",
                                            "url"
                                          ],
                                          "type": "object"
                                        }
                                      ]
                                    },
                                    "maxItems": 3,
                                    "minItems": 1,
                                    "type": "array"
                                  },
                                  "text": {
                                    "description": "Message text. Length is 1 through 640 Unicode scalar values.",
                                    "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,640}$",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "text",
                                  "buttons"
                                ],
                                "type": "object"
                              }
                            ]
                          }
                        },
                        "required": [
                          "delay_seconds",
                          "message"
                        ],
                        "type": "object"
                      },
                      "public_reply": {
                        "anyOf": [
                          {
                            "additionalProperties": false,
                            "properties": {
                              "enabled": {
                                "const": false,
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "enabled"
                            ],
                            "type": "object"
                          },
                          {
                            "additionalProperties": false,
                            "properties": {
                              "delay_seconds": {
                                "maximum": 86400,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "enabled": {
                                "const": true,
                                "type": "boolean"
                              },
                              "max_per_post": {
                                "maximum": 200,
                                "minimum": 1,
                                "type": "integer"
                              },
                              "mention_mode": {
                                "description": "`none` — do not prefix a mention; `contact` — mention the contact; `account` — mention the account.",
                                "enum": [
                                  "none",
                                  "contact",
                                  "account"
                                ],
                                "type": "string"
                              },
                              "messages": {
                                "items": {
                                  "description": "Public reply message. Length is 1 through 280 Unicode scalar values.",
                                  "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,280}$",
                                  "type": "string"
                                },
                                "minItems": 1,
                                "type": "array"
                              },
                              "rotation": {
                                "description": "`random` — choose a response randomly; `sequential` — rotate responses in their submitted order.",
                                "enum": [
                                  "random",
                                  "sequential"
                                ],
                                "type": "string"
                              }
                            },
                            "required": [
                              "enabled",
                              "delay_seconds",
                              "messages",
                              "rotation",
                              "mention_mode",
                              "max_per_post"
                            ],
                            "type": "object"
                          }
                        ]
                      }
                    },
                    "required": [
                      "public_reply",
                      "direct_message"
                    ],
                    "type": "object"
                  },
                  "trigger": {
                    "anyOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "keywords": {
                            "anyOf": [
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "mode": {
                                    "const": "any",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "mode"
                                ],
                                "type": "object"
                              },
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "match_mode": {
                                    "description": "`whole_word` — match an isolated keyword or phrase; `substring` — match it anywhere in the text.",
                                    "enum": [
                                      "whole_word",
                                      "substring"
                                    ],
                                    "type": "string"
                                  },
                                  "mode": {
                                    "const": "specific",
                                    "type": "string"
                                  },
                                  "values": {
                                    "items": {
                                      "description": "Keyword or phrase. Length is 1 through 100 Unicode scalar values.",
                                      "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,100}$",
                                      "type": "string"
                                    },
                                    "maxItems": 50,
                                    "minItems": 1,
                                    "type": "array"
                                  }
                                },
                                "required": [
                                  "mode",
                                  "match_mode",
                                  "values"
                                ],
                                "type": "object"
                              }
                            ]
                          },
                          "publication": {
                            "anyOf": [
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "mode": {
                                    "const": "all",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "mode"
                                ],
                                "type": "object"
                              },
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "mode": {
                                    "const": "next_published",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "mode"
                                ],
                                "type": "object"
                              },
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "mode": {
                                    "const": "specific",
                                    "type": "string"
                                  },
                                  "reference": {
                                    "anyOf": [
                                      {
                                        "additionalProperties": false,
                                        "properties": {
                                          "type": {
                                            "const": "id",
                                            "type": "string"
                                          },
                                          "value": {
                                            "description": "Opaque Instagram media ID returned by Levios discovery. Use 1 through 256 printable ASCII characters.",
                                            "pattern": "^[!-~]{1,256}$",
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "value"
                                        ],
                                        "type": "object"
                                      },
                                      {
                                        "additionalProperties": false,
                                        "properties": {
                                          "type": {
                                            "const": "url",
                                            "type": "string"
                                          },
                                          "value": {
                                            "pattern": "^(?![\\s\\S]*[\\u0000\\uD800-\\uDFFF])[Hh][Tt][Tt][Pp][Ss]:\\/\\/(?:[Ww][Ww][Ww]\\.)?[Ii][Nn][Ss][Tt][Aa][Gg][Rr][Aa][Mm]\\.[Cc][Oo][Mm]\\/(?:[Pp]|[Rr][Ee][Ee][Ll])\\/[A-Za-z0-9_-]+\\/?(?:[?#](?:[^\\s%]|%[0-9A-Fa-f]{2})*)?$",
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "value"
                                        ],
                                        "type": "object"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "mode",
                                  "reference"
                                ],
                                "type": "object"
                              }
                            ]
                          },
                          "type": {
                            "const": "comment",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "publication",
                          "keywords"
                        ],
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "properties": {
                          "keywords": {
                            "anyOf": [
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "mode": {
                                    "const": "any",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "mode"
                                ],
                                "type": "object"
                              },
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "match_mode": {
                                    "description": "`whole_word` — match an isolated keyword or phrase; `substring` — match it anywhere in the text.",
                                    "enum": [
                                      "whole_word",
                                      "substring"
                                    ],
                                    "type": "string"
                                  },
                                  "mode": {
                                    "const": "specific",
                                    "type": "string"
                                  },
                                  "values": {
                                    "items": {
                                      "description": "Keyword or phrase. Length is 1 through 100 Unicode scalar values.",
                                      "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,100}$",
                                      "type": "string"
                                    },
                                    "maxItems": 50,
                                    "minItems": 1,
                                    "type": "array"
                                  }
                                },
                                "required": [
                                  "mode",
                                  "match_mode",
                                  "values"
                                ],
                                "type": "object"
                              }
                            ]
                          },
                          "response_type": {
                            "const": "text",
                            "type": "string"
                          },
                          "story": {
                            "anyOf": [
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "mode": {
                                    "const": "any",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "mode"
                                ],
                                "type": "object"
                              },
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "mode": {
                                    "const": "specific",
                                    "type": "string"
                                  },
                                  "reference": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "type": {
                                        "const": "id",
                                        "type": "string"
                                      },
                                      "value": {
                                        "description": "Opaque Instagram media ID returned by Levios discovery. Use 1 through 256 printable ASCII characters.",
                                        "pattern": "^[!-~]{1,256}$",
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "value"
                                    ],
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "mode",
                                  "reference"
                                ],
                                "type": "object"
                              }
                            ]
                          },
                          "type": {
                            "const": "story_reply",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "response_type",
                          "story",
                          "keywords"
                        ],
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "properties": {
                          "reactions": {
                            "anyOf": [
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "mode": {
                                    "const": "any",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "mode"
                                ],
                                "type": "object"
                              },
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "emojis": {
                                    "items": {
                                      "description": "Reaction emoji. Length is 1 through 16 Unicode scalar values.",
                                      "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,16}$",
                                      "type": "string"
                                    },
                                    "maxItems": 50,
                                    "minItems": 1,
                                    "type": "array"
                                  },
                                  "mode": {
                                    "const": "specific",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "mode",
                                  "emojis"
                                ],
                                "type": "object"
                              }
                            ]
                          },
                          "response_type": {
                            "const": "reaction",
                            "type": "string"
                          },
                          "story": {
                            "anyOf": [
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "mode": {
                                    "const": "any",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "mode"
                                ],
                                "type": "object"
                              },
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "mode": {
                                    "const": "specific",
                                    "type": "string"
                                  },
                                  "reference": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "type": {
                                        "const": "id",
                                        "type": "string"
                                      },
                                      "value": {
                                        "description": "Opaque Instagram media ID returned by Levios discovery. Use 1 through 256 printable ASCII characters.",
                                        "pattern": "^[!-~]{1,256}$",
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "value"
                                    ],
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "mode",
                                  "reference"
                                ],
                                "type": "object"
                              }
                            ]
                          },
                          "type": {
                            "const": "story_reply",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "response_type",
                          "story",
                          "reactions"
                        ],
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "properties": {
                          "keywords": {
                            "additionalProperties": false,
                            "properties": {
                              "match_mode": {
                                "description": "`whole_word` — match an isolated keyword or phrase; `substring` — match it anywhere in the text.",
                                "enum": [
                                  "whole_word",
                                  "substring"
                                ],
                                "type": "string"
                              },
                              "mode": {
                                "const": "specific",
                                "type": "string"
                              },
                              "values": {
                                "items": {
                                  "description": "Keyword or phrase. Length is 1 through 100 Unicode scalar values.",
                                  "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,100}$",
                                  "type": "string"
                                },
                                "maxItems": 50,
                                "minItems": 1,
                                "type": "array"
                              }
                            },
                            "required": [
                              "mode",
                              "match_mode",
                              "values"
                            ],
                            "type": "object"
                          },
                          "type": {
                            "const": "dm_keyword",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "keywords"
                        ],
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "properties": {
                          "type": {
                            "const": "story_mention",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type"
                        ],
                        "type": "object"
                      }
                    ]
                  }
                },
                "required": [
                  "contact_filter",
                  "opening",
                  "follow_up",
                  "extras",
                  "trigger"
                ],
                "type": "object"
              },
              "name": {
                "description": "Automation name. Use 1 through 120 Unicode scalar values, without surrounding whitespace or control characters.",
                "pattern": "^(?!\\s)(?![\\s\\S]*\\s$)(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000-\\u001F\\u007F-\\u009F\\uD800-\\uDFFF])){1,120}$",
                "type": "string"
              },
              "status": {
                "description": "`draft` — save without processing triggers; `live` — atomically publish and activate.",
                "enum": [
                  "draft",
                  "live"
                ],
                "type": "string"
              }
            },
            "required": [
              "account_id",
              "name",
              "status",
              "configuration"
            ],
            "type": "object"
          }
        },
        "$id": "https://levios.app/schemas/public-automation-create-v1",
        "$ref": "#/components/schemas/PublicAutomationCreateV1/$defs/PublicAutomationCreateV1",
        "$schema": "https://json-schema.org/draft/2019-09/schema#",
        "title": "PublicAutomationCreateV1",
        "x-levios-max-serialized-bytes": 1048576,
        "x-levios-schema-version": 1
      },
      "PublicAutomationDetailResponseV1": {
        "$defs": {
          "PublicAutomationDetailResponseV1": {
            "additionalProperties": false,
            "properties": {
              "automation": {
                "anyOf": [
                  {
                    "additionalProperties": false,
                    "properties": {
                      "account_id": {
                        "format": "uuid",
                        "type": "string"
                      },
                      "authoring_compatibility": {
                        "const": "public_v1",
                        "type": "string"
                      },
                      "configuration": {
                        "additionalProperties": false,
                        "properties": {
                          "contact_filter": {
                            "description": "`anyone` — every eligible contact; `followers_only` — confirmed followers; `non_followers_only` — confirmed non-followers; `previous_dm_contacts` — contacts with an inbound DM before this trigger; `existing_contacts` — contacts already known before this trigger.",
                            "enum": [
                              "anyone",
                              "followers_only",
                              "non_followers_only",
                              "previous_dm_contacts",
                              "existing_contacts"
                            ],
                            "type": "string"
                          },
                          "extras": {
                            "additionalProperties": false,
                            "properties": {
                              "cooldown": {
                                "anyOf": [
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "mode": {
                                        "const": "none",
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "mode"
                                    ],
                                    "type": "object"
                                  },
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "mode": {
                                        "const": "fixed",
                                        "type": "string"
                                      },
                                      "seconds": {
                                        "maximum": 2592000,
                                        "minimum": 1,
                                        "type": "integer"
                                      }
                                    },
                                    "required": [
                                      "mode",
                                      "seconds"
                                    ],
                                    "type": "object"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "cooldown"
                            ],
                            "type": "object"
                          },
                          "follow_up": {
                            "anyOf": [
                              {
                                "type": "null"
                              },
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "actions": {
                                    "items": {
                                      "anyOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "additionalProperties": false,
                                              "properties": {
                                                "buttons": {
                                                  "items": {
                                                    "additionalProperties": false,
                                                    "properties": {
                                                      "title": {
                                                        "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                                        "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                                        "type": "string"
                                                      },
                                                      "type": {
                                                        "const": "url",
                                                        "type": "string"
                                                      },
                                                      "url": {
                                                        "pattern": "^(?![\\s\\S]*[\\u0000\\uD800-\\uDFFF])[Hh][Tt][Tt][Pp][Ss]?:\\/\\/[^\\s\\/:?#%]+(?::[0-9]{1,5})?(?:[\\/?#](?:[^\\s%]|%[0-9A-Fa-f]{2})*)?$",
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "title",
                                                      "url"
                                                    ],
                                                    "type": "object"
                                                  },
                                                  "maxItems": 0,
                                                  "minItems": 0,
                                                  "type": "array"
                                                },
                                                "delay_seconds": {
                                                  "maximum": 86399,
                                                  "minimum": 0,
                                                  "type": "integer"
                                                },
                                                "text": {
                                                  "description": "Message text. Length is 1 through 1000 Unicode scalar values.",
                                                  "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,1000}$",
                                                  "type": "string"
                                                },
                                                "type": {
                                                  "const": "send_message",
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "type",
                                                "delay_seconds",
                                                "text",
                                                "buttons"
                                              ],
                                              "type": "object"
                                            },
                                            {
                                              "additionalProperties": false,
                                              "properties": {
                                                "buttons": {
                                                  "items": {
                                                    "additionalProperties": false,
                                                    "properties": {
                                                      "title": {
                                                        "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                                        "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                                        "type": "string"
                                                      },
                                                      "type": {
                                                        "const": "url",
                                                        "type": "string"
                                                      },
                                                      "url": {
                                                        "pattern": "^(?![\\s\\S]*[\\u0000\\uD800-\\uDFFF])[Hh][Tt][Tt][Pp][Ss]?:\\/\\/[^\\s\\/:?#%]+(?::[0-9]{1,5})?(?:[\\/?#](?:[^\\s%]|%[0-9A-Fa-f]{2})*)?$",
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "title",
                                                      "url"
                                                    ],
                                                    "type": "object"
                                                  },
                                                  "maxItems": 3,
                                                  "minItems": 1,
                                                  "type": "array"
                                                },
                                                "delay_seconds": {
                                                  "maximum": 86399,
                                                  "minimum": 0,
                                                  "type": "integer"
                                                },
                                                "text": {
                                                  "description": "Message text. Length is 1 through 640 Unicode scalar values.",
                                                  "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,640}$",
                                                  "type": "string"
                                                },
                                                "type": {
                                                  "const": "send_message",
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "type",
                                                "delay_seconds",
                                                "text",
                                                "buttons"
                                              ],
                                              "type": "object"
                                            }
                                          ]
                                        },
                                        {
                                          "additionalProperties": false,
                                          "properties": {
                                            "delay_seconds": {
                                              "maximum": 86399,
                                              "minimum": 0,
                                              "type": "integer"
                                            },
                                            "media_type": {
                                              "description": "`image`, `video`, `audio`, or `file` identifies the outbound Instagram attachment type.",
                                              "enum": [
                                                "image",
                                                "video",
                                                "audio",
                                                "file"
                                              ],
                                              "type": "string"
                                            },
                                            "type": {
                                              "const": "send_media",
                                              "type": "string"
                                            },
                                            "url": {
                                              "pattern": "^(?![\\s\\S]*[\\u0000\\uD800-\\uDFFF])[Hh][Tt][Tt][Pp][Ss]?:\\/\\/[^\\s\\/:?#%]+(?::[0-9]{1,5})?(?:[\\/?#](?:[^\\s%]|%[0-9A-Fa-f]{2})*)?$",
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "delay_seconds",
                                            "media_type",
                                            "url"
                                          ],
                                          "type": "object"
                                        },
                                        {
                                          "additionalProperties": false,
                                          "properties": {
                                            "cards": {
                                              "items": {
                                                "additionalProperties": false,
                                                "properties": {
                                                  "buttons": {
                                                    "items": {
                                                      "additionalProperties": false,
                                                      "properties": {
                                                        "title": {
                                                          "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                                          "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                                          "type": "string"
                                                        },
                                                        "type": {
                                                          "const": "url",
                                                          "type": "string"
                                                        },
                                                        "url": {
                                                          "pattern": "^(?![\\s\\S]*[\\u0000\\uD800-\\uDFFF])[Hh][Tt][Tt][Pp][Ss]?:\\/\\/[^\\s\\/:?#%]+(?::[0-9]{1,5})?(?:[\\/?#](?:[^\\s%]|%[0-9A-Fa-f]{2})*)?$",
                                                          "type": "string"
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "title",
                                                        "url"
                                                      ],
                                                      "type": "object"
                                                    },
                                                    "maxItems": 3,
                                                    "minItems": 1,
                                                    "type": "array"
                                                  },
                                                  "image_url": {
                                                    "pattern": "^(?![\\s\\S]*[\\u0000\\uD800-\\uDFFF])[Hh][Tt][Tt][Pp][Ss]?:\\/\\/[^\\s\\/:?#%]+(?::[0-9]{1,5})?(?:[\\/?#](?:[^\\s%]|%[0-9A-Fa-f]{2})*)?$",
                                                    "type": "string"
                                                  },
                                                  "subtitle": {
                                                    "description": "Card subtitle. Length is 0 through 80 Unicode scalar values.",
                                                    "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){0,80}$",
                                                    "type": "string"
                                                  },
                                                  "title": {
                                                    "description": "Card title. Length is 1 through 80 Unicode scalar values.",
                                                    "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,80}$",
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "title",
                                                  "image_url",
                                                  "buttons"
                                                ],
                                                "type": "object"
                                              },
                                              "maxItems": 10,
                                              "minItems": 1,
                                              "type": "array"
                                            },
                                            "delay_seconds": {
                                              "maximum": 86399,
                                              "minimum": 0,
                                              "type": "integer"
                                            },
                                            "type": {
                                              "const": "send_carousel",
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "delay_seconds",
                                            "cards"
                                          ],
                                          "type": "object"
                                        },
                                        {
                                          "additionalProperties": false,
                                          "properties": {
                                            "buttons": {
                                              "additionalProperties": false,
                                              "properties": {
                                                "confirm_title": {
                                                  "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                                  "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                                  "type": "string"
                                                },
                                                "open_profile_title": {
                                                  "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                                  "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "open_profile_title",
                                                "confirm_title"
                                              ],
                                              "type": "object"
                                            },
                                            "delay_seconds": {
                                              "maximum": 86399,
                                              "minimum": 0,
                                              "type": "integer"
                                            },
                                            "expires_in_seconds": {
                                              "maximum": 604800,
                                              "minimum": 60,
                                              "type": "integer"
                                            },
                                            "max_attempts": {
                                              "maximum": 10,
                                              "minimum": 1,
                                              "type": "integer"
                                            },
                                            "message": {
                                              "description": "Message text. Length is 1 through 640 Unicode scalar values.",
                                              "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,640}$",
                                              "type": "string"
                                            },
                                            "not_following_message": {
                                              "anyOf": [
                                                {
                                                  "description": "Message text. Length is 1 through 640 Unicode scalar values.",
                                                  "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,640}$",
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ],
                                              "description": "Message text. Length is 1 through 640 Unicode scalar values."
                                            },
                                            "recheck_after_seconds": {
                                              "maximum": 86400,
                                              "minimum": 60,
                                              "type": "integer"
                                            },
                                            "retry_exhausted_action": {
                                              "description": "`continue` — continue after the retry limit; `stop` — end the active gate after the retry limit.",
                                              "enum": [
                                                "continue",
                                                "stop"
                                              ],
                                              "type": "string"
                                            },
                                            "type": {
                                              "const": "ask_to_follow",
                                              "type": "string"
                                            },
                                            "verification_mode": {
                                              "description": "`trusted_click` — trust the confirmation click; `strict` — verify follow status with Instagram.",
                                              "enum": [
                                                "trusted_click",
                                                "strict"
                                              ],
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "delay_seconds",
                                            "message",
                                            "buttons",
                                            "verification_mode",
                                            "not_following_message",
                                            "max_attempts",
                                            "retry_exhausted_action",
                                            "recheck_after_seconds",
                                            "expires_in_seconds"
                                          ],
                                          "type": "object"
                                        },
                                        {
                                          "additionalProperties": false,
                                          "properties": {
                                            "delay_seconds": {
                                              "maximum": 86399,
                                              "minimum": 0,
                                              "type": "integer"
                                            },
                                            "expires_in_seconds": {
                                              "maximum": 604800,
                                              "minimum": 60,
                                              "type": "integer"
                                            },
                                            "max_attempts": {
                                              "maximum": 5,
                                              "minimum": 1,
                                              "type": "integer"
                                            },
                                            "message": {
                                              "description": "Message text. Length is 1 through 1000 Unicode scalar values.",
                                              "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,1000}$",
                                              "type": "string"
                                            },
                                            "retry_exhausted_action": {
                                              "description": "`continue` — continue after the retry limit; `stop` — end the active gate after the retry limit.",
                                              "enum": [
                                                "continue",
                                                "stop"
                                              ],
                                              "type": "string"
                                            },
                                            "retry_message": {
                                              "description": "Message text. Length is 1 through 1000 Unicode scalar values.",
                                              "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,1000}$",
                                              "type": "string"
                                            },
                                            "type": {
                                              "const": "ask_for_email",
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "delay_seconds",
                                            "message",
                                            "retry_message",
                                            "max_attempts",
                                            "retry_exhausted_action",
                                            "expires_in_seconds"
                                          ],
                                          "type": "object"
                                        },
                                        {
                                          "additionalProperties": false,
                                          "properties": {
                                            "delay_seconds": {
                                              "maximum": 86399,
                                              "minimum": 0,
                                              "type": "integer"
                                            },
                                            "expires_in_seconds": {
                                              "maximum": 604800,
                                              "minimum": 60,
                                              "type": "integer"
                                            },
                                            "max_attempts": {
                                              "maximum": 5,
                                              "minimum": 1,
                                              "type": "integer"
                                            },
                                            "message": {
                                              "description": "Message text. Length is 1 through 1000 Unicode scalar values.",
                                              "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,1000}$",
                                              "type": "string"
                                            },
                                            "retry_exhausted_action": {
                                              "description": "`continue` — continue after the retry limit; `stop` — end the active gate after the retry limit.",
                                              "enum": [
                                                "continue",
                                                "stop"
                                              ],
                                              "type": "string"
                                            },
                                            "retry_message": {
                                              "description": "Message text. Length is 1 through 1000 Unicode scalar values.",
                                              "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,1000}$",
                                              "type": "string"
                                            },
                                            "type": {
                                              "const": "ask_for_phone",
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "delay_seconds",
                                            "message",
                                            "retry_message",
                                            "max_attempts",
                                            "retry_exhausted_action",
                                            "expires_in_seconds"
                                          ],
                                          "type": "object"
                                        },
                                        {
                                          "additionalProperties": false,
                                          "properties": {
                                            "delay_seconds": {
                                              "maximum": 2592000,
                                              "minimum": 0,
                                              "type": "integer"
                                            },
                                            "tag_id": {
                                              "format": "uuid",
                                              "type": "string"
                                            },
                                            "type": {
                                              "const": "add_contact_tag",
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "delay_seconds",
                                            "tag_id"
                                          ],
                                          "type": "object"
                                        },
                                        {
                                          "additionalProperties": false,
                                          "properties": {
                                            "type": {
                                              "const": "finish",
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type"
                                          ],
                                          "type": "object"
                                        }
                                      ]
                                    },
                                    "maxItems": 20,
                                    "minItems": 1,
                                    "type": "array"
                                  }
                                },
                                "required": [
                                  "actions"
                                ],
                                "type": "object"
                              }
                            ]
                          },
                          "opening": {
                            "additionalProperties": false,
                            "properties": {
                              "direct_message": {
                                "additionalProperties": false,
                                "properties": {
                                  "delay_seconds": {
                                    "maximum": 86400,
                                    "minimum": 0,
                                    "type": "integer"
                                  },
                                  "message": {
                                    "anyOf": [
                                      {
                                        "additionalProperties": false,
                                        "properties": {
                                          "buttons": {
                                            "items": {
                                              "anyOf": [
                                                {
                                                  "additionalProperties": false,
                                                  "properties": {
                                                    "title": {
                                                      "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                                      "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                                      "type": "string"
                                                    },
                                                    "type": {
                                                      "const": "start_follow_up",
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "title"
                                                  ],
                                                  "type": "object"
                                                },
                                                {
                                                  "additionalProperties": false,
                                                  "properties": {
                                                    "title": {
                                                      "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                                      "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                                      "type": "string"
                                                    },
                                                    "type": {
                                                      "const": "url",
                                                      "type": "string"
                                                    },
                                                    "url": {
                                                      "pattern": "^(?![\\s\\S]*[\\u0000\\uD800-\\uDFFF])[Hh][Tt][Tt][Pp][Ss]?:\\/\\/[^\\s\\/:?#%]+(?::[0-9]{1,5})?(?:[\\/?#](?:[^\\s%]|%[0-9A-Fa-f]{2})*)?$",
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "title",
                                                    "url"
                                                  ],
                                                  "type": "object"
                                                }
                                              ]
                                            },
                                            "maxItems": 0,
                                            "minItems": 0,
                                            "type": "array"
                                          },
                                          "text": {
                                            "description": "Message text. Length is 1 through 1000 Unicode scalar values.",
                                            "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,1000}$",
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "buttons"
                                        ],
                                        "type": "object"
                                      },
                                      {
                                        "additionalProperties": false,
                                        "properties": {
                                          "buttons": {
                                            "items": {
                                              "anyOf": [
                                                {
                                                  "additionalProperties": false,
                                                  "properties": {
                                                    "title": {
                                                      "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                                      "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                                      "type": "string"
                                                    },
                                                    "type": {
                                                      "const": "start_follow_up",
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "title"
                                                  ],
                                                  "type": "object"
                                                },
                                                {
                                                  "additionalProperties": false,
                                                  "properties": {
                                                    "title": {
                                                      "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                                      "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                                      "type": "string"
                                                    },
                                                    "type": {
                                                      "const": "url",
                                                      "type": "string"
                                                    },
                                                    "url": {
                                                      "pattern": "^(?![\\s\\S]*[\\u0000\\uD800-\\uDFFF])[Hh][Tt][Tt][Pp][Ss]?:\\/\\/[^\\s\\/:?#%]+(?::[0-9]{1,5})?(?:[\\/?#](?:[^\\s%]|%[0-9A-Fa-f]{2})*)?$",
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "title",
                                                    "url"
                                                  ],
                                                  "type": "object"
                                                }
                                              ]
                                            },
                                            "maxItems": 3,
                                            "minItems": 1,
                                            "type": "array"
                                          },
                                          "text": {
                                            "description": "Message text. Length is 1 through 640 Unicode scalar values.",
                                            "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,640}$",
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "buttons"
                                        ],
                                        "type": "object"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "delay_seconds",
                                  "message"
                                ],
                                "type": "object"
                              },
                              "public_reply": {
                                "anyOf": [
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "enabled": {
                                        "const": false,
                                        "type": "boolean"
                                      }
                                    },
                                    "required": [
                                      "enabled"
                                    ],
                                    "type": "object"
                                  },
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "delay_seconds": {
                                        "maximum": 86400,
                                        "minimum": 0,
                                        "type": "integer"
                                      },
                                      "enabled": {
                                        "const": true,
                                        "type": "boolean"
                                      },
                                      "max_per_post": {
                                        "maximum": 200,
                                        "minimum": 1,
                                        "type": "integer"
                                      },
                                      "mention_mode": {
                                        "description": "`none` — do not prefix a mention; `contact` — mention the contact; `account` — mention the account.",
                                        "enum": [
                                          "none",
                                          "contact",
                                          "account"
                                        ],
                                        "type": "string"
                                      },
                                      "messages": {
                                        "items": {
                                          "description": "Public reply message. Length is 1 through 280 Unicode scalar values.",
                                          "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,280}$",
                                          "type": "string"
                                        },
                                        "minItems": 1,
                                        "type": "array"
                                      },
                                      "rotation": {
                                        "description": "`random` — choose a response randomly; `sequential` — rotate responses in their submitted order.",
                                        "enum": [
                                          "random",
                                          "sequential"
                                        ],
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "enabled",
                                      "delay_seconds",
                                      "messages",
                                      "rotation",
                                      "mention_mode",
                                      "max_per_post"
                                    ],
                                    "type": "object"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "public_reply",
                              "direct_message"
                            ],
                            "type": "object"
                          },
                          "trigger": {
                            "additionalProperties": false,
                            "properties": {
                              "keywords": {
                                "anyOf": [
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "mode": {
                                        "const": "any",
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "mode"
                                    ],
                                    "type": "object"
                                  },
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "match_mode": {
                                        "description": "`whole_word` — match an isolated keyword or phrase; `substring` — match it anywhere in the text.",
                                        "enum": [
                                          "whole_word",
                                          "substring"
                                        ],
                                        "type": "string"
                                      },
                                      "mode": {
                                        "const": "specific",
                                        "type": "string"
                                      },
                                      "values": {
                                        "items": {
                                          "description": "Keyword or phrase. Length is 1 through 100 Unicode scalar values.",
                                          "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,100}$",
                                          "type": "string"
                                        },
                                        "maxItems": 50,
                                        "minItems": 1,
                                        "type": "array"
                                      }
                                    },
                                    "required": [
                                      "mode",
                                      "match_mode",
                                      "values"
                                    ],
                                    "type": "object"
                                  }
                                ]
                              },
                              "publication": {
                                "anyOf": [
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "mode": {
                                        "const": "all",
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "mode"
                                    ],
                                    "type": "object"
                                  },
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "mode": {
                                        "const": "next_published",
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "mode"
                                    ],
                                    "type": "object"
                                  },
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "mode": {
                                        "const": "specific",
                                        "type": "string"
                                      },
                                      "reference": {
                                        "anyOf": [
                                          {
                                            "additionalProperties": false,
                                            "properties": {
                                              "type": {
                                                "const": "id",
                                                "type": "string"
                                              },
                                              "value": {
                                                "description": "Opaque Instagram media ID returned by Levios discovery. Use 1 through 256 printable ASCII characters.",
                                                "pattern": "^[!-~]{1,256}$",
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "value"
                                            ],
                                            "type": "object"
                                          },
                                          {
                                            "additionalProperties": false,
                                            "properties": {
                                              "type": {
                                                "const": "url",
                                                "type": "string"
                                              },
                                              "value": {
                                                "pattern": "^(?![\\s\\S]*[\\u0000\\uD800-\\uDFFF])[Hh][Tt][Tt][Pp][Ss]:\\/\\/(?:[Ww][Ww][Ww]\\.)?[Ii][Nn][Ss][Tt][Aa][Gg][Rr][Aa][Mm]\\.[Cc][Oo][Mm]\\/(?:[Pp]|[Rr][Ee][Ee][Ll])\\/[A-Za-z0-9_-]+\\/?(?:[?#](?:[^\\s%]|%[0-9A-Fa-f]{2})*)?$",
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "value"
                                            ],
                                            "type": "object"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "mode",
                                      "reference"
                                    ],
                                    "type": "object"
                                  }
                                ]
                              },
                              "type": {
                                "const": "comment",
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "publication",
                              "keywords"
                            ],
                            "type": "object"
                          }
                        },
                        "required": [
                          "contact_filter",
                          "opening",
                          "follow_up",
                          "extras",
                          "trigger"
                        ],
                        "type": "object"
                      },
                      "created_at": {
                        "maxLength": 32,
                        "minLength": 20,
                        "pattern": "^(?:(?:(?!0000)\\d{4})-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|02-(?:0[1-9]|1\\d|2[0-8]))|(?:(?!0000)(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00))-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d{1,6})?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$",
                        "type": "string"
                      },
                      "draft_updated_at": {
                        "anyOf": [
                          {
                            "maxLength": 32,
                            "minLength": 20,
                            "pattern": "^(?:(?:(?!0000)\\d{4})-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|02-(?:0[1-9]|1\\d|2[0-8]))|(?:(?!0000)(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00))-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d{1,6})?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$",
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "has_unpublished_changes": {
                        "type": "boolean"
                      },
                      "id": {
                        "format": "uuid",
                        "type": "string"
                      },
                      "name": {
                        "description": "Automation name. Use 1 through 120 Unicode scalar values, without surrounding whitespace or control characters.",
                        "pattern": "^(?!\\s)(?![\\s\\S]*\\s$)(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000-\\u001F\\u007F-\\u009F\\uD800-\\uDFFF])){1,120}$",
                        "type": "string"
                      },
                      "status": {
                        "description": "`draft` — not published; `live` — processing triggers; `paused` — published but paused.",
                        "enum": [
                          "draft",
                          "live",
                          "paused"
                        ],
                        "type": "string"
                      },
                      "trigger_type": {
                        "const": "comment",
                        "type": "string"
                      },
                      "updated_at": {
                        "maxLength": 32,
                        "minLength": 20,
                        "pattern": "^(?:(?:(?!0000)\\d{4})-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|02-(?:0[1-9]|1\\d|2[0-8]))|(?:(?!0000)(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00))-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d{1,6})?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$",
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "account_id",
                      "name",
                      "status",
                      "has_unpublished_changes",
                      "draft_updated_at",
                      "created_at",
                      "updated_at",
                      "trigger_type",
                      "configuration",
                      "authoring_compatibility"
                    ],
                    "type": "object"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {
                      "account_id": {
                        "format": "uuid",
                        "type": "string"
                      },
                      "authoring_compatibility": {
                        "const": "public_v1",
                        "type": "string"
                      },
                      "configuration": {
                        "additionalProperties": false,
                        "properties": {
                          "contact_filter": {
                            "description": "`anyone` — every eligible contact; `followers_only` — confirmed followers; `non_followers_only` — confirmed non-followers; `previous_dm_contacts` — contacts with an inbound DM before this trigger; `existing_contacts` — contacts already known before this trigger.",
                            "enum": [
                              "anyone",
                              "followers_only",
                              "non_followers_only",
                              "previous_dm_contacts",
                              "existing_contacts"
                            ],
                            "type": "string"
                          },
                          "extras": {
                            "additionalProperties": false,
                            "properties": {
                              "cooldown": {
                                "anyOf": [
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "mode": {
                                        "const": "none",
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "mode"
                                    ],
                                    "type": "object"
                                  },
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "mode": {
                                        "const": "fixed",
                                        "type": "string"
                                      },
                                      "seconds": {
                                        "maximum": 2592000,
                                        "minimum": 1,
                                        "type": "integer"
                                      }
                                    },
                                    "required": [
                                      "mode",
                                      "seconds"
                                    ],
                                    "type": "object"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "cooldown"
                            ],
                            "type": "object"
                          },
                          "follow_up": {
                            "anyOf": [
                              {
                                "type": "null"
                              },
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "actions": {
                                    "items": {
                                      "anyOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "additionalProperties": false,
                                              "properties": {
                                                "buttons": {
                                                  "items": {
                                                    "additionalProperties": false,
                                                    "properties": {
                                                      "title": {
                                                        "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                                        "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                                        "type": "string"
                                                      },
                                                      "type": {
                                                        "const": "url",
                                                        "type": "string"
                                                      },
                                                      "url": {
                                                        "pattern": "^(?![\\s\\S]*[\\u0000\\uD800-\\uDFFF])[Hh][Tt][Tt][Pp][Ss]?:\\/\\/[^\\s\\/:?#%]+(?::[0-9]{1,5})?(?:[\\/?#](?:[^\\s%]|%[0-9A-Fa-f]{2})*)?$",
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "title",
                                                      "url"
                                                    ],
                                                    "type": "object"
                                                  },
                                                  "maxItems": 0,
                                                  "minItems": 0,
                                                  "type": "array"
                                                },
                                                "delay_seconds": {
                                                  "maximum": 86399,
                                                  "minimum": 0,
                                                  "type": "integer"
                                                },
                                                "text": {
                                                  "description": "Message text. Length is 1 through 1000 Unicode scalar values.",
                                                  "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,1000}$",
                                                  "type": "string"
                                                },
                                                "type": {
                                                  "const": "send_message",
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "type",
                                                "delay_seconds",
                                                "text",
                                                "buttons"
                                              ],
                                              "type": "object"
                                            },
                                            {
                                              "additionalProperties": false,
                                              "properties": {
                                                "buttons": {
                                                  "items": {
                                                    "additionalProperties": false,
                                                    "properties": {
                                                      "title": {
                                                        "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                                        "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                                        "type": "string"
                                                      },
                                                      "type": {
                                                        "const": "url",
                                                        "type": "string"
                                                      },
                                                      "url": {
                                                        "pattern": "^(?![\\s\\S]*[\\u0000\\uD800-\\uDFFF])[Hh][Tt][Tt][Pp][Ss]?:\\/\\/[^\\s\\/:?#%]+(?::[0-9]{1,5})?(?:[\\/?#](?:[^\\s%]|%[0-9A-Fa-f]{2})*)?$",
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "title",
                                                      "url"
                                                    ],
                                                    "type": "object"
                                                  },
                                                  "maxItems": 3,
                                                  "minItems": 1,
                                                  "type": "array"
                                                },
                                                "delay_seconds": {
                                                  "maximum": 86399,
                                                  "minimum": 0,
                                                  "type": "integer"
                                                },
                                                "text": {
                                                  "description": "Message text. Length is 1 through 640 Unicode scalar values.",
                                                  "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,640}$",
                                                  "type": "string"
                                                },
                                                "type": {
                                                  "const": "send_message",
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "type",
                                                "delay_seconds",
                                                "text",
                                                "buttons"
                                              ],
                                              "type": "object"
                                            }
                                          ]
                                        },
                                        {
                                          "additionalProperties": false,
                                          "properties": {
                                            "delay_seconds": {
                                              "maximum": 86399,
                                              "minimum": 0,
                                              "type": "integer"
                                            },
                                            "media_type": {
                                              "description": "`image`, `video`, `audio`, or `file` identifies the outbound Instagram attachment type.",
                                              "enum": [
                                                "image",
                                                "video",
                                                "audio",
                                                "file"
                                              ],
                                              "type": "string"
                                            },
                                            "type": {
                                              "const": "send_media",
                                              "type": "string"
                                            },
                                            "url": {
                                              "pattern": "^(?![\\s\\S]*[\\u0000\\uD800-\\uDFFF])[Hh][Tt][Tt][Pp][Ss]?:\\/\\/[^\\s\\/:?#%]+(?::[0-9]{1,5})?(?:[\\/?#](?:[^\\s%]|%[0-9A-Fa-f]{2})*)?$",
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "delay_seconds",
                                            "media_type",
                                            "url"
                                          ],
                                          "type": "object"
                                        },
                                        {
                                          "additionalProperties": false,
                                          "properties": {
                                            "cards": {
                                              "items": {
                                                "additionalProperties": false,
                                                "properties": {
                                                  "buttons": {
                                                    "items": {
                                                      "additionalProperties": false,
                                                      "properties": {
                                                        "title": {
                                                          "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                                          "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                                          "type": "string"
                                                        },
                                                        "type": {
                                                          "const": "url",
                                                          "type": "string"
                                                        },
                                                        "url": {
                                                          "pattern": "^(?![\\s\\S]*[\\u0000\\uD800-\\uDFFF])[Hh][Tt][Tt][Pp][Ss]?:\\/\\/[^\\s\\/:?#%]+(?::[0-9]{1,5})?(?:[\\/?#](?:[^\\s%]|%[0-9A-Fa-f]{2})*)?$",
                                                          "type": "string"
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "title",
                                                        "url"
                                                      ],
                                                      "type": "object"
                                                    },
                                                    "maxItems": 3,
                                                    "minItems": 1,
                                                    "type": "array"
                                                  },
                                                  "image_url": {
                                                    "pattern": "^(?![\\s\\S]*[\\u0000\\uD800-\\uDFFF])[Hh][Tt][Tt][Pp][Ss]?:\\/\\/[^\\s\\/:?#%]+(?::[0-9]{1,5})?(?:[\\/?#](?:[^\\s%]|%[0-9A-Fa-f]{2})*)?$",
                                                    "type": "string"
                                                  },
                                                  "subtitle": {
                                                    "description": "Card subtitle. Length is 0 through 80 Unicode scalar values.",
                                                    "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){0,80}$",
                                                    "type": "string"
                                                  },
                                                  "title": {
                                                    "description": "Card title. Length is 1 through 80 Unicode scalar values.",
                                                    "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,80}$",
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "title",
                                                  "image_url",
                                                  "buttons"
                                                ],
                                                "type": "object"
                                              },
                                              "maxItems": 10,
                                              "minItems": 1,
                                              "type": "array"
                                            },
                                            "delay_seconds": {
                                              "maximum": 86399,
                                              "minimum": 0,
                                              "type": "integer"
                                            },
                                            "type": {
                                              "const": "send_carousel",
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "delay_seconds",
                                            "cards"
                                          ],
                                          "type": "object"
                                        },
                                        {
                                          "additionalProperties": false,
                                          "properties": {
                                            "buttons": {
                                              "additionalProperties": false,
                                              "properties": {
                                                "confirm_title": {
                                                  "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                                  "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                                  "type": "string"
                                                },
                                                "open_profile_title": {
                                                  "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                                  "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "open_profile_title",
                                                "confirm_title"
                                              ],
                                              "type": "object"
                                            },
                                            "delay_seconds": {
                                              "maximum": 86399,
                                              "minimum": 0,
                                              "type": "integer"
                                            },
                                            "expires_in_seconds": {
                                              "maximum": 604800,
                                              "minimum": 60,
                                              "type": "integer"
                                            },
                                            "max_attempts": {
                                              "maximum": 10,
                                              "minimum": 1,
                                              "type": "integer"
                                            },
                                            "message": {
                                              "description": "Message text. Length is 1 through 640 Unicode scalar values.",
                                              "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,640}$",
                                              "type": "string"
                                            },
                                            "not_following_message": {
                                              "anyOf": [
                                                {
                                                  "description": "Message text. Length is 1 through 640 Unicode scalar values.",
                                                  "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,640}$",
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ],
                                              "description": "Message text. Length is 1 through 640 Unicode scalar values."
                                            },
                                            "recheck_after_seconds": {
                                              "maximum": 86400,
                                              "minimum": 60,
                                              "type": "integer"
                                            },
                                            "retry_exhausted_action": {
                                              "description": "`continue` — continue after the retry limit; `stop` — end the active gate after the retry limit.",
                                              "enum": [
                                                "continue",
                                                "stop"
                                              ],
                                              "type": "string"
                                            },
                                            "type": {
                                              "const": "ask_to_follow",
                                              "type": "string"
                                            },
                                            "verification_mode": {
                                              "description": "`trusted_click` — trust the confirmation click; `strict` — verify follow status with Instagram.",
                                              "enum": [
                                                "trusted_click",
                                                "strict"
                                              ],
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "delay_seconds",
                                            "message",
                                            "buttons",
                                            "verification_mode",
                                            "not_following_message",
                                            "max_attempts",
                                            "retry_exhausted_action",
                                            "recheck_after_seconds",
                                            "expires_in_seconds"
                                          ],
                                          "type": "object"
                                        },
                                        {
                                          "additionalProperties": false,
                                          "properties": {
                                            "delay_seconds": {
                                              "maximum": 86399,
                                              "minimum": 0,
                                              "type": "integer"
                                            },
                                            "expires_in_seconds": {
                                              "maximum": 604800,
                                              "minimum": 60,
                                              "type": "integer"
                                            },
                                            "max_attempts": {
                                              "maximum": 5,
                                              "minimum": 1,
                                              "type": "integer"
                                            },
                                            "message": {
                                              "description": "Message text. Length is 1 through 1000 Unicode scalar values.",
                                              "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,1000}$",
                                              "type": "string"
                                            },
                                            "retry_exhausted_action": {
                                              "description": "`continue` — continue after the retry limit; `stop` — end the active gate after the retry limit.",
                                              "enum": [
                                                "continue",
                                                "stop"
                                              ],
                                              "type": "string"
                                            },
                                            "retry_message": {
                                              "description": "Message text. Length is 1 through 1000 Unicode scalar values.",
                                              "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,1000}$",
                                              "type": "string"
                                            },
                                            "type": {
                                              "const": "ask_for_email",
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "delay_seconds",
                                            "message",
                                            "retry_message",
                                            "max_attempts",
                                            "retry_exhausted_action",
                                            "expires_in_seconds"
                                          ],
                                          "type": "object"
                                        },
                                        {
                                          "additionalProperties": false,
                                          "properties": {
                                            "delay_seconds": {
                                              "maximum": 86399,
                                              "minimum": 0,
                                              "type": "integer"
                                            },
                                            "expires_in_seconds": {
                                              "maximum": 604800,
                                              "minimum": 60,
                                              "type": "integer"
                                            },
                                            "max_attempts": {
                                              "maximum": 5,
                                              "minimum": 1,
                                              "type": "integer"
                                            },
                                            "message": {
                                              "description": "Message text. Length is 1 through 1000 Unicode scalar values.",
                                              "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,1000}$",
                                              "type": "string"
                                            },
                                            "retry_exhausted_action": {
                                              "description": "`continue` — continue after the retry limit; `stop` — end the active gate after the retry limit.",
                                              "enum": [
                                                "continue",
                                                "stop"
                                              ],
                                              "type": "string"
                                            },
                                            "retry_message": {
                                              "description": "Message text. Length is 1 through 1000 Unicode scalar values.",
                                              "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,1000}$",
                                              "type": "string"
                                            },
                                            "type": {
                                              "const": "ask_for_phone",
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "delay_seconds",
                                            "message",
                                            "retry_message",
                                            "max_attempts",
                                            "retry_exhausted_action",
                                            "expires_in_seconds"
                                          ],
                                          "type": "object"
                                        },
                                        {
                                          "additionalProperties": false,
                                          "properties": {
                                            "delay_seconds": {
                                              "maximum": 2592000,
                                              "minimum": 0,
                                              "type": "integer"
                                            },
                                            "tag_id": {
                                              "format": "uuid",
                                              "type": "string"
                                            },
                                            "type": {
                                              "const": "add_contact_tag",
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "delay_seconds",
                                            "tag_id"
                                          ],
                                          "type": "object"
                                        },
                                        {
                                          "additionalProperties": false,
                                          "properties": {
                                            "type": {
                                              "const": "finish",
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type"
                                          ],
                                          "type": "object"
                                        }
                                      ]
                                    },
                                    "maxItems": 20,
                                    "minItems": 1,
                                    "type": "array"
                                  }
                                },
                                "required": [
                                  "actions"
                                ],
                                "type": "object"
                              }
                            ]
                          },
                          "opening": {
                            "additionalProperties": false,
                            "properties": {
                              "direct_message": {
                                "additionalProperties": false,
                                "properties": {
                                  "delay_seconds": {
                                    "maximum": 86400,
                                    "minimum": 0,
                                    "type": "integer"
                                  },
                                  "message": {
                                    "anyOf": [
                                      {
                                        "additionalProperties": false,
                                        "properties": {
                                          "buttons": {
                                            "items": {
                                              "anyOf": [
                                                {
                                                  "additionalProperties": false,
                                                  "properties": {
                                                    "title": {
                                                      "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                                      "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                                      "type": "string"
                                                    },
                                                    "type": {
                                                      "const": "start_follow_up",
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "title"
                                                  ],
                                                  "type": "object"
                                                },
                                                {
                                                  "additionalProperties": false,
                                                  "properties": {
                                                    "title": {
                                                      "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                                      "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                                      "type": "string"
                                                    },
                                                    "type": {
                                                      "const": "url",
                                                      "type": "string"
                                                    },
                                                    "url": {
                                                      "pattern": "^(?![\\s\\S]*[\\u0000\\uD800-\\uDFFF])[Hh][Tt][Tt][Pp][Ss]?:\\/\\/[^\\s\\/:?#%]+(?::[0-9]{1,5})?(?:[\\/?#](?:[^\\s%]|%[0-9A-Fa-f]{2})*)?$",
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "title",
                                                    "url"
                                                  ],
                                                  "type": "object"
                                                }
                                              ]
                                            },
                                            "maxItems": 0,
                                            "minItems": 0,
                                            "type": "array"
                                          },
                                          "text": {
                                            "description": "Message text. Length is 1 through 1000 Unicode scalar values.",
                                            "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,1000}$",
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "buttons"
                                        ],
                                        "type": "object"
                                      },
                                      {
                                        "additionalProperties": false,
                                        "properties": {
                                          "buttons": {
                                            "items": {
                                              "anyOf": [
                                                {
                                                  "additionalProperties": false,
                                                  "properties": {
                                                    "title": {
                                                      "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                                      "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                                      "type": "string"
                                                    },
                                                    "type": {
                                                      "const": "start_follow_up",
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "title"
                                                  ],
                                                  "type": "object"
                                                },
                                                {
                                                  "additionalProperties": false,
                                                  "properties": {
                                                    "title": {
                                                      "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                                      "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                                      "type": "string"
                                                    },
                                                    "type": {
                                                      "const": "url",
                                                      "type": "string"
                                                    },
                                                    "url": {
                                                      "pattern": "^(?![\\s\\S]*[\\u0000\\uD800-\\uDFFF])[Hh][Tt][Tt][Pp][Ss]?:\\/\\/[^\\s\\/:?#%]+(?::[0-9]{1,5})?(?:[\\/?#](?:[^\\s%]|%[0-9A-Fa-f]{2})*)?$",
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "title",
                                                    "url"
                                                  ],
                                                  "type": "object"
                                                }
                                              ]
                                            },
                                            "maxItems": 3,
                                            "minItems": 1,
                                            "type": "array"
                                          },
                                          "text": {
                                            "description": "Message text. Length is 1 through 640 Unicode scalar values.",
                                            "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,640}$",
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "buttons"
                                        ],
                                        "type": "object"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "delay_seconds",
                                  "message"
                                ],
                                "type": "object"
                              },
                              "public_reply": {
                                "anyOf": [
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "enabled": {
                                        "const": false,
                                        "type": "boolean"
                                      }
                                    },
                                    "required": [
                                      "enabled"
                                    ],
                                    "type": "object"
                                  },
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "delay_seconds": {
                                        "maximum": 86400,
                                        "minimum": 0,
                                        "type": "integer"
                                      },
                                      "enabled": {
                                        "const": true,
                                        "type": "boolean"
                                      },
                                      "max_per_post": {
                                        "maximum": 200,
                                        "minimum": 1,
                                        "type": "integer"
                                      },
                                      "mention_mode": {
                                        "description": "`none` — do not prefix a mention; `contact` — mention the contact; `account` — mention the account.",
                                        "enum": [
                                          "none",
                                          "contact",
                                          "account"
                                        ],
                                        "type": "string"
                                      },
                                      "messages": {
                                        "items": {
                                          "description": "Public reply message. Length is 1 through 280 Unicode scalar values.",
                                          "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,280}$",
                                          "type": "string"
                                        },
                                        "minItems": 1,
                                        "type": "array"
                                      },
                                      "rotation": {
                                        "description": "`random` — choose a response randomly; `sequential` — rotate responses in their submitted order.",
                                        "enum": [
                                          "random",
                                          "sequential"
                                        ],
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "enabled",
                                      "delay_seconds",
                                      "messages",
                                      "rotation",
                                      "mention_mode",
                                      "max_per_post"
                                    ],
                                    "type": "object"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "public_reply",
                              "direct_message"
                            ],
                            "type": "object"
                          },
                          "trigger": {
                            "anyOf": [
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "keywords": {
                                    "anyOf": [
                                      {
                                        "additionalProperties": false,
                                        "properties": {
                                          "mode": {
                                            "const": "any",
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "mode"
                                        ],
                                        "type": "object"
                                      },
                                      {
                                        "additionalProperties": false,
                                        "properties": {
                                          "match_mode": {
                                            "description": "`whole_word` — match an isolated keyword or phrase; `substring` — match it anywhere in the text.",
                                            "enum": [
                                              "whole_word",
                                              "substring"
                                            ],
                                            "type": "string"
                                          },
                                          "mode": {
                                            "const": "specific",
                                            "type": "string"
                                          },
                                          "values": {
                                            "items": {
                                              "description": "Keyword or phrase. Length is 1 through 100 Unicode scalar values.",
                                              "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,100}$",
                                              "type": "string"
                                            },
                                            "maxItems": 50,
                                            "minItems": 1,
                                            "type": "array"
                                          }
                                        },
                                        "required": [
                                          "mode",
                                          "match_mode",
                                          "values"
                                        ],
                                        "type": "object"
                                      }
                                    ]
                                  },
                                  "response_type": {
                                    "const": "text",
                                    "type": "string"
                                  },
                                  "story": {
                                    "anyOf": [
                                      {
                                        "additionalProperties": false,
                                        "properties": {
                                          "mode": {
                                            "const": "any",
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "mode"
                                        ],
                                        "type": "object"
                                      },
                                      {
                                        "additionalProperties": false,
                                        "properties": {
                                          "mode": {
                                            "const": "specific",
                                            "type": "string"
                                          },
                                          "reference": {
                                            "additionalProperties": false,
                                            "properties": {
                                              "type": {
                                                "const": "id",
                                                "type": "string"
                                              },
                                              "value": {
                                                "description": "Opaque Instagram media ID returned by Levios discovery. Use 1 through 256 printable ASCII characters.",
                                                "pattern": "^[!-~]{1,256}$",
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "value"
                                            ],
                                            "type": "object"
                                          }
                                        },
                                        "required": [
                                          "mode",
                                          "reference"
                                        ],
                                        "type": "object"
                                      }
                                    ]
                                  },
                                  "type": {
                                    "const": "story_reply",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "response_type",
                                  "story",
                                  "keywords"
                                ],
                                "type": "object"
                              },
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "reactions": {
                                    "anyOf": [
                                      {
                                        "additionalProperties": false,
                                        "properties": {
                                          "mode": {
                                            "const": "any",
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "mode"
                                        ],
                                        "type": "object"
                                      },
                                      {
                                        "additionalProperties": false,
                                        "properties": {
                                          "emojis": {
                                            "items": {
                                              "description": "Reaction emoji. Length is 1 through 16 Unicode scalar values.",
                                              "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,16}$",
                                              "type": "string"
                                            },
                                            "maxItems": 50,
                                            "minItems": 1,
                                            "type": "array"
                                          },
                                          "mode": {
                                            "const": "specific",
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "mode",
                                          "emojis"
                                        ],
                                        "type": "object"
                                      }
                                    ]
                                  },
                                  "response_type": {
                                    "const": "reaction",
                                    "type": "string"
                                  },
                                  "story": {
                                    "anyOf": [
                                      {
                                        "additionalProperties": false,
                                        "properties": {
                                          "mode": {
                                            "const": "any",
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "mode"
                                        ],
                                        "type": "object"
                                      },
                                      {
                                        "additionalProperties": false,
                                        "properties": {
                                          "mode": {
                                            "const": "specific",
                                            "type": "string"
                                          },
                                          "reference": {
                                            "additionalProperties": false,
                                            "properties": {
                                              "type": {
                                                "const": "id",
                                                "type": "string"
                                              },
                                              "value": {
                                                "description": "Opaque Instagram media ID returned by Levios discovery. Use 1 through 256 printable ASCII characters.",
                                                "pattern": "^[!-~]{1,256}$",
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "value"
                                            ],
                                            "type": "object"
                                          }
                                        },
                                        "required": [
                                          "mode",
                                          "reference"
                                        ],
                                        "type": "object"
                                      }
                                    ]
                                  },
                                  "type": {
                                    "const": "story_reply",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "response_type",
                                  "story",
                                  "reactions"
                                ],
                                "type": "object"
                              }
                            ]
                          }
                        },
                        "required": [
                          "contact_filter",
                          "opening",
                          "follow_up",
                          "extras",
                          "trigger"
                        ],
                        "type": "object"
                      },
                      "created_at": {
                        "maxLength": 32,
                        "minLength": 20,
                        "pattern": "^(?:(?:(?!0000)\\d{4})-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|02-(?:0[1-9]|1\\d|2[0-8]))|(?:(?!0000)(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00))-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d{1,6})?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$",
                        "type": "string"
                      },
                      "draft_updated_at": {
                        "anyOf": [
                          {
                            "maxLength": 32,
                            "minLength": 20,
                            "pattern": "^(?:(?:(?!0000)\\d{4})-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|02-(?:0[1-9]|1\\d|2[0-8]))|(?:(?!0000)(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00))-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d{1,6})?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$",
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "has_unpublished_changes": {
                        "type": "boolean"
                      },
                      "id": {
                        "format": "uuid",
                        "type": "string"
                      },
                      "name": {
                        "description": "Automation name. Use 1 through 120 Unicode scalar values, without surrounding whitespace or control characters.",
                        "pattern": "^(?!\\s)(?![\\s\\S]*\\s$)(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000-\\u001F\\u007F-\\u009F\\uD800-\\uDFFF])){1,120}$",
                        "type": "string"
                      },
                      "status": {
                        "description": "`draft` — not published; `live` — processing triggers; `paused` — published but paused.",
                        "enum": [
                          "draft",
                          "live",
                          "paused"
                        ],
                        "type": "string"
                      },
                      "trigger_type": {
                        "const": "story_reply",
                        "type": "string"
                      },
                      "updated_at": {
                        "maxLength": 32,
                        "minLength": 20,
                        "pattern": "^(?:(?:(?!0000)\\d{4})-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|02-(?:0[1-9]|1\\d|2[0-8]))|(?:(?!0000)(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00))-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d{1,6})?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$",
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "account_id",
                      "name",
                      "status",
                      "has_unpublished_changes",
                      "draft_updated_at",
                      "created_at",
                      "updated_at",
                      "trigger_type",
                      "configuration",
                      "authoring_compatibility"
                    ],
                    "type": "object"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {
                      "account_id": {
                        "format": "uuid",
                        "type": "string"
                      },
                      "authoring_compatibility": {
                        "const": "public_v1",
                        "type": "string"
                      },
                      "configuration": {
                        "additionalProperties": false,
                        "properties": {
                          "contact_filter": {
                            "description": "`anyone` — every eligible contact; `followers_only` — confirmed followers; `non_followers_only` — confirmed non-followers; `previous_dm_contacts` — contacts with an inbound DM before this trigger; `existing_contacts` — contacts already known before this trigger.",
                            "enum": [
                              "anyone",
                              "followers_only",
                              "non_followers_only",
                              "previous_dm_contacts",
                              "existing_contacts"
                            ],
                            "type": "string"
                          },
                          "extras": {
                            "additionalProperties": false,
                            "properties": {
                              "cooldown": {
                                "anyOf": [
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "mode": {
                                        "const": "none",
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "mode"
                                    ],
                                    "type": "object"
                                  },
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "mode": {
                                        "const": "fixed",
                                        "type": "string"
                                      },
                                      "seconds": {
                                        "maximum": 2592000,
                                        "minimum": 1,
                                        "type": "integer"
                                      }
                                    },
                                    "required": [
                                      "mode",
                                      "seconds"
                                    ],
                                    "type": "object"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "cooldown"
                            ],
                            "type": "object"
                          },
                          "follow_up": {
                            "anyOf": [
                              {
                                "type": "null"
                              },
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "actions": {
                                    "items": {
                                      "anyOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "additionalProperties": false,
                                              "properties": {
                                                "buttons": {
                                                  "items": {
                                                    "additionalProperties": false,
                                                    "properties": {
                                                      "title": {
                                                        "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                                        "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                                        "type": "string"
                                                      },
                                                      "type": {
                                                        "const": "url",
                                                        "type": "string"
                                                      },
                                                      "url": {
                                                        "pattern": "^(?![\\s\\S]*[\\u0000\\uD800-\\uDFFF])[Hh][Tt][Tt][Pp][Ss]?:\\/\\/[^\\s\\/:?#%]+(?::[0-9]{1,5})?(?:[\\/?#](?:[^\\s%]|%[0-9A-Fa-f]{2})*)?$",
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "title",
                                                      "url"
                                                    ],
                                                    "type": "object"
                                                  },
                                                  "maxItems": 0,
                                                  "minItems": 0,
                                                  "type": "array"
                                                },
                                                "delay_seconds": {
                                                  "maximum": 86399,
                                                  "minimum": 0,
                                                  "type": "integer"
                                                },
                                                "text": {
                                                  "description": "Message text. Length is 1 through 1000 Unicode scalar values.",
                                                  "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,1000}$",
                                                  "type": "string"
                                                },
                                                "type": {
                                                  "const": "send_message",
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "type",
                                                "delay_seconds",
                                                "text",
                                                "buttons"
                                              ],
                                              "type": "object"
                                            },
                                            {
                                              "additionalProperties": false,
                                              "properties": {
                                                "buttons": {
                                                  "items": {
                                                    "additionalProperties": false,
                                                    "properties": {
                                                      "title": {
                                                        "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                                        "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                                        "type": "string"
                                                      },
                                                      "type": {
                                                        "const": "url",
                                                        "type": "string"
                                                      },
                                                      "url": {
                                                        "pattern": "^(?![\\s\\S]*[\\u0000\\uD800-\\uDFFF])[Hh][Tt][Tt][Pp][Ss]?:\\/\\/[^\\s\\/:?#%]+(?::[0-9]{1,5})?(?:[\\/?#](?:[^\\s%]|%[0-9A-Fa-f]{2})*)?$",
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "title",
                                                      "url"
                                                    ],
                                                    "type": "object"
                                                  },
                                                  "maxItems": 3,
                                                  "minItems": 1,
                                                  "type": "array"
                                                },
                                                "delay_seconds": {
                                                  "maximum": 86399,
                                                  "minimum": 0,
                                                  "type": "integer"
                                                },
                                                "text": {
                                                  "description": "Message text. Length is 1 through 640 Unicode scalar values.",
                                                  "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,640}$",
                                                  "type": "string"
                                                },
                                                "type": {
                                                  "const": "send_message",
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "type",
                                                "delay_seconds",
                                                "text",
                                                "buttons"
                                              ],
                                              "type": "object"
                                            }
                                          ]
                                        },
                                        {
                                          "additionalProperties": false,
                                          "properties": {
                                            "delay_seconds": {
                                              "maximum": 86399,
                                              "minimum": 0,
                                              "type": "integer"
                                            },
                                            "media_type": {
                                              "description": "`image`, `video`, `audio`, or `file` identifies the outbound Instagram attachment type.",
                                              "enum": [
                                                "image",
                                                "video",
                                                "audio",
                                                "file"
                                              ],
                                              "type": "string"
                                            },
                                            "type": {
                                              "const": "send_media",
                                              "type": "string"
                                            },
                                            "url": {
                                              "pattern": "^(?![\\s\\S]*[\\u0000\\uD800-\\uDFFF])[Hh][Tt][Tt][Pp][Ss]?:\\/\\/[^\\s\\/:?#%]+(?::[0-9]{1,5})?(?:[\\/?#](?:[^\\s%]|%[0-9A-Fa-f]{2})*)?$",
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "delay_seconds",
                                            "media_type",
                                            "url"
                                          ],
                                          "type": "object"
                                        },
                                        {
                                          "additionalProperties": false,
                                          "properties": {
                                            "cards": {
                                              "items": {
                                                "additionalProperties": false,
                                                "properties": {
                                                  "buttons": {
                                                    "items": {
                                                      "additionalProperties": false,
                                                      "properties": {
                                                        "title": {
                                                          "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                                          "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                                          "type": "string"
                                                        },
                                                        "type": {
                                                          "const": "url",
                                                          "type": "string"
                                                        },
                                                        "url": {
                                                          "pattern": "^(?![\\s\\S]*[\\u0000\\uD800-\\uDFFF])[Hh][Tt][Tt][Pp][Ss]?:\\/\\/[^\\s\\/:?#%]+(?::[0-9]{1,5})?(?:[\\/?#](?:[^\\s%]|%[0-9A-Fa-f]{2})*)?$",
                                                          "type": "string"
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "title",
                                                        "url"
                                                      ],
                                                      "type": "object"
                                                    },
                                                    "maxItems": 3,
                                                    "minItems": 1,
                                                    "type": "array"
                                                  },
                                                  "image_url": {
                                                    "pattern": "^(?![\\s\\S]*[\\u0000\\uD800-\\uDFFF])[Hh][Tt][Tt][Pp][Ss]?:\\/\\/[^\\s\\/:?#%]+(?::[0-9]{1,5})?(?:[\\/?#](?:[^\\s%]|%[0-9A-Fa-f]{2})*)?$",
                                                    "type": "string"
                                                  },
                                                  "subtitle": {
                                                    "description": "Card subtitle. Length is 0 through 80 Unicode scalar values.",
                                                    "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){0,80}$",
                                                    "type": "string"
                                                  },
                                                  "title": {
                                                    "description": "Card title. Length is 1 through 80 Unicode scalar values.",
                                                    "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,80}$",
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "title",
                                                  "image_url",
                                                  "buttons"
                                                ],
                                                "type": "object"
                                              },
                                              "maxItems": 10,
                                              "minItems": 1,
                                              "type": "array"
                                            },
                                            "delay_seconds": {
                                              "maximum": 86399,
                                              "minimum": 0,
                                              "type": "integer"
                                            },
                                            "type": {
                                              "const": "send_carousel",
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "delay_seconds",
                                            "cards"
                                          ],
                                          "type": "object"
                                        },
                                        {
                                          "additionalProperties": false,
                                          "properties": {
                                            "buttons": {
                                              "additionalProperties": false,
                                              "properties": {
                                                "confirm_title": {
                                                  "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                                  "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                                  "type": "string"
                                                },
                                                "open_profile_title": {
                                                  "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                                  "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "open_profile_title",
                                                "confirm_title"
                                              ],
                                              "type": "object"
                                            },
                                            "delay_seconds": {
                                              "maximum": 86399,
                                              "minimum": 0,
                                              "type": "integer"
                                            },
                                            "expires_in_seconds": {
                                              "maximum": 604800,
                                              "minimum": 60,
                                              "type": "integer"
                                            },
                                            "max_attempts": {
                                              "maximum": 10,
                                              "minimum": 1,
                                              "type": "integer"
                                            },
                                            "message": {
                                              "description": "Message text. Length is 1 through 640 Unicode scalar values.",
                                              "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,640}$",
                                              "type": "string"
                                            },
                                            "not_following_message": {
                                              "anyOf": [
                                                {
                                                  "description": "Message text. Length is 1 through 640 Unicode scalar values.",
                                                  "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,640}$",
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ],
                                              "description": "Message text. Length is 1 through 640 Unicode scalar values."
                                            },
                                            "recheck_after_seconds": {
                                              "maximum": 86400,
                                              "minimum": 60,
                                              "type": "integer"
                                            },
                                            "retry_exhausted_action": {
                                              "description": "`continue` — continue after the retry limit; `stop` — end the active gate after the retry limit.",
                                              "enum": [
                                                "continue",
                                                "stop"
                                              ],
                                              "type": "string"
                                            },
                                            "type": {
                                              "const": "ask_to_follow",
                                              "type": "string"
                                            },
                                            "verification_mode": {
                                              "description": "`trusted_click` — trust the confirmation click; `strict` — verify follow status with Instagram.",
                                              "enum": [
                                                "trusted_click",
                                                "strict"
                                              ],
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "delay_seconds",
                                            "message",
                                            "buttons",
                                            "verification_mode",
                                            "not_following_message",
                                            "max_attempts",
                                            "retry_exhausted_action",
                                            "recheck_after_seconds",
                                            "expires_in_seconds"
                                          ],
                                          "type": "object"
                                        },
                                        {
                                          "additionalProperties": false,
                                          "properties": {
                                            "delay_seconds": {
                                              "maximum": 86399,
                                              "minimum": 0,
                                              "type": "integer"
                                            },
                                            "expires_in_seconds": {
                                              "maximum": 604800,
                                              "minimum": 60,
                                              "type": "integer"
                                            },
                                            "max_attempts": {
                                              "maximum": 5,
                                              "minimum": 1,
                                              "type": "integer"
                                            },
                                            "message": {
                                              "description": "Message text. Length is 1 through 1000 Unicode scalar values.",
                                              "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,1000}$",
                                              "type": "string"
                                            },
                                            "retry_exhausted_action": {
                                              "description": "`continue` — continue after the retry limit; `stop` — end the active gate after the retry limit.",
                                              "enum": [
                                                "continue",
                                                "stop"
                                              ],
                                              "type": "string"
                                            },
                                            "retry_message": {
                                              "description": "Message text. Length is 1 through 1000 Unicode scalar values.",
                                              "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,1000}$",
                                              "type": "string"
                                            },
                                            "type": {
                                              "const": "ask_for_email",
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "delay_seconds",
                                            "message",
                                            "retry_message",
                                            "max_attempts",
                                            "retry_exhausted_action",
                                            "expires_in_seconds"
                                          ],
                                          "type": "object"
                                        },
                                        {
                                          "additionalProperties": false,
                                          "properties": {
                                            "delay_seconds": {
                                              "maximum": 86399,
                                              "minimum": 0,
                                              "type": "integer"
                                            },
                                            "expires_in_seconds": {
                                              "maximum": 604800,
                                              "minimum": 60,
                                              "type": "integer"
                                            },
                                            "max_attempts": {
                                              "maximum": 5,
                                              "minimum": 1,
                                              "type": "integer"
                                            },
                                            "message": {
                                              "description": "Message text. Length is 1 through 1000 Unicode scalar values.",
                                              "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,1000}$",
                                              "type": "string"
                                            },
                                            "retry_exhausted_action": {
                                              "description": "`continue` — continue after the retry limit; `stop` — end the active gate after the retry limit.",
                                              "enum": [
                                                "continue",
                                                "stop"
                                              ],
                                              "type": "string"
                                            },
                                            "retry_message": {
                                              "description": "Message text. Length is 1 through 1000 Unicode scalar values.",
                                              "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,1000}$",
                                              "type": "string"
                                            },
                                            "type": {
                                              "const": "ask_for_phone",
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "delay_seconds",
                                            "message",
                                            "retry_message",
                                            "max_attempts",
                                            "retry_exhausted_action",
                                            "expires_in_seconds"
                                          ],
                                          "type": "object"
                                        },
                                        {
                                          "additionalProperties": false,
                                          "properties": {
                                            "delay_seconds": {
                                              "maximum": 2592000,
                                              "minimum": 0,
                                              "type": "integer"
                                            },
                                            "tag_id": {
                                              "format": "uuid",
                                              "type": "string"
                                            },
                                            "type": {
                                              "const": "add_contact_tag",
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "delay_seconds",
                                            "tag_id"
                                          ],
                                          "type": "object"
                                        },
                                        {
                                          "additionalProperties": false,
                                          "properties": {
                                            "type": {
                                              "const": "finish",
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type"
                                          ],
                                          "type": "object"
                                        }
                                      ]
                                    },
                                    "maxItems": 20,
                                    "minItems": 1,
                                    "type": "array"
                                  }
                                },
                                "required": [
                                  "actions"
                                ],
                                "type": "object"
                              }
                            ]
                          },
                          "opening": {
                            "additionalProperties": false,
                            "properties": {
                              "direct_message": {
                                "additionalProperties": false,
                                "properties": {
                                  "delay_seconds": {
                                    "maximum": 86400,
                                    "minimum": 0,
                                    "type": "integer"
                                  },
                                  "message": {
                                    "anyOf": [
                                      {
                                        "additionalProperties": false,
                                        "properties": {
                                          "buttons": {
                                            "items": {
                                              "anyOf": [
                                                {
                                                  "additionalProperties": false,
                                                  "properties": {
                                                    "title": {
                                                      "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                                      "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                                      "type": "string"
                                                    },
                                                    "type": {
                                                      "const": "start_follow_up",
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "title"
                                                  ],
                                                  "type": "object"
                                                },
                                                {
                                                  "additionalProperties": false,
                                                  "properties": {
                                                    "title": {
                                                      "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                                      "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                                      "type": "string"
                                                    },
                                                    "type": {
                                                      "const": "url",
                                                      "type": "string"
                                                    },
                                                    "url": {
                                                      "pattern": "^(?![\\s\\S]*[\\u0000\\uD800-\\uDFFF])[Hh][Tt][Tt][Pp][Ss]?:\\/\\/[^\\s\\/:?#%]+(?::[0-9]{1,5})?(?:[\\/?#](?:[^\\s%]|%[0-9A-Fa-f]{2})*)?$",
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "title",
                                                    "url"
                                                  ],
                                                  "type": "object"
                                                }
                                              ]
                                            },
                                            "maxItems": 0,
                                            "minItems": 0,
                                            "type": "array"
                                          },
                                          "text": {
                                            "description": "Message text. Length is 1 through 1000 Unicode scalar values.",
                                            "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,1000}$",
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "buttons"
                                        ],
                                        "type": "object"
                                      },
                                      {
                                        "additionalProperties": false,
                                        "properties": {
                                          "buttons": {
                                            "items": {
                                              "anyOf": [
                                                {
                                                  "additionalProperties": false,
                                                  "properties": {
                                                    "title": {
                                                      "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                                      "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                                      "type": "string"
                                                    },
                                                    "type": {
                                                      "const": "start_follow_up",
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "title"
                                                  ],
                                                  "type": "object"
                                                },
                                                {
                                                  "additionalProperties": false,
                                                  "properties": {
                                                    "title": {
                                                      "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                                      "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                                      "type": "string"
                                                    },
                                                    "type": {
                                                      "const": "url",
                                                      "type": "string"
                                                    },
                                                    "url": {
                                                      "pattern": "^(?![\\s\\S]*[\\u0000\\uD800-\\uDFFF])[Hh][Tt][Tt][Pp][Ss]?:\\/\\/[^\\s\\/:?#%]+(?::[0-9]{1,5})?(?:[\\/?#](?:[^\\s%]|%[0-9A-Fa-f]{2})*)?$",
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "title",
                                                    "url"
                                                  ],
                                                  "type": "object"
                                                }
                                              ]
                                            },
                                            "maxItems": 3,
                                            "minItems": 1,
                                            "type": "array"
                                          },
                                          "text": {
                                            "description": "Message text. Length is 1 through 640 Unicode scalar values.",
                                            "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,640}$",
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "buttons"
                                        ],
                                        "type": "object"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "delay_seconds",
                                  "message"
                                ],
                                "type": "object"
                              },
                              "public_reply": {
                                "anyOf": [
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "enabled": {
                                        "const": false,
                                        "type": "boolean"
                                      }
                                    },
                                    "required": [
                                      "enabled"
                                    ],
                                    "type": "object"
                                  },
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "delay_seconds": {
                                        "maximum": 86400,
                                        "minimum": 0,
                                        "type": "integer"
                                      },
                                      "enabled": {
                                        "const": true,
                                        "type": "boolean"
                                      },
                                      "max_per_post": {
                                        "maximum": 200,
                                        "minimum": 1,
                                        "type": "integer"
                                      },
                                      "mention_mode": {
                                        "description": "`none` — do not prefix a mention; `contact` — mention the contact; `account` — mention the account.",
                                        "enum": [
                                          "none",
                                          "contact",
                                          "account"
                                        ],
                                        "type": "string"
                                      },
                                      "messages": {
                                        "items": {
                                          "description": "Public reply message. Length is 1 through 280 Unicode scalar values.",
                                          "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,280}$",
                                          "type": "string"
                                        },
                                        "minItems": 1,
                                        "type": "array"
                                      },
                                      "rotation": {
                                        "description": "`random` — choose a response randomly; `sequential` — rotate responses in their submitted order.",
                                        "enum": [
                                          "random",
                                          "sequential"
                                        ],
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "enabled",
                                      "delay_seconds",
                                      "messages",
                                      "rotation",
                                      "mention_mode",
                                      "max_per_post"
                                    ],
                                    "type": "object"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "public_reply",
                              "direct_message"
                            ],
                            "type": "object"
                          },
                          "trigger": {
                            "additionalProperties": false,
                            "properties": {
                              "keywords": {
                                "additionalProperties": false,
                                "properties": {
                                  "match_mode": {
                                    "description": "`whole_word` — match an isolated keyword or phrase; `substring` — match it anywhere in the text.",
                                    "enum": [
                                      "whole_word",
                                      "substring"
                                    ],
                                    "type": "string"
                                  },
                                  "mode": {
                                    "const": "specific",
                                    "type": "string"
                                  },
                                  "values": {
                                    "items": {
                                      "description": "Keyword or phrase. Length is 1 through 100 Unicode scalar values.",
                                      "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,100}$",
                                      "type": "string"
                                    },
                                    "maxItems": 50,
                                    "minItems": 1,
                                    "type": "array"
                                  }
                                },
                                "required": [
                                  "mode",
                                  "match_mode",
                                  "values"
                                ],
                                "type": "object"
                              },
                              "type": {
                                "const": "dm_keyword",
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "keywords"
                            ],
                            "type": "object"
                          }
                        },
                        "required": [
                          "contact_filter",
                          "opening",
                          "follow_up",
                          "extras",
                          "trigger"
                        ],
                        "type": "object"
                      },
                      "created_at": {
                        "maxLength": 32,
                        "minLength": 20,
                        "pattern": "^(?:(?:(?!0000)\\d{4})-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|02-(?:0[1-9]|1\\d|2[0-8]))|(?:(?!0000)(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00))-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d{1,6})?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$",
                        "type": "string"
                      },
                      "draft_updated_at": {
                        "anyOf": [
                          {
                            "maxLength": 32,
                            "minLength": 20,
                            "pattern": "^(?:(?:(?!0000)\\d{4})-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|02-(?:0[1-9]|1\\d|2[0-8]))|(?:(?!0000)(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00))-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d{1,6})?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$",
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "has_unpublished_changes": {
                        "type": "boolean"
                      },
                      "id": {
                        "format": "uuid",
                        "type": "string"
                      },
                      "name": {
                        "description": "Automation name. Use 1 through 120 Unicode scalar values, without surrounding whitespace or control characters.",
                        "pattern": "^(?!\\s)(?![\\s\\S]*\\s$)(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000-\\u001F\\u007F-\\u009F\\uD800-\\uDFFF])){1,120}$",
                        "type": "string"
                      },
                      "status": {
                        "description": "`draft` — not published; `live` — processing triggers; `paused` — published but paused.",
                        "enum": [
                          "draft",
                          "live",
                          "paused"
                        ],
                        "type": "string"
                      },
                      "trigger_type": {
                        "const": "dm_keyword",
                        "type": "string"
                      },
                      "updated_at": {
                        "maxLength": 32,
                        "minLength": 20,
                        "pattern": "^(?:(?:(?!0000)\\d{4})-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|02-(?:0[1-9]|1\\d|2[0-8]))|(?:(?!0000)(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00))-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d{1,6})?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$",
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "account_id",
                      "name",
                      "status",
                      "has_unpublished_changes",
                      "draft_updated_at",
                      "created_at",
                      "updated_at",
                      "trigger_type",
                      "configuration",
                      "authoring_compatibility"
                    ],
                    "type": "object"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {
                      "account_id": {
                        "format": "uuid",
                        "type": "string"
                      },
                      "authoring_compatibility": {
                        "const": "public_v1",
                        "type": "string"
                      },
                      "configuration": {
                        "additionalProperties": false,
                        "properties": {
                          "contact_filter": {
                            "description": "`anyone` — every eligible contact; `followers_only` — confirmed followers; `non_followers_only` — confirmed non-followers; `previous_dm_contacts` — contacts with an inbound DM before this trigger; `existing_contacts` — contacts already known before this trigger.",
                            "enum": [
                              "anyone",
                              "followers_only",
                              "non_followers_only",
                              "previous_dm_contacts",
                              "existing_contacts"
                            ],
                            "type": "string"
                          },
                          "extras": {
                            "additionalProperties": false,
                            "properties": {
                              "cooldown": {
                                "anyOf": [
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "mode": {
                                        "const": "none",
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "mode"
                                    ],
                                    "type": "object"
                                  },
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "mode": {
                                        "const": "fixed",
                                        "type": "string"
                                      },
                                      "seconds": {
                                        "maximum": 2592000,
                                        "minimum": 1,
                                        "type": "integer"
                                      }
                                    },
                                    "required": [
                                      "mode",
                                      "seconds"
                                    ],
                                    "type": "object"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "cooldown"
                            ],
                            "type": "object"
                          },
                          "follow_up": {
                            "anyOf": [
                              {
                                "type": "null"
                              },
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "actions": {
                                    "items": {
                                      "anyOf": [
                                        {
                                          "anyOf": [
                                            {
                                              "additionalProperties": false,
                                              "properties": {
                                                "buttons": {
                                                  "items": {
                                                    "additionalProperties": false,
                                                    "properties": {
                                                      "title": {
                                                        "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                                        "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                                        "type": "string"
                                                      },
                                                      "type": {
                                                        "const": "url",
                                                        "type": "string"
                                                      },
                                                      "url": {
                                                        "pattern": "^(?![\\s\\S]*[\\u0000\\uD800-\\uDFFF])[Hh][Tt][Tt][Pp][Ss]?:\\/\\/[^\\s\\/:?#%]+(?::[0-9]{1,5})?(?:[\\/?#](?:[^\\s%]|%[0-9A-Fa-f]{2})*)?$",
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "title",
                                                      "url"
                                                    ],
                                                    "type": "object"
                                                  },
                                                  "maxItems": 0,
                                                  "minItems": 0,
                                                  "type": "array"
                                                },
                                                "delay_seconds": {
                                                  "maximum": 86399,
                                                  "minimum": 0,
                                                  "type": "integer"
                                                },
                                                "text": {
                                                  "description": "Message text. Length is 1 through 1000 Unicode scalar values.",
                                                  "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,1000}$",
                                                  "type": "string"
                                                },
                                                "type": {
                                                  "const": "send_message",
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "type",
                                                "delay_seconds",
                                                "text",
                                                "buttons"
                                              ],
                                              "type": "object"
                                            },
                                            {
                                              "additionalProperties": false,
                                              "properties": {
                                                "buttons": {
                                                  "items": {
                                                    "additionalProperties": false,
                                                    "properties": {
                                                      "title": {
                                                        "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                                        "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                                        "type": "string"
                                                      },
                                                      "type": {
                                                        "const": "url",
                                                        "type": "string"
                                                      },
                                                      "url": {
                                                        "pattern": "^(?![\\s\\S]*[\\u0000\\uD800-\\uDFFF])[Hh][Tt][Tt][Pp][Ss]?:\\/\\/[^\\s\\/:?#%]+(?::[0-9]{1,5})?(?:[\\/?#](?:[^\\s%]|%[0-9A-Fa-f]{2})*)?$",
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "title",
                                                      "url"
                                                    ],
                                                    "type": "object"
                                                  },
                                                  "maxItems": 3,
                                                  "minItems": 1,
                                                  "type": "array"
                                                },
                                                "delay_seconds": {
                                                  "maximum": 86399,
                                                  "minimum": 0,
                                                  "type": "integer"
                                                },
                                                "text": {
                                                  "description": "Message text. Length is 1 through 640 Unicode scalar values.",
                                                  "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,640}$",
                                                  "type": "string"
                                                },
                                                "type": {
                                                  "const": "send_message",
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "type",
                                                "delay_seconds",
                                                "text",
                                                "buttons"
                                              ],
                                              "type": "object"
                                            }
                                          ]
                                        },
                                        {
                                          "additionalProperties": false,
                                          "properties": {
                                            "delay_seconds": {
                                              "maximum": 86399,
                                              "minimum": 0,
                                              "type": "integer"
                                            },
                                            "media_type": {
                                              "description": "`image`, `video`, `audio`, or `file` identifies the outbound Instagram attachment type.",
                                              "enum": [
                                                "image",
                                                "video",
                                                "audio",
                                                "file"
                                              ],
                                              "type": "string"
                                            },
                                            "type": {
                                              "const": "send_media",
                                              "type": "string"
                                            },
                                            "url": {
                                              "pattern": "^(?![\\s\\S]*[\\u0000\\uD800-\\uDFFF])[Hh][Tt][Tt][Pp][Ss]?:\\/\\/[^\\s\\/:?#%]+(?::[0-9]{1,5})?(?:[\\/?#](?:[^\\s%]|%[0-9A-Fa-f]{2})*)?$",
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "delay_seconds",
                                            "media_type",
                                            "url"
                                          ],
                                          "type": "object"
                                        },
                                        {
                                          "additionalProperties": false,
                                          "properties": {
                                            "cards": {
                                              "items": {
                                                "additionalProperties": false,
                                                "properties": {
                                                  "buttons": {
                                                    "items": {
                                                      "additionalProperties": false,
                                                      "properties": {
                                                        "title": {
                                                          "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                                          "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                                          "type": "string"
                                                        },
                                                        "type": {
                                                          "const": "url",
                                                          "type": "string"
                                                        },
                                                        "url": {
                                                          "pattern": "^(?![\\s\\S]*[\\u0000\\uD800-\\uDFFF])[Hh][Tt][Tt][Pp][Ss]?:\\/\\/[^\\s\\/:?#%]+(?::[0-9]{1,5})?(?:[\\/?#](?:[^\\s%]|%[0-9A-Fa-f]{2})*)?$",
                                                          "type": "string"
                                                        }
                                                      },
                                                      "required": [
                                                        "type",
                                                        "title",
                                                        "url"
                                                      ],
                                                      "type": "object"
                                                    },
                                                    "maxItems": 3,
                                                    "minItems": 1,
                                                    "type": "array"
                                                  },
                                                  "image_url": {
                                                    "pattern": "^(?![\\s\\S]*[\\u0000\\uD800-\\uDFFF])[Hh][Tt][Tt][Pp][Ss]?:\\/\\/[^\\s\\/:?#%]+(?::[0-9]{1,5})?(?:[\\/?#](?:[^\\s%]|%[0-9A-Fa-f]{2})*)?$",
                                                    "type": "string"
                                                  },
                                                  "subtitle": {
                                                    "description": "Card subtitle. Length is 0 through 80 Unicode scalar values.",
                                                    "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){0,80}$",
                                                    "type": "string"
                                                  },
                                                  "title": {
                                                    "description": "Card title. Length is 1 through 80 Unicode scalar values.",
                                                    "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,80}$",
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "title",
                                                  "image_url",
                                                  "buttons"
                                                ],
                                                "type": "object"
                                              },
                                              "maxItems": 10,
                                              "minItems": 1,
                                              "type": "array"
                                            },
                                            "delay_seconds": {
                                              "maximum": 86399,
                                              "minimum": 0,
                                              "type": "integer"
                                            },
                                            "type": {
                                              "const": "send_carousel",
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "delay_seconds",
                                            "cards"
                                          ],
                                          "type": "object"
                                        },
                                        {
                                          "additionalProperties": false,
                                          "properties": {
                                            "buttons": {
                                              "additionalProperties": false,
                                              "properties": {
                                                "confirm_title": {
                                                  "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                                  "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                                  "type": "string"
                                                },
                                                "open_profile_title": {
                                                  "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                                  "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "open_profile_title",
                                                "confirm_title"
                                              ],
                                              "type": "object"
                                            },
                                            "delay_seconds": {
                                              "maximum": 86399,
                                              "minimum": 0,
                                              "type": "integer"
                                            },
                                            "expires_in_seconds": {
                                              "maximum": 604800,
                                              "minimum": 60,
                                              "type": "integer"
                                            },
                                            "max_attempts": {
                                              "maximum": 10,
                                              "minimum": 1,
                                              "type": "integer"
                                            },
                                            "message": {
                                              "description": "Message text. Length is 1 through 640 Unicode scalar values.",
                                              "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,640}$",
                                              "type": "string"
                                            },
                                            "not_following_message": {
                                              "anyOf": [
                                                {
                                                  "description": "Message text. Length is 1 through 640 Unicode scalar values.",
                                                  "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,640}$",
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ],
                                              "description": "Message text. Length is 1 through 640 Unicode scalar values."
                                            },
                                            "recheck_after_seconds": {
                                              "maximum": 86400,
                                              "minimum": 60,
                                              "type": "integer"
                                            },
                                            "retry_exhausted_action": {
                                              "description": "`continue` — continue after the retry limit; `stop` — end the active gate after the retry limit.",
                                              "enum": [
                                                "continue",
                                                "stop"
                                              ],
                                              "type": "string"
                                            },
                                            "type": {
                                              "const": "ask_to_follow",
                                              "type": "string"
                                            },
                                            "verification_mode": {
                                              "description": "`trusted_click` — trust the confirmation click; `strict` — verify follow status with Instagram.",
                                              "enum": [
                                                "trusted_click",
                                                "strict"
                                              ],
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "delay_seconds",
                                            "message",
                                            "buttons",
                                            "verification_mode",
                                            "not_following_message",
                                            "max_attempts",
                                            "retry_exhausted_action",
                                            "recheck_after_seconds",
                                            "expires_in_seconds"
                                          ],
                                          "type": "object"
                                        },
                                        {
                                          "additionalProperties": false,
                                          "properties": {
                                            "delay_seconds": {
                                              "maximum": 86399,
                                              "minimum": 0,
                                              "type": "integer"
                                            },
                                            "expires_in_seconds": {
                                              "maximum": 604800,
                                              "minimum": 60,
                                              "type": "integer"
                                            },
                                            "max_attempts": {
                                              "maximum": 5,
                                              "minimum": 1,
                                              "type": "integer"
                                            },
                                            "message": {
                                              "description": "Message text. Length is 1 through 1000 Unicode scalar values.",
                                              "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,1000}$",
                                              "type": "string"
                                            },
                                            "retry_exhausted_action": {
                                              "description": "`continue` — continue after the retry limit; `stop` — end the active gate after the retry limit.",
                                              "enum": [
                                                "continue",
                                                "stop"
                                              ],
                                              "type": "string"
                                            },
                                            "retry_message": {
                                              "description": "Message text. Length is 1 through 1000 Unicode scalar values.",
                                              "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,1000}$",
                                              "type": "string"
                                            },
                                            "type": {
                                              "const": "ask_for_email",
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "delay_seconds",
                                            "message",
                                            "retry_message",
                                            "max_attempts",
                                            "retry_exhausted_action",
                                            "expires_in_seconds"
                                          ],
                                          "type": "object"
                                        },
                                        {
                                          "additionalProperties": false,
                                          "properties": {
                                            "delay_seconds": {
                                              "maximum": 86399,
                                              "minimum": 0,
                                              "type": "integer"
                                            },
                                            "expires_in_seconds": {
                                              "maximum": 604800,
                                              "minimum": 60,
                                              "type": "integer"
                                            },
                                            "max_attempts": {
                                              "maximum": 5,
                                              "minimum": 1,
                                              "type": "integer"
                                            },
                                            "message": {
                                              "description": "Message text. Length is 1 through 1000 Unicode scalar values.",
                                              "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,1000}$",
                                              "type": "string"
                                            },
                                            "retry_exhausted_action": {
                                              "description": "`continue` — continue after the retry limit; `stop` — end the active gate after the retry limit.",
                                              "enum": [
                                                "continue",
                                                "stop"
                                              ],
                                              "type": "string"
                                            },
                                            "retry_message": {
                                              "description": "Message text. Length is 1 through 1000 Unicode scalar values.",
                                              "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,1000}$",
                                              "type": "string"
                                            },
                                            "type": {
                                              "const": "ask_for_phone",
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "delay_seconds",
                                            "message",
                                            "retry_message",
                                            "max_attempts",
                                            "retry_exhausted_action",
                                            "expires_in_seconds"
                                          ],
                                          "type": "object"
                                        },
                                        {
                                          "additionalProperties": false,
                                          "properties": {
                                            "delay_seconds": {
                                              "maximum": 2592000,
                                              "minimum": 0,
                                              "type": "integer"
                                            },
                                            "tag_id": {
                                              "format": "uuid",
                                              "type": "string"
                                            },
                                            "type": {
                                              "const": "add_contact_tag",
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "delay_seconds",
                                            "tag_id"
                                          ],
                                          "type": "object"
                                        },
                                        {
                                          "additionalProperties": false,
                                          "properties": {
                                            "type": {
                                              "const": "finish",
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type"
                                          ],
                                          "type": "object"
                                        }
                                      ]
                                    },
                                    "maxItems": 20,
                                    "minItems": 1,
                                    "type": "array"
                                  }
                                },
                                "required": [
                                  "actions"
                                ],
                                "type": "object"
                              }
                            ]
                          },
                          "opening": {
                            "additionalProperties": false,
                            "properties": {
                              "direct_message": {
                                "additionalProperties": false,
                                "properties": {
                                  "delay_seconds": {
                                    "maximum": 86400,
                                    "minimum": 0,
                                    "type": "integer"
                                  },
                                  "message": {
                                    "anyOf": [
                                      {
                                        "additionalProperties": false,
                                        "properties": {
                                          "buttons": {
                                            "items": {
                                              "anyOf": [
                                                {
                                                  "additionalProperties": false,
                                                  "properties": {
                                                    "title": {
                                                      "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                                      "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                                      "type": "string"
                                                    },
                                                    "type": {
                                                      "const": "start_follow_up",
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "title"
                                                  ],
                                                  "type": "object"
                                                },
                                                {
                                                  "additionalProperties": false,
                                                  "properties": {
                                                    "title": {
                                                      "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                                      "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                                      "type": "string"
                                                    },
                                                    "type": {
                                                      "const": "url",
                                                      "type": "string"
                                                    },
                                                    "url": {
                                                      "pattern": "^(?![\\s\\S]*[\\u0000\\uD800-\\uDFFF])[Hh][Tt][Tt][Pp][Ss]?:\\/\\/[^\\s\\/:?#%]+(?::[0-9]{1,5})?(?:[\\/?#](?:[^\\s%]|%[0-9A-Fa-f]{2})*)?$",
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "title",
                                                    "url"
                                                  ],
                                                  "type": "object"
                                                }
                                              ]
                                            },
                                            "maxItems": 0,
                                            "minItems": 0,
                                            "type": "array"
                                          },
                                          "text": {
                                            "description": "Message text. Length is 1 through 1000 Unicode scalar values.",
                                            "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,1000}$",
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "buttons"
                                        ],
                                        "type": "object"
                                      },
                                      {
                                        "additionalProperties": false,
                                        "properties": {
                                          "buttons": {
                                            "items": {
                                              "anyOf": [
                                                {
                                                  "additionalProperties": false,
                                                  "properties": {
                                                    "title": {
                                                      "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                                      "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                                      "type": "string"
                                                    },
                                                    "type": {
                                                      "const": "start_follow_up",
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "title"
                                                  ],
                                                  "type": "object"
                                                },
                                                {
                                                  "additionalProperties": false,
                                                  "properties": {
                                                    "title": {
                                                      "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                                      "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                                      "type": "string"
                                                    },
                                                    "type": {
                                                      "const": "url",
                                                      "type": "string"
                                                    },
                                                    "url": {
                                                      "pattern": "^(?![\\s\\S]*[\\u0000\\uD800-\\uDFFF])[Hh][Tt][Tt][Pp][Ss]?:\\/\\/[^\\s\\/:?#%]+(?::[0-9]{1,5})?(?:[\\/?#](?:[^\\s%]|%[0-9A-Fa-f]{2})*)?$",
                                                      "type": "string"
                                                    }
                                                  },
                                                  "required": [
                                                    "type",
                                                    "title",
                                                    "url"
                                                  ],
                                                  "type": "object"
                                                }
                                              ]
                                            },
                                            "maxItems": 3,
                                            "minItems": 1,
                                            "type": "array"
                                          },
                                          "text": {
                                            "description": "Message text. Length is 1 through 640 Unicode scalar values.",
                                            "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,640}$",
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "text",
                                          "buttons"
                                        ],
                                        "type": "object"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "delay_seconds",
                                  "message"
                                ],
                                "type": "object"
                              },
                              "public_reply": {
                                "anyOf": [
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "enabled": {
                                        "const": false,
                                        "type": "boolean"
                                      }
                                    },
                                    "required": [
                                      "enabled"
                                    ],
                                    "type": "object"
                                  },
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "delay_seconds": {
                                        "maximum": 86400,
                                        "minimum": 0,
                                        "type": "integer"
                                      },
                                      "enabled": {
                                        "const": true,
                                        "type": "boolean"
                                      },
                                      "max_per_post": {
                                        "maximum": 200,
                                        "minimum": 1,
                                        "type": "integer"
                                      },
                                      "mention_mode": {
                                        "description": "`none` — do not prefix a mention; `contact` — mention the contact; `account` — mention the account.",
                                        "enum": [
                                          "none",
                                          "contact",
                                          "account"
                                        ],
                                        "type": "string"
                                      },
                                      "messages": {
                                        "items": {
                                          "description": "Public reply message. Length is 1 through 280 Unicode scalar values.",
                                          "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,280}$",
                                          "type": "string"
                                        },
                                        "minItems": 1,
                                        "type": "array"
                                      },
                                      "rotation": {
                                        "description": "`random` — choose a response randomly; `sequential` — rotate responses in their submitted order.",
                                        "enum": [
                                          "random",
                                          "sequential"
                                        ],
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "enabled",
                                      "delay_seconds",
                                      "messages",
                                      "rotation",
                                      "mention_mode",
                                      "max_per_post"
                                    ],
                                    "type": "object"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "public_reply",
                              "direct_message"
                            ],
                            "type": "object"
                          },
                          "trigger": {
                            "additionalProperties": false,
                            "properties": {
                              "type": {
                                "const": "story_mention",
                                "type": "string"
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "type": "object"
                          }
                        },
                        "required": [
                          "contact_filter",
                          "opening",
                          "follow_up",
                          "extras",
                          "trigger"
                        ],
                        "type": "object"
                      },
                      "created_at": {
                        "maxLength": 32,
                        "minLength": 20,
                        "pattern": "^(?:(?:(?!0000)\\d{4})-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|02-(?:0[1-9]|1\\d|2[0-8]))|(?:(?!0000)(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00))-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d{1,6})?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$",
                        "type": "string"
                      },
                      "draft_updated_at": {
                        "anyOf": [
                          {
                            "maxLength": 32,
                            "minLength": 20,
                            "pattern": "^(?:(?:(?!0000)\\d{4})-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|02-(?:0[1-9]|1\\d|2[0-8]))|(?:(?!0000)(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00))-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d{1,6})?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$",
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "has_unpublished_changes": {
                        "type": "boolean"
                      },
                      "id": {
                        "format": "uuid",
                        "type": "string"
                      },
                      "name": {
                        "description": "Automation name. Use 1 through 120 Unicode scalar values, without surrounding whitespace or control characters.",
                        "pattern": "^(?!\\s)(?![\\s\\S]*\\s$)(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000-\\u001F\\u007F-\\u009F\\uD800-\\uDFFF])){1,120}$",
                        "type": "string"
                      },
                      "status": {
                        "description": "`draft` — not published; `live` — processing triggers; `paused` — published but paused.",
                        "enum": [
                          "draft",
                          "live",
                          "paused"
                        ],
                        "type": "string"
                      },
                      "trigger_type": {
                        "const": "story_mention",
                        "type": "string"
                      },
                      "updated_at": {
                        "maxLength": 32,
                        "minLength": 20,
                        "pattern": "^(?:(?:(?!0000)\\d{4})-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|02-(?:0[1-9]|1\\d|2[0-8]))|(?:(?!0000)(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00))-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d{1,6})?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$",
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "account_id",
                      "name",
                      "status",
                      "has_unpublished_changes",
                      "draft_updated_at",
                      "created_at",
                      "updated_at",
                      "trigger_type",
                      "configuration",
                      "authoring_compatibility"
                    ],
                    "type": "object"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {
                      "account_id": {
                        "format": "uuid",
                        "type": "string"
                      },
                      "authoring_compatibility": {
                        "const": "read_only_legacy",
                        "type": "string"
                      },
                      "configuration": {
                        "type": "null"
                      },
                      "created_at": {
                        "maxLength": 32,
                        "minLength": 20,
                        "pattern": "^(?:(?:(?!0000)\\d{4})-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|02-(?:0[1-9]|1\\d|2[0-8]))|(?:(?!0000)(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00))-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d{1,6})?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$",
                        "type": "string"
                      },
                      "draft_updated_at": {
                        "anyOf": [
                          {
                            "maxLength": 32,
                            "minLength": 20,
                            "pattern": "^(?:(?:(?!0000)\\d{4})-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|02-(?:0[1-9]|1\\d|2[0-8]))|(?:(?!0000)(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00))-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d{1,6})?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$",
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "has_unpublished_changes": {
                        "type": "boolean"
                      },
                      "id": {
                        "format": "uuid",
                        "type": "string"
                      },
                      "name": {
                        "description": "Automation name. Use 1 through 120 Unicode scalar values, without surrounding whitespace or control characters.",
                        "pattern": "^(?!\\s)(?![\\s\\S]*\\s$)(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000-\\u001F\\u007F-\\u009F\\uD800-\\uDFFF])){1,120}$",
                        "type": "string"
                      },
                      "status": {
                        "description": "`draft` — not published; `live` — processing triggers; `paused` — published but paused.",
                        "enum": [
                          "draft",
                          "live",
                          "paused"
                        ],
                        "type": "string"
                      },
                      "trigger_type": {
                        "enum": [
                          "comment",
                          "story_reply",
                          "dm_keyword",
                          "story_mention",
                          "any_dm",
                          "live_comment",
                          "instagram_ad",
                          "legacy"
                        ],
                        "type": "string"
                      },
                      "updated_at": {
                        "maxLength": 32,
                        "minLength": 20,
                        "pattern": "^(?:(?:(?!0000)\\d{4})-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|02-(?:0[1-9]|1\\d|2[0-8]))|(?:(?!0000)(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00))-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d{1,6})?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$",
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "account_id",
                      "name",
                      "status",
                      "has_unpublished_changes",
                      "draft_updated_at",
                      "created_at",
                      "updated_at",
                      "trigger_type",
                      "configuration",
                      "authoring_compatibility"
                    ],
                    "type": "object"
                  }
                ]
              }
            },
            "required": [
              "automation"
            ],
            "type": "object"
          }
        },
        "$id": "https://levios.app/schemas/public-automation-detail-response-v1",
        "$ref": "#/components/schemas/PublicAutomationDetailResponseV1/$defs/PublicAutomationDetailResponseV1",
        "$schema": "https://json-schema.org/draft/2019-09/schema#",
        "title": "PublicAutomationDetailResponseV1",
        "x-levios-schema-version": 1
      },
      "PublicAutomationListResponseV1": {
        "$defs": {
          "PublicAutomationListResponseV1": {
            "additionalProperties": false,
            "properties": {
              "items": {
                "items": {
                  "anyOf": [
                    {
                      "additionalProperties": false,
                      "properties": {
                        "account_id": {
                          "format": "uuid",
                          "type": "string"
                        },
                        "authoring_compatibility": {
                          "const": "public_v1",
                          "type": "string"
                        },
                        "has_unpublished_changes": {
                          "type": "boolean"
                        },
                        "id": {
                          "format": "uuid",
                          "type": "string"
                        },
                        "name": {
                          "description": "Automation name. Use 1 through 120 Unicode scalar values, without surrounding whitespace or control characters.",
                          "pattern": "^(?!\\s)(?![\\s\\S]*\\s$)(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000-\\u001F\\u007F-\\u009F\\uD800-\\uDFFF])){1,120}$",
                          "type": "string"
                        },
                        "status": {
                          "description": "Values: `draft`: saved but not processing new triggers; `live`: active and able to process matching triggers; `paused`: inactive until it is activated again.",
                          "enum": [
                            "draft",
                            "live",
                            "paused"
                          ],
                          "type": "string"
                        },
                        "trigger_type": {
                          "description": "Values: `comment`: a comment on an Instagram post; `dm_keyword`: a direct message that matches configured keywords; `story_mention`: a mention of the Instagram account in a story; `story_reply`: a reply to an Instagram story.",
                          "enum": [
                            "comment",
                            "story_reply",
                            "dm_keyword",
                            "story_mention"
                          ],
                          "type": "string"
                        },
                        "updated_at": {
                          "maxLength": 32,
                          "minLength": 20,
                          "pattern": "^(?:(?:(?!0000)\\d{4})-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|02-(?:0[1-9]|1\\d|2[0-8]))|(?:(?!0000)(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00))-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d{1,6})?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "account_id",
                        "name",
                        "status",
                        "has_unpublished_changes",
                        "updated_at",
                        "trigger_type",
                        "authoring_compatibility"
                      ],
                      "type": "object"
                    },
                    {
                      "additionalProperties": false,
                      "properties": {
                        "account_id": {
                          "format": "uuid",
                          "type": "string"
                        },
                        "authoring_compatibility": {
                          "const": "read_only_legacy",
                          "type": "string"
                        },
                        "has_unpublished_changes": {
                          "type": "boolean"
                        },
                        "id": {
                          "format": "uuid",
                          "type": "string"
                        },
                        "name": {
                          "description": "Automation name. Use 1 through 120 Unicode scalar values, without surrounding whitespace or control characters.",
                          "pattern": "^(?!\\s)(?![\\s\\S]*\\s$)(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000-\\u001F\\u007F-\\u009F\\uD800-\\uDFFF])){1,120}$",
                          "type": "string"
                        },
                        "status": {
                          "description": "Values: `draft`: saved but not processing new triggers; `live`: active and able to process matching triggers; `paused`: inactive until it is activated again.",
                          "enum": [
                            "draft",
                            "live",
                            "paused"
                          ],
                          "type": "string"
                        },
                        "trigger_type": {
                          "enum": [
                            "comment",
                            "story_reply",
                            "dm_keyword",
                            "story_mention",
                            "any_dm",
                            "live_comment",
                            "instagram_ad",
                            "legacy"
                          ],
                          "type": "string"
                        },
                        "updated_at": {
                          "maxLength": 32,
                          "minLength": 20,
                          "pattern": "^(?:(?:(?!0000)\\d{4})-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|02-(?:0[1-9]|1\\d|2[0-8]))|(?:(?!0000)(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00))-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d{1,6})?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "account_id",
                        "name",
                        "status",
                        "has_unpublished_changes",
                        "updated_at",
                        "trigger_type",
                        "authoring_compatibility"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "maxItems": 50,
                "type": "array"
              },
              "next_cursor": {
                "anyOf": [
                  {
                    "maxLength": 1024,
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "items",
              "next_cursor"
            ],
            "type": "object"
          }
        },
        "$id": "https://levios.app/schemas/public-automation-list-response-v1",
        "$ref": "#/components/schemas/PublicAutomationListResponseV1/$defs/PublicAutomationListResponseV1",
        "$schema": "https://json-schema.org/draft/2019-09/schema#",
        "title": "PublicAutomationListResponseV1",
        "x-levios-schema-version": 1
      },
      "PublicAutomationMetrics": {
        "$defs": {
          "PublicAutomationMetrics": {
            "additionalProperties": false,
            "properties": {
              "activations_total": {
                "description": "All-time successful automation activations.",
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              },
              "automation_id": {
                "description": "Automation whose account-scoped metrics were read.",
                "format": "uuid",
                "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
                "type": "string"
              },
              "dms_last_7d": {
                "description": "Sent direct-message intents in the trailing seven days.",
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              },
              "dms_total": {
                "description": "All-time sent direct-message intents.",
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              },
              "last_fired_at": {
                "anyOf": [
                  {
                    "format": "date-time",
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Timestamp of the most recent successful automation event, or null when never fired."
              }
            },
            "required": [
              "automation_id",
              "activations_total",
              "dms_total",
              "dms_last_7d",
              "last_fired_at"
            ],
            "type": "object"
          }
        },
        "$id": "https://levios.app/schemas/public-automation-metrics-v1",
        "$ref": "#/components/schemas/PublicAutomationMetrics/$defs/PublicAutomationMetrics",
        "$schema": "https://json-schema.org/draft/2019-09/schema#",
        "title": "PublicAutomationMetrics",
        "x-levios-max-serialized-bytes": 65536,
        "x-levios-schema-version": 1
      },
      "PublicAutomationPlanDetailsV1": {
        "$defs": {
          "PublicAutomationPlanDetailsV1": {
            "additionalProperties": false,
            "properties": {
              "reason": {
                "anyOf": [
                  {
                    "additionalProperties": false,
                    "properties": {
                      "capability": {
                        "maxLength": 64,
                        "minLength": 1,
                        "type": "string"
                      },
                      "type": {
                        "enum": [
                          "trigger_kind",
                          "action_kind",
                          "feature"
                        ],
                        "type": "string"
                      },
                      "value": {
                        "maxLength": 64,
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "capability",
                      "type",
                      "value"
                    ],
                    "type": "object"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {
                      "active_automations": {
                        "maximum": 9007199254740991,
                        "minimum": 0,
                        "type": "integer"
                      },
                      "limit": {
                        "maximum": 9007199254740991,
                        "minimum": 0,
                        "type": "integer"
                      },
                      "scope": {
                        "const": "account_active_automations",
                        "type": "string"
                      }
                    },
                    "required": [
                      "active_automations",
                      "limit",
                      "scope"
                    ],
                    "type": "object"
                  }
                ]
              }
            },
            "required": [
              "reason"
            ],
            "type": "object"
          }
        },
        "$id": "https://levios.app/schemas/public-automation-plan-details-v1",
        "$ref": "#/components/schemas/PublicAutomationPlanDetailsV1/$defs/PublicAutomationPlanDetailsV1",
        "$schema": "https://json-schema.org/draft/2019-09/schema#",
        "title": "PublicAutomationPlanDetailsV1",
        "x-levios-schema-version": 1
      },
      "PublicAutomationUpdateV1": {
        "$defs": {
          "PublicAutomationUpdateV1": {
            "additionalProperties": false,
            "anyOf": [
              {
                "required": [
                  "name"
                ]
              },
              {
                "required": [
                  "configuration"
                ]
              }
            ],
            "examples": [
              {
                "account_id": "11111111-1111-4111-8111-111111111111",
                "configuration": {
                  "contact_filter": "anyone",
                  "extras": {
                    "cooldown": {
                      "mode": "fixed",
                      "seconds": 21600
                    }
                  },
                  "follow_up": {
                    "actions": [
                      {
                        "delay_seconds": 0,
                        "expires_in_seconds": 86400,
                        "max_attempts": 3,
                        "message": "What is your best email address?",
                        "retry_exhausted_action": "stop",
                        "retry_message": "Send a valid email address.",
                        "type": "ask_for_email"
                      },
                      {
                        "buttons": [
                          {
                            "title": "Open content",
                            "type": "url",
                            "url": "https://example.com/content"
                          }
                        ],
                        "delay_seconds": 0,
                        "text": "Here is your access link.",
                        "type": "send_message"
                      },
                      {
                        "type": "finish"
                      }
                    ]
                  },
                  "opening": {
                    "direct_message": {
                      "delay_seconds": 0,
                      "message": {
                        "buttons": [
                          {
                            "title": "Continue",
                            "type": "start_follow_up"
                          }
                        ],
                        "text": "Tap below to continue."
                      }
                    },
                    "public_reply": {
                      "delay_seconds": 0,
                      "enabled": true,
                      "max_per_post": 50,
                      "mention_mode": "none",
                      "messages": [
                        "I sent it by DM."
                      ],
                      "rotation": "random"
                    }
                  },
                  "trigger": {
                    "keywords": {
                      "match_mode": "whole_word",
                      "mode": "specific",
                      "values": [
                        "guide"
                      ]
                    },
                    "publication": {
                      "mode": "specific",
                      "reference": {
                        "type": "url",
                        "value": "https://www.instagram.com/p/ABC123/"
                      }
                    },
                    "type": "comment"
                  }
                },
                "expected_updated_at": "2026-08-22T15:30:00.000Z",
                "name": "Updated campaign name"
              }
            ],
            "properties": {
              "account_id": {
                "format": "uuid",
                "type": "string"
              },
              "configuration": {
                "additionalProperties": false,
                "properties": {
                  "contact_filter": {
                    "description": "`anyone` — every eligible contact; `followers_only` — confirmed followers; `non_followers_only` — confirmed non-followers; `previous_dm_contacts` — contacts with an inbound DM before this trigger; `existing_contacts` — contacts already known before this trigger.",
                    "enum": [
                      "anyone",
                      "followers_only",
                      "non_followers_only",
                      "previous_dm_contacts",
                      "existing_contacts"
                    ],
                    "type": "string"
                  },
                  "extras": {
                    "additionalProperties": false,
                    "properties": {
                      "cooldown": {
                        "anyOf": [
                          {
                            "additionalProperties": false,
                            "properties": {
                              "mode": {
                                "const": "none",
                                "type": "string"
                              }
                            },
                            "required": [
                              "mode"
                            ],
                            "type": "object"
                          },
                          {
                            "additionalProperties": false,
                            "properties": {
                              "mode": {
                                "const": "fixed",
                                "type": "string"
                              },
                              "seconds": {
                                "maximum": 2592000,
                                "minimum": 1,
                                "type": "integer"
                              }
                            },
                            "required": [
                              "mode",
                              "seconds"
                            ],
                            "type": "object"
                          }
                        ]
                      }
                    },
                    "required": [
                      "cooldown"
                    ],
                    "type": "object"
                  },
                  "follow_up": {
                    "anyOf": [
                      {
                        "type": "null"
                      },
                      {
                        "additionalProperties": false,
                        "properties": {
                          "actions": {
                            "items": {
                              "anyOf": [
                                {
                                  "anyOf": [
                                    {
                                      "additionalProperties": false,
                                      "properties": {
                                        "buttons": {
                                          "items": {
                                            "additionalProperties": false,
                                            "properties": {
                                              "title": {
                                                "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                                "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                                "type": "string"
                                              },
                                              "type": {
                                                "const": "url",
                                                "type": "string"
                                              },
                                              "url": {
                                                "pattern": "^(?![\\s\\S]*[\\u0000\\uD800-\\uDFFF])[Hh][Tt][Tt][Pp][Ss]?:\\/\\/[^\\s\\/:?#%]+(?::[0-9]{1,5})?(?:[\\/?#](?:[^\\s%]|%[0-9A-Fa-f]{2})*)?$",
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "title",
                                              "url"
                                            ],
                                            "type": "object"
                                          },
                                          "maxItems": 0,
                                          "minItems": 0,
                                          "type": "array"
                                        },
                                        "delay_seconds": {
                                          "maximum": 86399,
                                          "minimum": 0,
                                          "type": "integer"
                                        },
                                        "text": {
                                          "description": "Message text. Length is 1 through 1000 Unicode scalar values.",
                                          "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,1000}$",
                                          "type": "string"
                                        },
                                        "type": {
                                          "const": "send_message",
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "delay_seconds",
                                        "text",
                                        "buttons"
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "additionalProperties": false,
                                      "properties": {
                                        "buttons": {
                                          "items": {
                                            "additionalProperties": false,
                                            "properties": {
                                              "title": {
                                                "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                                "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                                "type": "string"
                                              },
                                              "type": {
                                                "const": "url",
                                                "type": "string"
                                              },
                                              "url": {
                                                "pattern": "^(?![\\s\\S]*[\\u0000\\uD800-\\uDFFF])[Hh][Tt][Tt][Pp][Ss]?:\\/\\/[^\\s\\/:?#%]+(?::[0-9]{1,5})?(?:[\\/?#](?:[^\\s%]|%[0-9A-Fa-f]{2})*)?$",
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "title",
                                              "url"
                                            ],
                                            "type": "object"
                                          },
                                          "maxItems": 3,
                                          "minItems": 1,
                                          "type": "array"
                                        },
                                        "delay_seconds": {
                                          "maximum": 86399,
                                          "minimum": 0,
                                          "type": "integer"
                                        },
                                        "text": {
                                          "description": "Message text. Length is 1 through 640 Unicode scalar values.",
                                          "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,640}$",
                                          "type": "string"
                                        },
                                        "type": {
                                          "const": "send_message",
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "delay_seconds",
                                        "text",
                                        "buttons"
                                      ],
                                      "type": "object"
                                    }
                                  ]
                                },
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "delay_seconds": {
                                      "maximum": 86399,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "media_type": {
                                      "description": "`image`, `video`, `audio`, or `file` identifies the outbound Instagram attachment type.",
                                      "enum": [
                                        "image",
                                        "video",
                                        "audio",
                                        "file"
                                      ],
                                      "type": "string"
                                    },
                                    "type": {
                                      "const": "send_media",
                                      "type": "string"
                                    },
                                    "url": {
                                      "pattern": "^(?![\\s\\S]*[\\u0000\\uD800-\\uDFFF])[Hh][Tt][Tt][Pp][Ss]?:\\/\\/[^\\s\\/:?#%]+(?::[0-9]{1,5})?(?:[\\/?#](?:[^\\s%]|%[0-9A-Fa-f]{2})*)?$",
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "delay_seconds",
                                    "media_type",
                                    "url"
                                  ],
                                  "type": "object"
                                },
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "cards": {
                                      "items": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "buttons": {
                                            "items": {
                                              "additionalProperties": false,
                                              "properties": {
                                                "title": {
                                                  "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                                  "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                                  "type": "string"
                                                },
                                                "type": {
                                                  "const": "url",
                                                  "type": "string"
                                                },
                                                "url": {
                                                  "pattern": "^(?![\\s\\S]*[\\u0000\\uD800-\\uDFFF])[Hh][Tt][Tt][Pp][Ss]?:\\/\\/[^\\s\\/:?#%]+(?::[0-9]{1,5})?(?:[\\/?#](?:[^\\s%]|%[0-9A-Fa-f]{2})*)?$",
                                                  "type": "string"
                                                }
                                              },
                                              "required": [
                                                "type",
                                                "title",
                                                "url"
                                              ],
                                              "type": "object"
                                            },
                                            "maxItems": 3,
                                            "minItems": 1,
                                            "type": "array"
                                          },
                                          "image_url": {
                                            "pattern": "^(?![\\s\\S]*[\\u0000\\uD800-\\uDFFF])[Hh][Tt][Tt][Pp][Ss]?:\\/\\/[^\\s\\/:?#%]+(?::[0-9]{1,5})?(?:[\\/?#](?:[^\\s%]|%[0-9A-Fa-f]{2})*)?$",
                                            "type": "string"
                                          },
                                          "subtitle": {
                                            "description": "Card subtitle. Length is 0 through 80 Unicode scalar values.",
                                            "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){0,80}$",
                                            "type": "string"
                                          },
                                          "title": {
                                            "description": "Card title. Length is 1 through 80 Unicode scalar values.",
                                            "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,80}$",
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "title",
                                          "image_url",
                                          "buttons"
                                        ],
                                        "type": "object"
                                      },
                                      "maxItems": 10,
                                      "minItems": 1,
                                      "type": "array"
                                    },
                                    "delay_seconds": {
                                      "maximum": 86399,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "type": {
                                      "const": "send_carousel",
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "delay_seconds",
                                    "cards"
                                  ],
                                  "type": "object"
                                },
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "buttons": {
                                      "additionalProperties": false,
                                      "properties": {
                                        "confirm_title": {
                                          "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                          "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                          "type": "string"
                                        },
                                        "open_profile_title": {
                                          "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                          "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "open_profile_title",
                                        "confirm_title"
                                      ],
                                      "type": "object"
                                    },
                                    "delay_seconds": {
                                      "maximum": 86399,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "expires_in_seconds": {
                                      "maximum": 604800,
                                      "minimum": 60,
                                      "type": "integer"
                                    },
                                    "max_attempts": {
                                      "maximum": 10,
                                      "minimum": 1,
                                      "type": "integer"
                                    },
                                    "message": {
                                      "description": "Message text. Length is 1 through 640 Unicode scalar values.",
                                      "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,640}$",
                                      "type": "string"
                                    },
                                    "not_following_message": {
                                      "anyOf": [
                                        {
                                          "description": "Message text. Length is 1 through 640 Unicode scalar values.",
                                          "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,640}$",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "description": "Message text. Length is 1 through 640 Unicode scalar values."
                                    },
                                    "recheck_after_seconds": {
                                      "maximum": 86400,
                                      "minimum": 60,
                                      "type": "integer"
                                    },
                                    "retry_exhausted_action": {
                                      "description": "`continue` — continue after the retry limit; `stop` — end the active gate after the retry limit.",
                                      "enum": [
                                        "continue",
                                        "stop"
                                      ],
                                      "type": "string"
                                    },
                                    "type": {
                                      "const": "ask_to_follow",
                                      "type": "string"
                                    },
                                    "verification_mode": {
                                      "description": "`trusted_click` — trust the confirmation click; `strict` — verify follow status with Instagram.",
                                      "enum": [
                                        "trusted_click",
                                        "strict"
                                      ],
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "delay_seconds",
                                    "message",
                                    "buttons",
                                    "verification_mode",
                                    "not_following_message",
                                    "max_attempts",
                                    "retry_exhausted_action",
                                    "recheck_after_seconds",
                                    "expires_in_seconds"
                                  ],
                                  "type": "object"
                                },
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "delay_seconds": {
                                      "maximum": 86399,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "expires_in_seconds": {
                                      "maximum": 604800,
                                      "minimum": 60,
                                      "type": "integer"
                                    },
                                    "max_attempts": {
                                      "maximum": 5,
                                      "minimum": 1,
                                      "type": "integer"
                                    },
                                    "message": {
                                      "description": "Message text. Length is 1 through 1000 Unicode scalar values.",
                                      "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,1000}$",
                                      "type": "string"
                                    },
                                    "retry_exhausted_action": {
                                      "description": "`continue` — continue after the retry limit; `stop` — end the active gate after the retry limit.",
                                      "enum": [
                                        "continue",
                                        "stop"
                                      ],
                                      "type": "string"
                                    },
                                    "retry_message": {
                                      "description": "Message text. Length is 1 through 1000 Unicode scalar values.",
                                      "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,1000}$",
                                      "type": "string"
                                    },
                                    "type": {
                                      "const": "ask_for_email",
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "delay_seconds",
                                    "message",
                                    "retry_message",
                                    "max_attempts",
                                    "retry_exhausted_action",
                                    "expires_in_seconds"
                                  ],
                                  "type": "object"
                                },
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "delay_seconds": {
                                      "maximum": 86399,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "expires_in_seconds": {
                                      "maximum": 604800,
                                      "minimum": 60,
                                      "type": "integer"
                                    },
                                    "max_attempts": {
                                      "maximum": 5,
                                      "minimum": 1,
                                      "type": "integer"
                                    },
                                    "message": {
                                      "description": "Message text. Length is 1 through 1000 Unicode scalar values.",
                                      "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,1000}$",
                                      "type": "string"
                                    },
                                    "retry_exhausted_action": {
                                      "description": "`continue` — continue after the retry limit; `stop` — end the active gate after the retry limit.",
                                      "enum": [
                                        "continue",
                                        "stop"
                                      ],
                                      "type": "string"
                                    },
                                    "retry_message": {
                                      "description": "Message text. Length is 1 through 1000 Unicode scalar values.",
                                      "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,1000}$",
                                      "type": "string"
                                    },
                                    "type": {
                                      "const": "ask_for_phone",
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "delay_seconds",
                                    "message",
                                    "retry_message",
                                    "max_attempts",
                                    "retry_exhausted_action",
                                    "expires_in_seconds"
                                  ],
                                  "type": "object"
                                },
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "delay_seconds": {
                                      "maximum": 2592000,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "tag_id": {
                                      "format": "uuid",
                                      "type": "string"
                                    },
                                    "type": {
                                      "const": "add_contact_tag",
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "delay_seconds",
                                    "tag_id"
                                  ],
                                  "type": "object"
                                },
                                {
                                  "additionalProperties": false,
                                  "properties": {
                                    "type": {
                                      "const": "finish",
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "type"
                                  ],
                                  "type": "object"
                                }
                              ]
                            },
                            "maxItems": 20,
                            "minItems": 1,
                            "type": "array"
                          }
                        },
                        "required": [
                          "actions"
                        ],
                        "type": "object"
                      }
                    ]
                  },
                  "opening": {
                    "additionalProperties": false,
                    "properties": {
                      "direct_message": {
                        "additionalProperties": false,
                        "properties": {
                          "delay_seconds": {
                            "maximum": 86400,
                            "minimum": 0,
                            "type": "integer"
                          },
                          "message": {
                            "anyOf": [
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "buttons": {
                                    "items": {
                                      "anyOf": [
                                        {
                                          "additionalProperties": false,
                                          "properties": {
                                            "title": {
                                              "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                              "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                              "type": "string"
                                            },
                                            "type": {
                                              "const": "start_follow_up",
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "title"
                                          ],
                                          "type": "object"
                                        },
                                        {
                                          "additionalProperties": false,
                                          "properties": {
                                            "title": {
                                              "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                              "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                              "type": "string"
                                            },
                                            "type": {
                                              "const": "url",
                                              "type": "string"
                                            },
                                            "url": {
                                              "pattern": "^(?![\\s\\S]*[\\u0000\\uD800-\\uDFFF])[Hh][Tt][Tt][Pp][Ss]?:\\/\\/[^\\s\\/:?#%]+(?::[0-9]{1,5})?(?:[\\/?#](?:[^\\s%]|%[0-9A-Fa-f]{2})*)?$",
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "title",
                                            "url"
                                          ],
                                          "type": "object"
                                        }
                                      ]
                                    },
                                    "maxItems": 0,
                                    "minItems": 0,
                                    "type": "array"
                                  },
                                  "text": {
                                    "description": "Message text. Length is 1 through 1000 Unicode scalar values.",
                                    "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,1000}$",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "text",
                                  "buttons"
                                ],
                                "type": "object"
                              },
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "buttons": {
                                    "items": {
                                      "anyOf": [
                                        {
                                          "additionalProperties": false,
                                          "properties": {
                                            "title": {
                                              "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                              "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                              "type": "string"
                                            },
                                            "type": {
                                              "const": "start_follow_up",
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "title"
                                          ],
                                          "type": "object"
                                        },
                                        {
                                          "additionalProperties": false,
                                          "properties": {
                                            "title": {
                                              "description": "Button title. Length is 1 through 20 Unicode scalar values.",
                                              "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,20}$",
                                              "type": "string"
                                            },
                                            "type": {
                                              "const": "url",
                                              "type": "string"
                                            },
                                            "url": {
                                              "pattern": "^(?![\\s\\S]*[\\u0000\\uD800-\\uDFFF])[Hh][Tt][Tt][Pp][Ss]?:\\/\\/[^\\s\\/:?#%]+(?::[0-9]{1,5})?(?:[\\/?#](?:[^\\s%]|%[0-9A-Fa-f]{2})*)?$",
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "title",
                                            "url"
                                          ],
                                          "type": "object"
                                        }
                                      ]
                                    },
                                    "maxItems": 3,
                                    "minItems": 1,
                                    "type": "array"
                                  },
                                  "text": {
                                    "description": "Message text. Length is 1 through 640 Unicode scalar values.",
                                    "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,640}$",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "text",
                                  "buttons"
                                ],
                                "type": "object"
                              }
                            ]
                          }
                        },
                        "required": [
                          "delay_seconds",
                          "message"
                        ],
                        "type": "object"
                      },
                      "public_reply": {
                        "anyOf": [
                          {
                            "additionalProperties": false,
                            "properties": {
                              "enabled": {
                                "const": false,
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "enabled"
                            ],
                            "type": "object"
                          },
                          {
                            "additionalProperties": false,
                            "properties": {
                              "delay_seconds": {
                                "maximum": 86400,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "enabled": {
                                "const": true,
                                "type": "boolean"
                              },
                              "max_per_post": {
                                "maximum": 200,
                                "minimum": 1,
                                "type": "integer"
                              },
                              "mention_mode": {
                                "description": "`none` — do not prefix a mention; `contact` — mention the contact; `account` — mention the account.",
                                "enum": [
                                  "none",
                                  "contact",
                                  "account"
                                ],
                                "type": "string"
                              },
                              "messages": {
                                "items": {
                                  "description": "Public reply message. Length is 1 through 280 Unicode scalar values.",
                                  "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,280}$",
                                  "type": "string"
                                },
                                "minItems": 1,
                                "type": "array"
                              },
                              "rotation": {
                                "description": "`random` — choose a response randomly; `sequential` — rotate responses in their submitted order.",
                                "enum": [
                                  "random",
                                  "sequential"
                                ],
                                "type": "string"
                              }
                            },
                            "required": [
                              "enabled",
                              "delay_seconds",
                              "messages",
                              "rotation",
                              "mention_mode",
                              "max_per_post"
                            ],
                            "type": "object"
                          }
                        ]
                      }
                    },
                    "required": [
                      "public_reply",
                      "direct_message"
                    ],
                    "type": "object"
                  },
                  "trigger": {
                    "anyOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "keywords": {
                            "anyOf": [
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "mode": {
                                    "const": "any",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "mode"
                                ],
                                "type": "object"
                              },
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "match_mode": {
                                    "description": "`whole_word` — match an isolated keyword or phrase; `substring` — match it anywhere in the text.",
                                    "enum": [
                                      "whole_word",
                                      "substring"
                                    ],
                                    "type": "string"
                                  },
                                  "mode": {
                                    "const": "specific",
                                    "type": "string"
                                  },
                                  "values": {
                                    "items": {
                                      "description": "Keyword or phrase. Length is 1 through 100 Unicode scalar values.",
                                      "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,100}$",
                                      "type": "string"
                                    },
                                    "maxItems": 50,
                                    "minItems": 1,
                                    "type": "array"
                                  }
                                },
                                "required": [
                                  "mode",
                                  "match_mode",
                                  "values"
                                ],
                                "type": "object"
                              }
                            ]
                          },
                          "publication": {
                            "anyOf": [
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "mode": {
                                    "const": "all",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "mode"
                                ],
                                "type": "object"
                              },
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "mode": {
                                    "const": "next_published",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "mode"
                                ],
                                "type": "object"
                              },
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "mode": {
                                    "const": "specific",
                                    "type": "string"
                                  },
                                  "reference": {
                                    "anyOf": [
                                      {
                                        "additionalProperties": false,
                                        "properties": {
                                          "type": {
                                            "const": "id",
                                            "type": "string"
                                          },
                                          "value": {
                                            "description": "Opaque Instagram media ID returned by Levios discovery. Use 1 through 256 printable ASCII characters.",
                                            "pattern": "^[!-~]{1,256}$",
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "value"
                                        ],
                                        "type": "object"
                                      },
                                      {
                                        "additionalProperties": false,
                                        "properties": {
                                          "type": {
                                            "const": "url",
                                            "type": "string"
                                          },
                                          "value": {
                                            "pattern": "^(?![\\s\\S]*[\\u0000\\uD800-\\uDFFF])[Hh][Tt][Tt][Pp][Ss]:\\/\\/(?:[Ww][Ww][Ww]\\.)?[Ii][Nn][Ss][Tt][Aa][Gg][Rr][Aa][Mm]\\.[Cc][Oo][Mm]\\/(?:[Pp]|[Rr][Ee][Ee][Ll])\\/[A-Za-z0-9_-]+\\/?(?:[?#](?:[^\\s%]|%[0-9A-Fa-f]{2})*)?$",
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "value"
                                        ],
                                        "type": "object"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "mode",
                                  "reference"
                                ],
                                "type": "object"
                              }
                            ]
                          },
                          "type": {
                            "const": "comment",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "publication",
                          "keywords"
                        ],
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "properties": {
                          "keywords": {
                            "anyOf": [
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "mode": {
                                    "const": "any",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "mode"
                                ],
                                "type": "object"
                              },
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "match_mode": {
                                    "description": "`whole_word` — match an isolated keyword or phrase; `substring` — match it anywhere in the text.",
                                    "enum": [
                                      "whole_word",
                                      "substring"
                                    ],
                                    "type": "string"
                                  },
                                  "mode": {
                                    "const": "specific",
                                    "type": "string"
                                  },
                                  "values": {
                                    "items": {
                                      "description": "Keyword or phrase. Length is 1 through 100 Unicode scalar values.",
                                      "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,100}$",
                                      "type": "string"
                                    },
                                    "maxItems": 50,
                                    "minItems": 1,
                                    "type": "array"
                                  }
                                },
                                "required": [
                                  "mode",
                                  "match_mode",
                                  "values"
                                ],
                                "type": "object"
                              }
                            ]
                          },
                          "response_type": {
                            "const": "text",
                            "type": "string"
                          },
                          "story": {
                            "anyOf": [
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "mode": {
                                    "const": "any",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "mode"
                                ],
                                "type": "object"
                              },
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "mode": {
                                    "const": "specific",
                                    "type": "string"
                                  },
                                  "reference": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "type": {
                                        "const": "id",
                                        "type": "string"
                                      },
                                      "value": {
                                        "description": "Opaque Instagram media ID returned by Levios discovery. Use 1 through 256 printable ASCII characters.",
                                        "pattern": "^[!-~]{1,256}$",
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "value"
                                    ],
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "mode",
                                  "reference"
                                ],
                                "type": "object"
                              }
                            ]
                          },
                          "type": {
                            "const": "story_reply",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "response_type",
                          "story",
                          "keywords"
                        ],
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "properties": {
                          "reactions": {
                            "anyOf": [
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "mode": {
                                    "const": "any",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "mode"
                                ],
                                "type": "object"
                              },
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "emojis": {
                                    "items": {
                                      "description": "Reaction emoji. Length is 1 through 16 Unicode scalar values.",
                                      "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,16}$",
                                      "type": "string"
                                    },
                                    "maxItems": 50,
                                    "minItems": 1,
                                    "type": "array"
                                  },
                                  "mode": {
                                    "const": "specific",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "mode",
                                  "emojis"
                                ],
                                "type": "object"
                              }
                            ]
                          },
                          "response_type": {
                            "const": "reaction",
                            "type": "string"
                          },
                          "story": {
                            "anyOf": [
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "mode": {
                                    "const": "any",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "mode"
                                ],
                                "type": "object"
                              },
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "mode": {
                                    "const": "specific",
                                    "type": "string"
                                  },
                                  "reference": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "type": {
                                        "const": "id",
                                        "type": "string"
                                      },
                                      "value": {
                                        "description": "Opaque Instagram media ID returned by Levios discovery. Use 1 through 256 printable ASCII characters.",
                                        "pattern": "^[!-~]{1,256}$",
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "value"
                                    ],
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "mode",
                                  "reference"
                                ],
                                "type": "object"
                              }
                            ]
                          },
                          "type": {
                            "const": "story_reply",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "response_type",
                          "story",
                          "reactions"
                        ],
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "properties": {
                          "keywords": {
                            "additionalProperties": false,
                            "properties": {
                              "match_mode": {
                                "description": "`whole_word` — match an isolated keyword or phrase; `substring` — match it anywhere in the text.",
                                "enum": [
                                  "whole_word",
                                  "substring"
                                ],
                                "type": "string"
                              },
                              "mode": {
                                "const": "specific",
                                "type": "string"
                              },
                              "values": {
                                "items": {
                                  "description": "Keyword or phrase. Length is 1 through 100 Unicode scalar values.",
                                  "pattern": "^(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000\\uD800-\\uDFFF])){1,100}$",
                                  "type": "string"
                                },
                                "maxItems": 50,
                                "minItems": 1,
                                "type": "array"
                              }
                            },
                            "required": [
                              "mode",
                              "match_mode",
                              "values"
                            ],
                            "type": "object"
                          },
                          "type": {
                            "const": "dm_keyword",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "keywords"
                        ],
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "properties": {
                          "type": {
                            "const": "story_mention",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type"
                        ],
                        "type": "object"
                      }
                    ]
                  }
                },
                "required": [
                  "contact_filter",
                  "opening",
                  "follow_up",
                  "extras",
                  "trigger"
                ],
                "type": "object"
              },
              "expected_updated_at": {
                "maxLength": 32,
                "minLength": 20,
                "pattern": "^(?:(?:(?!0000)\\d{4})-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|02-(?:0[1-9]|1\\d|2[0-8]))|(?:(?!0000)(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00))-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d{1,6})?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$",
                "type": "string"
              },
              "name": {
                "description": "Automation name. Use 1 through 120 Unicode scalar values, without surrounding whitespace or control characters.",
                "pattern": "^(?!\\s)(?![\\s\\S]*\\s$)(?:(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[^\\u0000-\\u001F\\u007F-\\u009F\\uD800-\\uDFFF])){1,120}$",
                "type": "string"
              }
            },
            "required": [
              "account_id",
              "expected_updated_at"
            ],
            "type": "object"
          }
        },
        "$id": "https://levios.app/schemas/public-automation-update-v1",
        "$ref": "#/components/schemas/PublicAutomationUpdateV1/$defs/PublicAutomationUpdateV1",
        "$schema": "https://json-schema.org/draft/2019-09/schema#",
        "title": "PublicAutomationUpdateV1",
        "x-levios-max-serialized-bytes": 1048576,
        "x-levios-schema-version": 1
      },
      "PublicAutomationValidationDetailsV1": {
        "$defs": {
          "PublicAutomationValidationDetailsV1": {
            "additionalProperties": false,
            "properties": {
              "issues": {
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "code": {
                      "maxLength": 64,
                      "minLength": 1,
                      "type": "string"
                    },
                    "message": {
                      "maxLength": 256,
                      "minLength": 1,
                      "type": "string"
                    },
                    "path": {
                      "items": {
                        "anyOf": [
                          {
                            "maxLength": 64,
                            "minLength": 1,
                            "type": "string"
                          },
                          {
                            "maximum": 9007199254740991,
                            "minimum": 0,
                            "type": "integer"
                          }
                        ]
                      },
                      "maxItems": 16,
                      "type": "array"
                    }
                  },
                  "required": [
                    "code",
                    "path",
                    "message"
                  ],
                  "type": "object"
                },
                "maxItems": 20,
                "minItems": 1,
                "type": "array"
              },
              "truncated": {
                "type": "boolean"
              }
            },
            "required": [
              "issues",
              "truncated"
            ],
            "type": "object"
          }
        },
        "$id": "https://levios.app/schemas/public-automation-validation-details-v1",
        "$ref": "#/components/schemas/PublicAutomationValidationDetailsV1/$defs/PublicAutomationValidationDetailsV1",
        "$schema": "https://json-schema.org/draft/2019-09/schema#",
        "title": "PublicAutomationValidationDetailsV1",
        "x-levios-schema-version": 1
      },
      "PublicContactDetailResult": {
        "$defs": {
          "PublicContactDetailResult": {
            "additionalProperties": false,
            "properties": {
              "contact": {
                "additionalProperties": false,
                "properties": {
                  "account_id": {
                    "format": "uuid",
                    "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
                    "type": "string"
                  },
                  "account_type": {
                    "anyOf": [
                      {
                        "description": "Values: `BUSINESS`: an Instagram business account; `CREATOR`: an Instagram creator account; `PERSONAL`: an Instagram personal account; `UNKNOWN`: the Instagram account type is unavailable.",
                        "enum": [
                          "PERSONAL",
                          "BUSINESS",
                          "CREATOR",
                          "UNKNOWN"
                        ],
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "attributes": {
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "created_at": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "id": {
                          "pattern": "^[1-9][0-9]{0,18}$",
                          "type": "string"
                        },
                        "key": {
                          "maxLength": 100,
                          "minLength": 1,
                          "type": "string"
                        },
                        "source": {
                          "description": "Values: `capture`: derived from an automation capture rule; `lead_capture`: provided by the contact through a lead-capture step; `manual`: set manually.",
                          "enum": [
                            "capture",
                            "lead_capture",
                            "manual"
                          ],
                          "type": "string"
                        },
                        "source_ref": {
                          "anyOf": [
                            {
                              "maxLength": 200,
                              "minLength": 1,
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "updated_at": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "value": {
                          "anyOf": [
                            {
                              "maxLength": 10000,
                              "minLength": 0,
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "key",
                        "value",
                        "source",
                        "source_ref",
                        "created_at",
                        "updated_at"
                      ],
                      "type": "object"
                    },
                    "maxItems": 1000,
                    "type": "array"
                  },
                  "biography": {
                    "anyOf": [
                      {
                        "maxLength": 100000,
                        "minLength": 1,
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "blocked": {
                    "type": "boolean"
                  },
                  "blocked_at": {
                    "anyOf": [
                      {
                        "format": "date-time",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "created_at": {
                    "format": "date-time",
                    "type": "string"
                  },
                  "email": {
                    "anyOf": [
                      {
                        "maxLength": 320,
                        "minLength": 1,
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "enrichment_status": {
                    "description": "Values: `failed`: the most recent enrichment attempt failed; `fresh`: the enrichment data is current; `pending`: profile enrichment has not finished; `stale`: the enrichment data needs to be refreshed.",
                    "enum": [
                      "pending",
                      "fresh",
                      "stale",
                      "failed"
                    ],
                    "type": "string"
                  },
                  "first_seen_at": {
                    "format": "date-time",
                    "type": "string"
                  },
                  "followers_count": {
                    "anyOf": [
                      {
                        "maximum": 9007199254740991,
                        "minimum": 0,
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "follows_count": {
                    "anyOf": [
                      {
                        "maximum": 9007199254740991,
                        "minimum": 0,
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "id": {
                    "format": "uuid",
                    "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
                    "type": "string"
                  },
                  "instagram_profile_url": {
                    "anyOf": [
                      {
                        "format": "uri",
                        "pattern": "^https://instagram\\.com/[a-z0-9._]{1,30}$",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Server-derived profile URL for the canonical username; null when username is absent or invalid.",
                    "readOnly": true
                  },
                  "instagram_user_id": {
                    "maxLength": 100,
                    "minLength": 1,
                    "type": "string"
                  },
                  "is_user_follow_business": {
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "is_verified": {
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "last_enriched_at": {
                    "anyOf": [
                      {
                        "format": "date-time",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "last_enrichment_attempt_at": {
                    "anyOf": [
                      {
                        "format": "date-time",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "last_seen_at": {
                    "format": "date-time",
                    "type": "string"
                  },
                  "media_count": {
                    "anyOf": [
                      {
                        "maximum": 9007199254740991,
                        "minimum": 0,
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "name": {
                    "anyOf": [
                      {
                        "maxLength": 120,
                        "minLength": 1,
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "opt_out": {
                    "type": "boolean"
                  },
                  "opt_out_at": {
                    "anyOf": [
                      {
                        "format": "date-time",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "phone": {
                    "anyOf": [
                      {
                        "maxLength": 64,
                        "minLength": 1,
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "profile_picture_url": {
                    "anyOf": [
                      {
                        "maxLength": 2048,
                        "minLength": 1,
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "send_instagram_dm_url": {
                    "anyOf": [
                      {
                        "format": "uri",
                        "pattern": "^https://ig\\.me/m/[a-z0-9._]{1,30}$",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Server-derived Instagram DM URL for the canonical username; null when username is absent or invalid.",
                    "readOnly": true
                  },
                  "tags": {
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "id": {
                          "description": "Stable public tag UUID. Internal numeric catalog IDs are never exposed.",
                          "format": "uuid",
                          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
                          "type": "string"
                        },
                        "name": {
                          "description": "Normalized tag name: trimmed, with consecutive whitespace collapsed to one ASCII space.",
                          "maxLength": 50,
                          "minLength": 1,
                          "pattern": "^(?!.*\\s{2})(?!\\s)(?!.*\\s$)(?!.*[\\u0000-\\u001F\\u007F]).+$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "name"
                      ],
                      "type": "object"
                    },
                    "maxItems": 100,
                    "type": "array"
                  },
                  "timeline": {
                    "additionalProperties": false,
                    "properties": {
                      "items": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "id": {
                              "maxLength": 256,
                              "minLength": 1,
                              "type": "string"
                            },
                            "timestamp": {
                              "format": "date-time",
                              "type": "string"
                            },
                            "type": {
                              "description": "Values: `attribute_captured`: a contact attribute was captured; `dm_failed`: a direct message failed; `dm_sent`: a direct message was sent; `first_contact`: the first contact activity was recorded; `tag_applied`: a tag was added to the contact.",
                              "enum": [
                                "dm_sent",
                                "dm_failed",
                                "tag_applied",
                                "attribute_captured",
                                "first_contact"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "type",
                            "timestamp"
                          ],
                          "type": "object"
                        },
                        "maxItems": 50,
                        "type": "array"
                      },
                      "next_cursor": {
                        "anyOf": [
                          {
                            "maxLength": 1024,
                            "minLength": 1,
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "items",
                      "next_cursor"
                    ],
                    "type": "object"
                  },
                  "updated_at": {
                    "format": "date-time",
                    "type": "string"
                  },
                  "username": {
                    "anyOf": [
                      {
                        "pattern": "^(?=[a-z0-9._]{1,30}$)(?=[a-z0-9._]*[a-z0-9][a-z0-9._]*$)(?!\\.)(?![a-z0-9._]*\\.\\.)(?![a-z0-9._]*\\.$)[a-z0-9._]+$",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "website": {
                    "anyOf": [
                      {
                        "maxLength": 2048,
                        "minLength": 1,
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "id",
                  "account_id",
                  "instagram_user_id",
                  "username",
                  "instagram_profile_url",
                  "send_instagram_dm_url",
                  "name",
                  "profile_picture_url",
                  "biography",
                  "website",
                  "followers_count",
                  "follows_count",
                  "media_count",
                  "account_type",
                  "is_verified",
                  "is_user_follow_business",
                  "email",
                  "phone",
                  "opt_out",
                  "opt_out_at",
                  "blocked",
                  "blocked_at",
                  "enrichment_status",
                  "first_seen_at",
                  "last_seen_at",
                  "last_enriched_at",
                  "last_enrichment_attempt_at",
                  "created_at",
                  "updated_at",
                  "tags",
                  "attributes",
                  "timeline"
                ],
                "type": "object"
              }
            },
            "required": [
              "contact"
            ],
            "type": "object"
          }
        },
        "$id": "https://levios.app/schemas/public-contact-detail-result-v1",
        "$ref": "#/components/schemas/PublicContactDetailResult/$defs/PublicContactDetailResult",
        "$schema": "https://json-schema.org/draft/2019-09/schema#",
        "title": "PublicContactDetailResult",
        "x-levios-max-serialized-bytes": 65536,
        "x-levios-schema-version": 1
      },
      "PublicContactPage": {
        "$defs": {
          "PublicContactPage": {
            "additionalProperties": false,
            "properties": {
              "items": {
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "account_id": {
                      "format": "uuid",
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
                      "type": "string"
                    },
                    "account_type": {
                      "anyOf": [
                        {
                          "description": "Values: `BUSINESS`: an Instagram business account; `CREATOR`: an Instagram creator account; `PERSONAL`: an Instagram personal account; `UNKNOWN`: the Instagram account type is unavailable.",
                          "enum": [
                            "PERSONAL",
                            "BUSINESS",
                            "CREATOR",
                            "UNKNOWN"
                          ],
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "attributes": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "created_at": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "id": {
                            "pattern": "^[1-9][0-9]{0,18}$",
                            "type": "string"
                          },
                          "key": {
                            "maxLength": 100,
                            "minLength": 1,
                            "type": "string"
                          },
                          "source": {
                            "description": "Values: `capture`: derived from an automation capture rule; `lead_capture`: provided by the contact through a lead-capture step; `manual`: set manually.",
                            "enum": [
                              "capture",
                              "lead_capture",
                              "manual"
                            ],
                            "type": "string"
                          },
                          "source_ref": {
                            "anyOf": [
                              {
                                "maxLength": 200,
                                "minLength": 1,
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "updated_at": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "maxLength": 10000,
                                "minLength": 0,
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "key",
                          "value",
                          "source",
                          "source_ref",
                          "created_at",
                          "updated_at"
                        ],
                        "type": "object"
                      },
                      "maxItems": 1000,
                      "type": "array"
                    },
                    "biography": {
                      "anyOf": [
                        {
                          "maxLength": 100000,
                          "minLength": 1,
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "blocked": {
                      "type": "boolean"
                    },
                    "blocked_at": {
                      "anyOf": [
                        {
                          "format": "date-time",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "created_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "email": {
                      "anyOf": [
                        {
                          "maxLength": 320,
                          "minLength": 1,
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "enrichment_status": {
                      "description": "Values: `failed`: the most recent enrichment attempt failed; `fresh`: the enrichment data is current; `pending`: profile enrichment has not finished; `stale`: the enrichment data needs to be refreshed.",
                      "enum": [
                        "pending",
                        "fresh",
                        "stale",
                        "failed"
                      ],
                      "type": "string"
                    },
                    "first_seen_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "followers_count": {
                      "anyOf": [
                        {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "follows_count": {
                      "anyOf": [
                        {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "id": {
                      "format": "uuid",
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
                      "type": "string"
                    },
                    "instagram_profile_url": {
                      "anyOf": [
                        {
                          "format": "uri",
                          "pattern": "^https://instagram\\.com/[a-z0-9._]{1,30}$",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Server-derived profile URL for the canonical username; null when username is absent or invalid.",
                      "readOnly": true
                    },
                    "instagram_user_id": {
                      "maxLength": 100,
                      "minLength": 1,
                      "type": "string"
                    },
                    "is_user_follow_business": {
                      "anyOf": [
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "is_verified": {
                      "anyOf": [
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "last_enriched_at": {
                      "anyOf": [
                        {
                          "format": "date-time",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "last_enrichment_attempt_at": {
                      "anyOf": [
                        {
                          "format": "date-time",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "last_seen_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "media_count": {
                      "anyOf": [
                        {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "name": {
                      "anyOf": [
                        {
                          "maxLength": 120,
                          "minLength": 1,
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "opt_out": {
                      "type": "boolean"
                    },
                    "opt_out_at": {
                      "anyOf": [
                        {
                          "format": "date-time",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "phone": {
                      "anyOf": [
                        {
                          "maxLength": 64,
                          "minLength": 1,
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "profile_picture_url": {
                      "anyOf": [
                        {
                          "maxLength": 2048,
                          "minLength": 1,
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "send_instagram_dm_url": {
                      "anyOf": [
                        {
                          "format": "uri",
                          "pattern": "^https://ig\\.me/m/[a-z0-9._]{1,30}$",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Server-derived Instagram DM URL for the canonical username; null when username is absent or invalid.",
                      "readOnly": true
                    },
                    "tags": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "id": {
                            "description": "Stable public tag UUID. Internal numeric catalog IDs are never exposed.",
                            "format": "uuid",
                            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
                            "type": "string"
                          },
                          "name": {
                            "description": "Normalized tag name: trimmed, with consecutive whitespace collapsed to one ASCII space.",
                            "maxLength": 50,
                            "minLength": 1,
                            "pattern": "^(?!.*\\s{2})(?!\\s)(?!.*\\s$)(?!.*[\\u0000-\\u001F\\u007F]).+$",
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ],
                        "type": "object"
                      },
                      "maxItems": 100,
                      "type": "array"
                    },
                    "updated_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "username": {
                      "anyOf": [
                        {
                          "pattern": "^(?=[a-z0-9._]{1,30}$)(?=[a-z0-9._]*[a-z0-9][a-z0-9._]*$)(?!\\.)(?![a-z0-9._]*\\.\\.)(?![a-z0-9._]*\\.$)[a-z0-9._]+$",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "website": {
                      "anyOf": [
                        {
                          "maxLength": 2048,
                          "minLength": 1,
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "account_id",
                    "instagram_user_id",
                    "username",
                    "instagram_profile_url",
                    "send_instagram_dm_url",
                    "name",
                    "profile_picture_url",
                    "biography",
                    "website",
                    "followers_count",
                    "follows_count",
                    "media_count",
                    "account_type",
                    "is_verified",
                    "is_user_follow_business",
                    "email",
                    "phone",
                    "opt_out",
                    "opt_out_at",
                    "blocked",
                    "blocked_at",
                    "enrichment_status",
                    "first_seen_at",
                    "last_seen_at",
                    "last_enriched_at",
                    "last_enrichment_attempt_at",
                    "created_at",
                    "updated_at",
                    "tags",
                    "attributes"
                  ],
                  "type": "object"
                },
                "maxItems": 50,
                "type": "array"
              },
              "next_cursor": {
                "anyOf": [
                  {
                    "maxLength": 1024,
                    "minLength": 1,
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "items",
              "next_cursor"
            ],
            "type": "object"
          }
        },
        "$id": "https://levios.app/schemas/public-contact-page-v1",
        "$ref": "#/components/schemas/PublicContactPage/$defs/PublicContactPage",
        "$schema": "https://json-schema.org/draft/2019-09/schema#",
        "title": "PublicContactPage",
        "x-levios-max-serialized-bytes": 65536,
        "x-levios-schema-version": 1
      },
      "PublicContactTagAssignmentResult": {
        "$defs": {
          "PublicContactTagAssignmentResult": {
            "additionalProperties": false,
            "properties": {
              "contact_id": {
                "description": "Stable contact UUID whose exact current tag set is returned.",
                "format": "uuid",
                "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
                "type": "string"
              },
              "tags": {
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "id": {
                      "description": "Stable public tag UUID. Internal numeric catalog IDs are never exposed.",
                      "format": "uuid",
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
                      "type": "string"
                    },
                    "name": {
                      "description": "Normalized tag name: trimmed, with consecutive whitespace collapsed to one ASCII space.",
                      "maxLength": 50,
                      "minLength": 1,
                      "pattern": "^(?!.*\\s{2})(?!\\s)(?!.*\\s$)(?!.*[\\u0000-\\u001F\\u007F]).+$",
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "name"
                  ],
                  "type": "object"
                },
                "maxItems": 100,
                "type": "array"
              }
            },
            "required": [
              "contact_id",
              "tags"
            ],
            "type": "object"
          }
        },
        "$id": "https://levios.app/schemas/public-contact-tag-assignment-result-v1",
        "$ref": "#/components/schemas/PublicContactTagAssignmentResult/$defs/PublicContactTagAssignmentResult",
        "$schema": "https://json-schema.org/draft/2019-09/schema#",
        "title": "PublicContactTagAssignmentResult",
        "x-levios-max-serialized-bytes": 65536,
        "x-levios-schema-version": 1
      },
      "PublicContactTagCreateResult": {
        "$defs": {
          "PublicContactTagCreateResult": {
            "additionalProperties": false,
            "properties": {
              "created": {
                "type": "boolean"
              },
              "tag": {
                "additionalProperties": false,
                "properties": {
                  "id": {
                    "description": "Stable public tag UUID. Internal numeric catalog IDs are never exposed.",
                    "format": "uuid",
                    "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
                    "type": "string"
                  },
                  "name": {
                    "description": "Normalized tag name: trimmed, with consecutive whitespace collapsed to one ASCII space.",
                    "maxLength": 50,
                    "minLength": 1,
                    "pattern": "^(?!.*\\s{2})(?!\\s)(?!.*\\s$)(?!.*[\\u0000-\\u001F\\u007F]).+$",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name"
                ],
                "type": "object"
              }
            },
            "required": [
              "tag",
              "created"
            ],
            "type": "object"
          }
        },
        "$id": "https://levios.app/schemas/public-contact-tag-create-result-v1",
        "$ref": "#/components/schemas/PublicContactTagCreateResult/$defs/PublicContactTagCreateResult",
        "$schema": "https://json-schema.org/draft/2019-09/schema#",
        "title": "PublicContactTagCreateResult",
        "x-levios-max-serialized-bytes": 65536,
        "x-levios-schema-version": 1
      },
      "PublicContactTagMutationResult": {
        "$defs": {
          "PublicContactTagMutationResult": {
            "additionalProperties": false,
            "properties": {
              "tag": {
                "additionalProperties": false,
                "properties": {
                  "id": {
                    "description": "Stable public tag UUID. Internal numeric catalog IDs are never exposed.",
                    "format": "uuid",
                    "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
                    "type": "string"
                  },
                  "name": {
                    "description": "Normalized tag name: trimmed, with consecutive whitespace collapsed to one ASCII space.",
                    "maxLength": 50,
                    "minLength": 1,
                    "pattern": "^(?!.*\\s{2})(?!\\s)(?!.*\\s$)(?!.*[\\u0000-\\u001F\\u007F]).+$",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name"
                ],
                "type": "object"
              }
            },
            "required": [
              "tag"
            ],
            "type": "object"
          }
        },
        "$id": "https://levios.app/schemas/public-contact-tag-mutation-result-v1",
        "$ref": "#/components/schemas/PublicContactTagMutationResult/$defs/PublicContactTagMutationResult",
        "$schema": "https://json-schema.org/draft/2019-09/schema#",
        "title": "PublicContactTagMutationResult",
        "x-levios-max-serialized-bytes": 65536,
        "x-levios-schema-version": 1
      },
      "PublicContactTagNameInput": {
        "$defs": {
          "PublicContactTagNameInput": {
            "description": "Tag name. Levios trims it, collapses whitespace, and requires a normalized length of 1–50 characters.",
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          }
        },
        "$id": "https://levios.app/schemas/public-contact-tag-name-input-v1",
        "$ref": "#/components/schemas/PublicContactTagNameInput/$defs/PublicContactTagNameInput",
        "$schema": "https://json-schema.org/draft/2019-09/schema#",
        "title": "PublicContactTagNameInput",
        "x-levios-max-serialized-bytes": 65536,
        "x-levios-schema-version": 1
      },
      "PublicContactTagPage": {
        "$defs": {
          "PublicContactTagPage": {
            "additionalProperties": false,
            "properties": {
              "items": {
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "id": {
                      "description": "Stable public tag UUID. Internal numeric catalog IDs are never exposed.",
                      "format": "uuid",
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
                      "type": "string"
                    },
                    "name": {
                      "description": "Normalized tag name: trimmed, with consecutive whitespace collapsed to one ASCII space.",
                      "maxLength": 50,
                      "minLength": 1,
                      "pattern": "^(?!.*\\s{2})(?!\\s)(?!.*\\s$)(?!.*[\\u0000-\\u001F\\u007F]).+$",
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "name"
                  ],
                  "type": "object"
                },
                "maxItems": 50,
                "type": "array"
              },
              "next_cursor": {
                "anyOf": [
                  {
                    "maxLength": 1024,
                    "minLength": 1,
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "items",
              "next_cursor"
            ],
            "type": "object"
          }
        },
        "$id": "https://levios.app/schemas/public-contact-tag-page-v1",
        "$ref": "#/components/schemas/PublicContactTagPage/$defs/PublicContactTagPage",
        "$schema": "https://json-schema.org/draft/2019-09/schema#",
        "title": "PublicContactTagPage",
        "x-levios-max-serialized-bytes": 65536,
        "x-levios-schema-version": 1
      },
      "PublicInstagramMediaPageV1": {
        "$defs": {
          "PublicInstagramMediaPageV1": {
            "additionalProperties": false,
            "properties": {
              "items": {
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "caption": {
                      "anyOf": [
                        {
                          "pattern": "^(?![\\s\\S]*[\\u0000\\uD800-\\uDFFF])[\\s\\S]{1,2200}$",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "comments_count": {
                      "anyOf": [
                        {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "id": {
                      "pattern": "^[!-~]{1,256}$",
                      "type": "string"
                    },
                    "instagram_url": {
                      "anyOf": [
                        {
                          "format": "uri",
                          "maxLength": 2048,
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "like_count": {
                      "anyOf": [
                        {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "media_type": {
                      "anyOf": [
                        {
                          "enum": [
                            "image",
                            "video",
                            "carousel"
                          ],
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "published_at": {
                      "anyOf": [
                        {
                          "format": "date-time",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "surface": {
                      "enum": [
                        "posts",
                        "stories"
                      ],
                      "type": "string"
                    },
                    "thumbnail_url": {
                      "anyOf": [
                        {
                          "format": "uri",
                          "maxLength": 2048,
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "surface",
                    "media_type",
                    "caption",
                    "thumbnail_url",
                    "instagram_url",
                    "published_at",
                    "like_count",
                    "comments_count"
                  ],
                  "type": "object"
                },
                "maxItems": 50,
                "type": "array"
              },
              "next_cursor": {
                "anyOf": [
                  {
                    "maxLength": 1024,
                    "minLength": 1,
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "items",
              "next_cursor"
            ],
            "type": "object"
          }
        },
        "$id": "https://levios.app/schemas/public-instagram-media-page-v1",
        "$ref": "#/components/schemas/PublicInstagramMediaPageV1/$defs/PublicInstagramMediaPageV1",
        "$schema": "https://json-schema.org/draft/2019-09/schema#",
        "title": "PublicInstagramMediaPageV1",
        "x-levios-max-serialized-bytes": 65536,
        "x-levios-schema-version": 1
      },
      "PublicInstagramUsernameFilter": {
        "$defs": {
          "PublicInstagramUsernameFilter": {
            "description": "Exact Instagram username. One leading @ is accepted, whitespace is rejected, and matching is case-insensitive.",
            "pattern": "^@?(?=[A-Za-z0-9._]{1,30}$)(?=[A-Za-z0-9._]*[A-Za-z0-9][A-Za-z0-9._]*$)(?!\\.)(?![A-Za-z0-9._]*\\.\\.)(?![A-Za-z0-9._]*\\.$)[A-Za-z0-9._]+$",
            "type": "string"
          }
        },
        "$id": "https://levios.app/schemas/public-instagram-username-filter-v1",
        "$ref": "#/components/schemas/PublicInstagramUsernameFilter/$defs/PublicInstagramUsernameFilter",
        "$schema": "https://json-schema.org/draft/2019-09/schema#",
        "title": "PublicInstagramUsernameFilter",
        "x-levios-max-serialized-bytes": 65536,
        "x-levios-schema-version": 1
      }
    }
  }
}
