---
updatedAt: 2025-09-18T22:04:59.000Z
agentTools:
  projectIndex: https://dev.kevel.com/llms.txt
---

# /channel

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Relay",
    "description": "",
    "contact": {
      "name": "jgrimes"
    },
    "license": {
      "name": ""
    },
    "version": "0.1.0"
  },
  "servers": [
    {
      "url": "https://api.relay.bid/m/v1",
      "description": "Production api"
    }
  ],
  "paths": {
    "/channel": {
      "post": {
        "tags": [
          "channel_handlers"
        ],
        "operationId": "create_channel",
        "requestBody": {
          "description": "Channel to create.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelForm"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Channel stored successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelOutput"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AppForm": {
        "type": "object",
        "properties": {
          "cat": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "domain": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "AppOutput": {
        "type": "object",
        "required": [
          "id"
        ],
        "properties": {
          "cat": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "domain": {
            "type": "string",
            "nullable": true
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "ChannelForm": {
        "allOf": [
          {
            "oneOf": [
              {
                "type": "object",
                "required": [
                  "site"
                ],
                "properties": {
                  "site": {
                    "$ref": "#/components/schemas/SiteForm"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "app"
                ],
                "properties": {
                  "app": {
                    "$ref": "#/components/schemas/AppForm"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "device"
                ],
                "properties": {
                  "device": {
                    "$ref": "#/components/schemas/DoohForm"
                  }
                }
              }
            ]
          },
          {
            "type": "object",
            "properties": {
              "bidfloor": {
                "type": "number",
                "format": "double",
                "nullable": true
              },
              "enabled": {
                "type": "boolean",
                "nullable": true
              }
            }
          }
        ]
      },
      "ChannelOutput": {
        "type": "object",
        "required": [
          "id"
        ],
        "properties": {
          "app": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AppOutput"
              }
            ],
            "nullable": true
          },
          "bidfloor": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "device": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DoohOutput"
              }
            ],
            "nullable": true
          },
          "enabled": {
            "type": "boolean",
            "nullable": true
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "site": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SiteOutput"
              }
            ],
            "nullable": true
          }
        }
      },
      "DoohForm": {
        "type": "object",
        "properties": {
          "dpi": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "etime": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "fixed": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "venue": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        }
      },
      "DoohOutput": {
        "type": "object",
        "required": [
          "id"
        ],
        "properties": {
          "dpi": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "etime": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "fixed": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "venue": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        }
      },
      "SiteForm": {
        "type": "object",
        "required": [
          "domain"
        ],
        "properties": {
          "amp": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "cat": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "cattax": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "domain": {
            "type": "string"
          },
          "mobile": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "privpolicy": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        }
      },
      "SiteOutput": {
        "type": "object",
        "required": [
          "id",
          "domain"
        ],
        "properties": {
          "amp": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "cat": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "cattax": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "domain": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "mobile": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "privpolicy": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        }
      }
    },
    "securitySchemes": {
      "api_key": {
        "type": "apiKey",
        "in": "header",
        "name": "x-relay-secret"
      }
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```