Docs

Create or reorder embed rules

Creates a deterministic geo/UTM behavior rule, or reorders existing rules when the body contains `ruleIds`. A/B rules and variants are dormant and are not accepted as input.

Creates a deterministic geo/UTM behavior rule, or reorders existing rules when the body contains ruleIds. A/B rules and variants are dormant and are not accepted as input.

POST
/v1/embeds/{embedId}/rules

Authorization

BearerAuth
AuthorizationBearer <token>

Pass the raw API key as a Bearer token (Authorization: Bearer <key>). Publishable keys start with mvi_pub_ (playback-scoped). Other prefixes denote private/admin keys for general REST routes. GET /v1/embeds/{embedId}/playback accepts publishable keys only.

In: header

Path Parameters

embedId*string

Embed UUID.

Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://api.moviie.ai/v1/embeds/497f6eca-6276-4993-bfeb-53cbbbba6f08/rules" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "type": "geo",    "priority": 0,    "condition": {      "property1": null,      "property2": null    }  }'
{
  "data": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "priority": 0
    }
  ]
}
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "name": "string",
  "type": "geo",
  "status": "active",
  "priority": 0,
  "condition": {
    "property1": null,
    "property2": null
  },
  "targetVideoId": "9eed6b8d-4736-43e1-ba81-f2293af90e78",
  "variants": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "label": "string",
      "targetVideoId": "9eed6b8d-4736-43e1-ba81-f2293af90e78",
      "weightPercent": 0,
      "status": "active"
    }
  ],
  "createdAt": "string",
  "updatedAt": "string"
}
{
  "error": "Resource not found",
  "code": "NOT_FOUND"
}
{
  "error": "Resource not found",
  "code": "NOT_FOUND"
}
{
  "error": "Resource not found",
  "code": "NOT_FOUND"
}
{
  "error": "Resource not found",
  "code": "NOT_FOUND"
}