---
updatedAt: 2026-06-25T05:57:40.000Z
agentTools:
  projectIndex: https://docs.delivr.ai/llms.txt
---

# Create pixel

Create a new tracking pixel. Simple mode: pass only a title (defaults applied). Detailed mode: include params and custom_fields for full control. Name the target project in the request (a `project_id` field for writes, or a `?project_id=` query parameter for reads).

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Platform Management",
    "version": "2.0.0",
    "description": "Manage your organization's **projects**, **pixels**, and **members**.\n\nAuthenticate with your organization API key (`X-Api-Key` + `X-Api-Secret`, the same key used for the data APIs). The key's organization is resolved from the key itself, so a project-scoped call names its target project in the request: a `project_id` field for writes, or a `?project_id=` query parameter for reads. A project outside the key's organization is rejected.\n\nYour organization itself is read, updated, and deleted under Account. Organizations are created by Delivr.\n\n**Base URL:** `https://api.delivr.ai`\n"
  },
  "servers": [
    {
      "url": "https://api.delivr.ai",
      "description": "Production"
    }
  ],
  "tags": [
    {
      "name": "Pixel",
      "description": "Tracking pixel management"
    }
  ],
  "paths": {
    "/api/v1/pixel/create": {
      "post": {
        "operationId": "createPixel",
        "tags": [
          "Pixel"
        ],
        "summary": "Create pixel",
        "description": "Create a new tracking pixel. Simple mode: pass only a title (defaults applied). Detailed mode: include params and custom_fields for full control. Name the target project in the request (a `project_id` field for writes, or a `?project_id=` query parameter for reads).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PixelCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Pixel created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PixelCreateResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedGateway"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "security": [
          {
            "ApiKeyAuth": [],
            "ApiSecretAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Api-Key",
        "description": "Organization API key (`dlvr_` prefixed), created in the dashboard at `https://app.delivr.ai/{org_id}/settings/api-keys`. Must be paired with the `X-Api-Secret` header."
      },
      "ApiSecretAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Api-Secret",
        "description": "Secret half of the organization API key, paired with `X-Api-Key`. Both headers are required on every request."
      }
    },
    "schemas": {
      "PixelParam": {
        "type": "object",
        "required": [
          "key",
          "value"
        ],
        "properties": {
          "key": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        }
      },
      "PixelCustomField": {
        "type": "object",
        "required": [
          "key",
          "value"
        ],
        "properties": {
          "key": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        }
      },
      "PixelCreateRequest": {
        "type": "object",
        "required": [
          "title"
        ],
        "properties": {
          "project_id": {
            "type": "string",
            "description": "Target project the pixel belongs to (org-key path)."
          },
          "title": {
            "type": "string"
          },
          "params": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PixelParam"
            }
          },
          "custom_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PixelCustomField"
            }
          }
        }
      },
      "PixelCreateResponse": {
        "type": "object",
        "required": [
          "response"
        ],
        "properties": {
          "response": {
            "type": "object",
            "required": [
              "pixel_id",
              "installation_url"
            ],
            "properties": {
              "pixel_id": {
                "type": "string"
              },
              "installation_url": {
                "type": "string"
              }
            }
          }
        }
      },
      "Error": {
        "type": "object",
        "description": "The shape every failure this service returns. `type` selects the status: `invalid_request` is 400, `unauthorized` 401, `not_found` 404, `internal_error` 500. `help_url` is always present and is the empty string when no page applies.",
        "required": [
          "type",
          "code",
          "message",
          "help_url",
          "request_id"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "invalid_request",
              "unauthorized",
              "not_found",
              "internal_error"
            ],
            "description": "Failure class. Stable; switch on this rather than on the status line."
          },
          "code": {
            "type": "string",
            "description": "Specific reason within the class, for programmatic handling."
          },
          "message": {
            "type": "string",
            "description": "Human-readable explanation. Wording may change; do not match on it."
          },
          "help_url": {
            "type": "string",
            "description": "Documentation for this failure when one applies, empty otherwise."
          },
          "request_id": {
            "type": "string",
            "description": "Identifier for this request. Quote it when reporting a problem: it is how a failure gets traced."
          },
          "fields": {
            "type": "array",
            "description": "Per-field validation detail. Present only on an `invalid_request` raised by body validation, absent otherwise.",
            "items": {
              "type": "object",
              "properties": {
                "field": {
                  "type": "string"
                },
                "constraint": {
                  "type": "string"
                },
                "allowed": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      },
      "GatewayError": {
        "type": "object",
        "description": "Refusal from the API gateway, which answers before the request reaches the service. A different shape from `Error`, and the only body a rejected key produces.",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string",
            "description": "What was wrong with the credentials.",
            "example": "API key is required"
          }
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Invalid request: a malformed body, a missing required field, or a value the endpoint does not accept.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "InternalError": {
        "description": "Unexpected server error.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "UnauthorizedGateway": {
        "description": "Missing, malformed, or rejected API key. Refused by the gateway, so the body is `{\"error\": \"...\"}` rather than the `Error` envelope every other failure on this operation uses.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/GatewayError"
            }
          }
        }
      }
    }
  }
}
```