---
title: "Send pipeline event"
method: POST
path: "/api/v2/ci/pipeline"
tags: ["CI Visibility Pipelines"]
---

# Send pipeline event

`POST /api/v2/ci/pipeline`

Send your pipeline event to your Datadog platform over HTTP. For details about how pipeline executions are modeled and what execution types we support, see [Pipeline Data Model And Execution Types](https://docs.datadoghq.com/continuous_integration/guides/pipeline_data_model/).

Multiple events can be sent in an array (up to 1000).

Pipeline events can be submitted with a timestamp that is up to 18 hours in the past.
The duration between the event start and end times cannot exceed 1 year.

## Request body

- CIAppCreatePipelineEventRequest — Request object.
  - `data` union — Data of the pipeline events to create.
    - CIAppCreatePipelineEventRequestData — Data of the pipeline event to create.
      - `attributes` CIAppCreatePipelineEventRequestAttributes — Attributes of the pipeline event to create.
        - `env` string — The Datadog environment.
        - `provider_name` string — The name of the CI provider. By default, this is "custom".
        - `resource` union, required — Details of the CI pipeline event.
          - union — Details of the top level pipeline, build, or workflow of your CI.
            - CIAppPipelineEventFinishedPipeline — Details of a finished pipeline.
              - …
            - CIAppPipelineEventInProgressPipeline — Details of a running pipeline.
              - …
          - CIAppPipelineEventStage — Details of a CI stage.
            - `dependencies` string[], nullable — A list of stage IDs that this stage depends on.
            - `end` string, date-time, required — Time when the stage run finished. The time format must be RFC3339.
            - `error` CIAppCIError, nullable — Contains information of the CI error.
              - …
            - `git` CIAppGitInfo, nullable — If pipelines are triggered due to actions to a Git repository, then all payloads must contain this. Note that either `tag` or `branch` has to be provided, but not both.
              - …
            - `id` string, required — UUID for the stage. It has to be unique at least in the pipeline scope.
            - `level` 'stage', required — Used to distinguish between pipelines, stages, jobs and steps.
            - `metrics` string[], nullable — A list of user-defined metrics. The metrics must follow the `key:value` pattern and the value must be numeric.
            - `name` string, required — The name for the stage.
            - `node` CIAppHostInfo, nullable — Contains information of the host running the pipeline, stage, job, or step.
              - …
            - `parameters` CIAppPipelineEventParameters, nullable — A map of key-value parameters or environment variables that were defined for the pipeline.
            - `pipeline_name` string, required — The parent pipeline name.
            - `pipeline_unique_id` string, required — The parent pipeline UUID.
            - `queue_time` integer, nullable — The queue time in milliseconds, if applicable.
            - `start` string, date-time, required — Time when the stage run started (it should not include any queue time). The time format must be RFC3339.
            - `status` 'success' | 'error' | 'canceled' | 'skipped', required — The final status of the stage.
            - `tags` string[], nullable — A list of user-defined tags. The tags must follow the `key:value` pattern.
          - union — Details of a CI job.
            - CIAppPipelineEventFinishedJob — Details of a finished CI job.
              - …
            - CIAppPipelineEventInProgressJob — Details of a running CI job.
              - …
          - CIAppPipelineEventStep — Details of a CI step.
            - `end` string, date-time, required — Time when the step run finished. The time format must be RFC3339.
            - `error` CIAppCIError, nullable — Contains information of the CI error.
              - …
            - `git` CIAppGitInfo, nullable — If pipelines are triggered due to actions to a Git repository, then all payloads must contain this. Note that either `tag` or `branch` has to be provided, but not both.
              - …
            - `id` string, required — UUID for the step. It has to be unique within each pipeline execution.
            - `job_id` string, nullable — The parent job UUID (if applicable).
            - `job_name` string, nullable — The parent job name (if applicable).
            - `level` 'step', required — Used to distinguish between pipelines, stages, jobs and steps.
            - `metrics` string[], nullable — A list of user-defined metrics. The metrics must follow the `key:value` pattern and the value must be numeric.
            - `name` string, required — The name for the step.
            - `node` CIAppHostInfo, nullable — Contains information of the host running the pipeline, stage, job, or step.
              - …
            - `parameters` CIAppPipelineEventParameters, nullable — A map of key-value parameters or environment variables that were defined for the pipeline.
            - `pipeline_name` string, required — The parent pipeline name.
            - `pipeline_unique_id` string, required — The parent pipeline UUID.
            - `stage_id` string, nullable — The parent stage UUID (if applicable).
            - `stage_name` string, nullable — The parent stage name (if applicable).
            - `start` string, date-time, required — Time when the step run started. The time format must be RFC3339.
            - `status` 'success' | 'error', required — The final status of the step.
            - `tags` string[], nullable — A list of user-defined tags. The tags must follow the `key:value` pattern.
            - `url` string, nullable — The URL to look at the step in the CI provider UI.
        - `service` string — If the CI provider is SaaS, use this to differentiate between instances.
      - `type` 'cipipeline_resource_request' — Type of the event.
    - CIAppCreatePipelineEventRequestData[] — Array of pipeline events to create in batch.
      - `attributes` CIAppCreatePipelineEventRequestAttributes — Attributes of the pipeline event to create.
        - `env` string — The Datadog environment.
        - `provider_name` string — The name of the CI provider. By default, this is "custom".
        - `resource` union, required — Details of the CI pipeline event.
          - union — Details of the top level pipeline, build, or workflow of your CI.
            - CIAppPipelineEventFinishedPipeline — Details of a finished pipeline.
              - …
            - CIAppPipelineEventInProgressPipeline — Details of a running pipeline.
              - …
          - CIAppPipelineEventStage — Details of a CI stage.
            - `dependencies` string[], nullable — A list of stage IDs that this stage depends on.
            - `end` string, date-time, required — Time when the stage run finished. The time format must be RFC3339.
            - `error` CIAppCIError, nullable — Contains information of the CI error.
              - …
            - `git` CIAppGitInfo, nullable — If pipelines are triggered due to actions to a Git repository, then all payloads must contain this. Note that either `tag` or `branch` has to be provided, but not both.
              - …
            - `id` string, required — UUID for the stage. It has to be unique at least in the pipeline scope.
            - `level` 'stage', required — Used to distinguish between pipelines, stages, jobs and steps.
            - `metrics` string[], nullable — A list of user-defined metrics. The metrics must follow the `key:value` pattern and the value must be numeric.
            - `name` string, required — The name for the stage.
            - `node` CIAppHostInfo, nullable — Contains information of the host running the pipeline, stage, job, or step.
              - …
            - `parameters` CIAppPipelineEventParameters, nullable — A map of key-value parameters or environment variables that were defined for the pipeline.
            - `pipeline_name` string, required — The parent pipeline name.
            - `pipeline_unique_id` string, required — The parent pipeline UUID.
            - `queue_time` integer, nullable — The queue time in milliseconds, if applicable.
            - `start` string, date-time, required — Time when the stage run started (it should not include any queue time). The time format must be RFC3339.
            - `status` 'success' | 'error' | 'canceled' | 'skipped', required — The final status of the stage.
            - `tags` string[], nullable — A list of user-defined tags. The tags must follow the `key:value` pattern.
          - union — Details of a CI job.
            - CIAppPipelineEventFinishedJob — Details of a finished CI job.
              - …
            - CIAppPipelineEventInProgressJob — Details of a running CI job.
              - …
          - CIAppPipelineEventStep — Details of a CI step.
            - `end` string, date-time, required — Time when the step run finished. The time format must be RFC3339.
            - `error` CIAppCIError, nullable — Contains information of the CI error.
              - …
            - `git` CIAppGitInfo, nullable — If pipelines are triggered due to actions to a Git repository, then all payloads must contain this. Note that either `tag` or `branch` has to be provided, but not both.
              - …
            - `id` string, required — UUID for the step. It has to be unique within each pipeline execution.
            - `job_id` string, nullable — The parent job UUID (if applicable).
            - `job_name` string, nullable — The parent job name (if applicable).
            - `level` 'step', required — Used to distinguish between pipelines, stages, jobs and steps.
            - `metrics` string[], nullable — A list of user-defined metrics. The metrics must follow the `key:value` pattern and the value must be numeric.
            - `name` string, required — The name for the step.
            - `node` CIAppHostInfo, nullable — Contains information of the host running the pipeline, stage, job, or step.
              - …
            - `parameters` CIAppPipelineEventParameters, nullable — A map of key-value parameters or environment variables that were defined for the pipeline.
            - `pipeline_name` string, required — The parent pipeline name.
            - `pipeline_unique_id` string, required — The parent pipeline UUID.
            - `stage_id` string, nullable — The parent stage UUID (if applicable).
            - `stage_name` string, nullable — The parent stage name (if applicable).
            - `start` string, date-time, required — Time when the step run started. The time format must be RFC3339.
            - `status` 'success' | 'error', required — The final status of the step.
            - `tags` string[], nullable — A list of user-defined tags. The tags must follow the `key:value` pattern.
            - `url` string, nullable — The URL to look at the step in the CI provider UI.
        - `service` string — If the CI provider is SaaS, use this to differentiate between instances.
      - `type` 'cipipeline_resource_request' — Type of the event.

## Response `202`

Request accepted for processing

- object

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `408` — Request Timeout
- `413` — Payload Too Large
- `429` — Too Many Requests
- `500` — Internal Server Error
- `503` — Service Unavailable

---

[API](https://skmtc.net/datadog/apis/api-v2.md) · [All operations](https://skmtc.net/datadog/apis/api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/datadog/api-v2/revisions/da68bf029e4c/schema)
