> ## Documentation Index
> Fetch the complete documentation index at: https://docs.honeycomb.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Send a Goal Event

> Send one event to a goal.
The webhook key gives the team and the goal, so the body has no team or goal field.
Honeycomb responds after it stores the event, and the response lists one outcome for each dataset of the event.

Send a `deployment.finished` event after each deployment of a service.
If the goal covers the service, it opens a case for the deployed version in each dataset, and an agent run examines each case.

EU teams send events to `https://api.eu1.honeycomb.io/1/goals/events`.

## Get the webhook key

Open a **Watch a release** goal in Honeycomb. In the section that says when the goal runs, turn on **Listen for webhook event**, enter a label, and select **Save**.
Honeycomb shows the key one time, so store it as a secret, such as the GitHub Actions secret `HONEYCOMB_GOAL_WEBHOOK`.
Send the key in the `Authorization` header: `Authorization: Bearer <webhook key>`. Other Honeycomb API keys, such as Ingest or Configuration keys, get `401`.
If your team requires mTLS, Honeycomb does not check a client certificate for webhook keys yet. A webhook key can only send events to its goal.

If you select **Generate New Key** later, the previous key stops working immediately. Update the secret in each pipeline that sends events to the goal.

## Fields

- `environment` is the slug of the environment where the deployment occurred. It is required only if the goal covers more than one environment. A deployment to two environments is two events.
- `data.datasets` lists the datasets that have the telemetry of the service. It is required only if the dataset name is different from the service name. Each dataset opens its own case.
- Field names are case-sensitive, and each key can appear only one time. A key that differs from a field name only in case, such as `TYPE`, is an unknown field.
- `data.attributes` accepts any key, with string values. We recommend `commit_sha` and `previous_version`, so the agent run can compare the deployed commit with telemetry and with the previous version.

## Retries

A retry must send the same `id`. If the goal already holds an event with that `id`, the outcome is `duplicate`, so a retry never opens a second case.
A new deployment must send a new `id`. Honeycomb finds a duplicate by the `id`, the service, the environment, and the dataset, but not by `service_version`. If a new deployment sends an `id` that the goal already holds, the outcome is `duplicate` and no case opens, even if the version is different.
If one pipeline run deploys more than one service, put the service name in the `id`.

## Status codes

Each error response is an RFC 7807 problem (`application/problem+json`) with `status`, `type`, `title`, and `detail`.
It also has the `error` field, with the same text as `detail`, so a script can print one field for every error.

- **`200`**: Honeycomb stored the event.
- **`400`**: The body is not one JSON object, or it is not valid UTF-8. Correct the request.
- **`401`**: The webhook key is missing, malformed, unknown, or revoked. Correct the key.
- **`403`**: Goal events are not enabled for the team, or Honeycomb Intelligence is turned off for the team. Ask Honeycomb for access, or ask a team owner to turn on Honeycomb Intelligence.
- **`408`**: The request stopped sending its body before Honeycomb read all of it. This response has no body. Send the event again with the same `id`.
- **`413`**: The body is larger than 16 KB. Correct the request.
- **`422`**: The `type`, the `version`, or a field is unknown or invalid, or a required field is missing. This includes a missing `environment` for a goal that covers more than one environment, and an `environment` that no goal of the webhook key covers. `type_detail` has one entry for each bad field that Honeycomb found, with the field path (such as `data.datasets.1`), a code, and a description. An unknown field, a repeated key, or a value of the wrong type is reported alone, and `data` is checked only after the other fields are valid, so a correction can show the next problem. Correct the request.
- **`429`**: The team is over the rate limit. Send the event again after the time in the `Retry-After` header, with the same `id`.
- **`503`**: Honeycomb could not store the event. Send the event again with the same `id`.

## Send the event from GitHub Actions

Add this step after the step that deploys your service. Set `HONEYCOMB_GOAL_WEBHOOK` as a repository secret, and replace `checkout` with the name of your service.

```yaml
- name: Report the deployment to Honeycomb
  if: success()
  continue-on-error: true
  env:
    HONEYCOMB_GOAL_WEBHOOK: ${{ secrets.HONEYCOMB_GOAL_WEBHOOK }}
  run: |
    curl --fail-with-body --silent --show-error \
      --retry 8 --retry-max-time 300 --retry-connrefused --max-time 30 \
      -X POST https://api.honeycomb.io/1/goals/events \
      -H "Authorization: Bearer $HONEYCOMB_GOAL_WEBHOOK" \
      -H "Content-Type: application/json" \
      -d '{
        "type": "deployment.finished",
        "version": 1,
        "id": "gha-${{ github.run_id }}-${{ github.run_attempt }}-checkout",
        "data": {
          "service": "checkout",
          "service_version": "${{ github.sha }}",
          "attributes": {
            "commit_sha": "${{ github.sha }}",
            "repository": "${{ github.repository }}",
            "deploy_url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
          }
        }
      }'
```

If Honeycomb responds with `429` or `503`, or curl cannot connect, the step sends the event again for approximately four minutes.
The step never fails the pipeline. It prints the response body in the job log, so read the log of the first run to confirm that the response is `200`.




## OpenAPI

````yaml /api/openapi-public.yaml post /1/goals/events
openapi: 3.1.0
info:
  title: Honeycomb API
  version: 1.0.0
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  contact:
    email: support@honeycomb.io
  description: >
    The API allows programmatic management of many resources within Honeycomb.


    Please report any discrepancies with actual API behavior in <a
    href="https://docs.honeycomb.io/troubleshoot/community/">Pollinators
    Slack</a> or to <a href="https://support.honeycomb.io/">Honeycomb
    Support</a>.
servers:
  - url: https://api.honeycomb.io
  - url: https://api.eu1.honeycomb.io
security: []
tags:
  - name: Anomaly Detection
    description: >
      Anomaly Detection identifies Signals - patterns in your services that
      deviate from their historical baseline - and can notify Recipients when a
      Signal turns anomalous.

      Each Signal is scoped to a service in a dataset and monitors one of the
      following:

      - **`error_rate`**: The fraction of erroring requests, compared to a
      trained normal band.

      - **`presence`**: Whether the service is emitting spans at all.


      Signals progress through the following statuses:

      - **`onboarding`**: The Signal has been created but does not yet have
      enough data to train.

      - **`normal`**: The Signal is trained and monitoring for anomalies.

      - **`anomalous`**: The Signal has detected an anomaly.

      - **`off`**: The Signal has been disabled and will not fire.

      - **`ineligible`**: The Signal cannot train because its service is not
      sending enough traffic to establish a reliable baseline.


      This API allows you to list Signals, retrieve a Signal with its assigned
      Recipients, page through a Signal's historical anomalies, and update a
      Signal's enabled state, sensitivity, and Recipient assignments.


      ## Authorization


      The API key must have the **Manage Signals** permission. Learn more about
      [API keys
      here](https://docs.honeycomb.io/configure/environments/manage-api-keys/).
  - name: Auth
    description: >
      API Keys have various scopes permissions and belong to a specific Team or
      Environment.


      Any valid Honeycomb ingest or configuration API Key will work with this
      endpoint. Learn more about [API
      keys](https://docs.honeycomb.io/get-started/best-practices/api-keys).


      These endpoints can be used to validate authentication for a key, to
      determine what authorizations have been granted

      to a key, and to determine the Team and Environment that a key belongs to.
  - name: Boards
    description: >
      Boards are a place to pin and save useful queries/graphs, SLO panels, text
      panels, and views you want to retain for later reuse and reference.


      Boards can contain multiple panel types:

      - **Query panels**: Display saved queries/graphs

      - **SLO panels**: Monitor Service Level Objectives

      - **Text panels**: Add markdown-formatted text and documentation

      - **Views**: Filtered perspectives of board data (limited to 50 views per
      board)


      Boards also support preset filters (limited to 5 per board) to apply
      consistent filtering across the board.


      This API allows you to list, create, update, and delete boards, as well as
      manage board views.


      ## Authorization


      The API key must have the **Manage Public Boards** permission. Learn more
      about [API keys
      here](https://docs.honeycomb.io/configure/environments/manage-api-keys/).
  - name: Burn Alerts
    description: >
      This feature is available as part of the [Honeycomb Pro and Enterprise
      plans](https://www.honeycomb.io/pricing/).


      Burn Alerts notify you when issues impact your SLO budget. Learn more
      about [Burn Alerts
      here](https://docs.honeycomb.io/notify/alert/slos/monitor/).


      This API allows you to list, create, update, and delete burn alerts.


      ## Authorization


      The API key must have the **Manage SLOs** permission. Learn more about
      [API keys
      here](https://docs.honeycomb.io/configure/environments/manage-api-keys/).
  - name: Calculated Fields
    description: >
      Calculated Fields (also called Derived Columns) allow you to run queries
      based on the value of an expression that is calculated from the fields in
      an event.


      This API allows you to list, create, update, and delete Calculated Fields
      in a dataset or across a whole environment, paralleling the behavior of
      the Schema tab within a Dataset's or Environment's Settings UI.


      ## Authorization


      The API key must have the **Manage Queries and Columns** permission. Learn
      more about [API keys
      here](https://docs.honeycomb.io/configure/environments/manage-api-keys/).
  - name: Columns
    description: >
      Columns are fields in the events you send to Honeycomb.


      This API allows you to list, create, update, and delete columns in a
      dataset.


      ## Authorization


      The API key must have the **Manage Queries and Columns** permission. Learn
      more about [API keys
      here](https://docs.honeycomb.io/configure/environments/manage-api-keys/).
  - name: Datasets
    description: >
      A Dataset represents a collection of related events that come from the
      same source, or are related to the same source.


      This API allows you to list, create, and update datasets.


      ## Authorization


      The API key must have the **Create Datasets** permission. Learn more about
      [API keys
      here](https://docs.honeycomb.io/configure/environments/manage-api-keys/).


      The `/2/teams/{teamSlug}/environments/{environmentID}/datasets` endpoints
      use a Management Key instead. The description of each endpoint gives the
      scopes it needs.

      These endpoints are available as part of the [Honeycomb Enterprise
      plan](https://www.honeycomb.io/pricing/).
  - name: Dataset Definitions
    description: >
      Dataset definitions describe the fields with special meaning in the
      Dataset.


      Refer to the [Dataset
      Definitions](https://docs.honeycomb.io/configure/datasets/definitions/)
      documentation for more information.


      **Honeycomb automatically creates these Dataset definition fields when the
      Dataset is created.**

      Manual creation of Dataset definitions is **not** needed.


      ## Authorization


      The API key must have the **Create Datasets** permission. Learn more about
      [API keys
      here](https://docs.honeycomb.io/configure/environments/manage-api-keys/).
  - name: Events
    description: >
      The Events API endpoints are the lowest-level way to send Events to
      Honeycomb. **This should be your last resort!**




      If unsure where to start when instrumenting an application, read about how
      to [Send Data to Honeycomb](https://docs.honeycomb.io/send-data/).



      If you are building a tracing or metrics library, we recommend using
      [OpenTelemetry](https://docs.honeycomb.io/send-data/opentelemetry/).


      ## Authorization


      It is recommended that an Ingest API key is used for sending events.


      A Configuration API key will work, and must have the **Send Events**
      permission.

      Learn more about [API keys
      here](https://docs.honeycomb.io/configure/environments/manage-api-keys/).
  - name: Environments
    description: >
      This API allows you to list, create, and update, and delete Environments.


      ## Authorization


      This API requires a Management Key passed via the HTTP Authorization
      header. Join the key ID and secret with a colon, like this:
      `Authorization: Bearer <key ID>:<secret>`.
  - name: Goals
    description: >
      Goal Events tell a goal that something happened in your systems, such as a
      finished deployment.

      The goal opens a case or adds the event to an open case, and an agent run
      examines the case.


      This API accepts one event type, `deployment.finished`.


      ## Authorization


      This API requires the webhook key of a goal, passed as a Bearer token in
      the `Authorization` header: `Authorization: Bearer <webhook key>`.

      To get the key, open a **Watch a release** goal, turn on **Listen for
      webhook event** in the section that says when the goal runs, enter a
      label, and select **Save**.
  - name: Groups
    description: >
      This feature is available as part of the [Honeycomb Enterprise
      plan](https://www.honeycomb.io/pricing/).


      A Group is a set of Team members that can read restricted datasets. Only
      Team owners and members of a Group with access to a restricted dataset can
      read it.


      This API allows you to list, create, update, and delete Groups, manage
      their members, and grant or revoke their access to Datasets and
      Environments.


      ## Authorization


      This API requires a Management Key passed via the HTTP Authorization
      header. Join the key ID and secret with a colon, like this:
      `Authorization: Bearer <key ID>:<secret>`. The description of each
      endpoint gives the scopes it needs.
  - name: Key Management
    description: >
      This API allows you to list, create, update, and delete API Keys for a
      Team.



      Learn more about [API keys
      here](https://docs.honeycomb.io/configure/environments/manage-api-keys/).


      ## Authorization

       This API requires a Management Key passed via the HTTP Authorization header. Join the key ID and secret with a colon, like this: `Authorization: Bearer <key ID>:<secret>`.
  - name: Kinesis Events
    description: >
      The Kinesis Events API endpoints allow Honeycomb to process streaming
      events from Amazon Kinesis.


      Refer to the [Honeycomb AWS
      integrations](https://docs.honeycomb.io/integrations/aws/how-aws-integrations-work/)
      documentation for more information.


      ## Authorization


      It is recommended that an Ingest API key is used for sending events.


      A Configuration API key will work, and must have the **Send Events**
      permission.

      Learn more about [API keys
      here](https://docs.honeycomb.io/configure/environments/manage-api-keys/).
  - name: Markers
    description: >
      Markers indicate points in time on graphs where interesting things happen,
      such as deploys or outages.


      This API allows you to list, create, update, and delete Markers.


      ## Authorization


      The API key must have the **Manage Markers** permission. Learn more about
      [API keys
      here](https://docs.honeycomb.io/configure/environments/manage-api-keys/).
  - name: Marker Settings
    description: >
      Marker Settings apply to groups of similar Markers.

      For example, "deploys" markers appear with the same color on a graph.


      This API allows you to list, create, update, and delete Marker Settings.


      ## Authorization


      The API key must have the **Manage Markers** permission. Learn more about
      [API keys
      here](https://docs.honeycomb.io/configure/environments/manage-api-keys/).
  - name: Queries
    description: >
      Queries in Honeycomb are specifications for queries, and are used to
      identify queries in other parts of the API - in particular: boards,
      triggers, and query annotations.


      This API allows you to create and get query objects.


      ## Authorization


      The API key must have the **Manage Queries and Columns** permission. Learn
      more about [API keys
      here](https://docs.honeycomb.io/configure/environments/manage-api-keys/).
  - name: Query Annotations
    description: >
      Query Annotations in Honeycomb allow you to associate names and
      descriptions to queries to add additional information in collaboration
      features.


      This API allows you to list, create, update, and delete Query Annotations.


      ## Authorization


      The API key must have the **Manage Queries and Columns** permission. Learn
      more about [API keys
      here](https://docs.honeycomb.io/configure/environments/manage-api-keys/).
  - name: Query Data
    description: >
      This feature is available as part of the [Honeycomb Enterprise
      plan](https://www.honeycomb.io/pricing/).


      Query Results are the aggregated data from a Query, similar to what is
      displayed in graphs or heatmaps within the Honeycomb UI. Receiving results
      from a Query is a three-step process:


      Create the Query (or Query Spec), which validates that the query
      parameters are valid. Creating a query does not actually run the query to
      get results.

      Run the query asynchronously by creating a Query Result referencing the
      Query’s ID. This returns a Query Result ID.

      Poll the query result endpoint (with the Query Result ID) until the data
      is ready.


      Note that many Query Results can be created from a single Query. This is
      particularly useful when using a relative time_range parameter in the
      Query.

      For example, a Query with `time_range: 7200` and no explicit `start_time`
      or `end_time` can be re-run over and over, with each resulting Query
      Result containing the most recent 2 hours of data.

      This is conceptually similar to clicking Run Query in the Honeycomb UI
      without changing any query parameters.


      **IMPORTANT API RESTRICTIONS:**


      To ensure the stability of Honeycomb systems, we have enabled the
      following API restrictions. These restrictions may change over time.


      * Query Results can only be created for events with timestamps within the
      past 7 days.


      * When creating a Query Result, the time ranges from the Query are
      truncated according to the following rules. For queries with a time range
      of:

          * less than or equal to 6 hours, results are truncated to the nearest 1 minute. For example, a start/end time of 2021-04-22T05:28:12Z will be truncated to 2021-04-22T05:28:00Z.

          * greater than 6 hours and less than 1 day, results are truncated to the nearest 5 minutes. For example, a start/end time of 2021-04-22T05:28:12Z will be truncated to 2021-04-22T05:25:00Z.

          * greater than or equal to 1 day and less than or equal to 2 days, results are truncated to the nearest 15 minutes. For example, a start/end time of 2021-04-22T05:28:12Z will be truncated to 2021-04-22T05:15:00Z.

          * greater than 2 days and less than or equal to 7 days, results are truncated to the nearest 30 minutes. For example, a start/end time of 2021-04-22T05:28:12Z will be truncated to 2021-04-22T05:00:00Z.

      * Creating a Query Result is rate limited to 10 requests per minute.
      Status code 429 will be returned when rate limited.


      * Query Results cannot take longer than 10 seconds to run.


      * Creating a Query Result that contains Relational Fields is rate limited
      to 1 request per minute. Status code 429 will be returned when rate
      limited.

        * Query Results with Relational Fields may be more likely to take longer to run.

      * Regardless of whether the `compare_time_offset_seconds` field is
      populated on a query, query run responses will not include comparison
      results.


      ## Authorization


      The API key must have the **Manage Queries and Columns** and **Run
      Queries** permission. Learn more about [API keys
      here](https://docs.honeycomb.io/configure/environments/manage-api-keys/).
  - name: Recipients
    description: >
      Honeycomb Recipients allow you to define and manage the Recipients that
      will get notified by a Trigger or Burn Alert.


      The types of Recipients supported are: PagerDuty, Email, Webhook,
      Microsoft Teams, and Slack.


      ## Authorization


      The API key must have the **Manage Recipients** permission. Recipients are
      team-wide and NOT environment-specific.

      API Keys with the **Manage Recipients** permission can modify recipients
      used by ALL environments for a given team.


      Learn more about [API keys
      here](https://docs.honeycomb.io/configure/environments/manage-api-keys/).
  - name: Reporting
    description: >
      The Reporting API provides access to historical performance data.


      ## Authorization


      The API key must have the **Manage SLOs** permission. Learn more about
      [API keys
      here](https://docs.honeycomb.io/configure/environments/manage-api-keys/).
  - name: Service Maps
    description: >
      The Service Maps API endpoints allow you to visualize the relationships
      between your services in Honeycomb.


      This API allows you to create and retrieve service Dependency Requests,
      which are used to generate maps of dependencies between services.


      ## Authorization


      The API key must have the **Read Service Maps** permission. Learn more
      about [API keys
      here](https://docs.honeycomb.io/configure/environments/manage-api-keys/).
  - name: SLOs
    description: >
      This feature is available as part of the [Honeycomb Pro and Enterprise
      plans](https://www.honeycomb.io/pricing).


      Honeycomb SLOs allow you to define and monitor Service Level Objectives
      (SLOs) for your organization.


      This API allows you to list, create, update, and delete SLO objects.


      You can also access historical reporting for your SLOs to analyze
      long-term performance trends. For more information, see [Get SLO
      History](/api/reporting/get-slo-history)


      ## Authorization


      The API key must have the **Manage SLOs** permission. Learn more about
      [API keys
      here](https://docs.honeycomb.io/configure/environments/manage-api-keys/).
  - name: Triggers
    description: >
      Triggers let you receive notifications when your data in Honeycomb crosses
      the thresholds that you configure.

      The graph on which to alert is as flexible as a Honeycomb query, which
      helps reduce false positives due to known errors.


      Triggers support both standard event-based datasets and metrics datasets.
      Metrics triggers have additional capabilities

      such as granularity control.

      Learn more in the [Triggers
      documentation](https://docs.honeycomb.io/notify/alert/triggers/).


      This API allows you to list, create, update, and delete Triggers.


      ## Authorization


      The API key must have the **Manage Triggers** permission. Learn more about
      [API keys
      here](https://docs.honeycomb.io/configure/environments/manage-api-keys/).
  - name: Users
    description: >
      This feature is available as part of the [Honeycomb Enterprise
      plan](https://www.honeycomb.io/pricing/).


      This API allows you to list the users on a Team. Use it to find the user
      IDs that you add to a Group.


      ## Authorization


      This API requires a Management Key passed via the HTTP Authorization
      header. Join the key ID and secret with a colon, like this:
      `Authorization: Bearer <key ID>:<secret>`. The key must have the
      `users:read` scope.
externalDocs:
  url: https://docs.honeycomb.io
paths:
  /1/goals/events:
    post:
      tags:
        - Goals
      summary: Send a Goal Event
      description: >
        Send one event to a goal.

        The webhook key gives the team and the goal, so the body has no team or
        goal field.

        Honeycomb responds after it stores the event, and the response lists one
        outcome for each dataset of the event.


        Send a `deployment.finished` event after each deployment of a service.

        If the goal covers the service, it opens a case for the deployed version
        in each dataset, and an agent run examines each case.


        EU teams send events to `https://api.eu1.honeycomb.io/1/goals/events`.


        ## Get the webhook key


        Open a **Watch a release** goal in Honeycomb. In the section that says
        when the goal runs, turn on **Listen for webhook event**, enter a label,
        and select **Save**.

        Honeycomb shows the key one time, so store it as a secret, such as the
        GitHub Actions secret `HONEYCOMB_GOAL_WEBHOOK`.

        Send the key in the `Authorization` header: `Authorization: Bearer
        <webhook key>`. Other Honeycomb API keys, such as Ingest or
        Configuration keys, get `401`.

        If your team requires mTLS, Honeycomb does not check a client
        certificate for webhook keys yet. A webhook key can only send events to
        its goal.


        If you select **Generate New Key** later, the previous key stops working
        immediately. Update the secret in each pipeline that sends events to the
        goal.


        ## Fields


        - `environment` is the slug of the environment where the deployment
        occurred. It is required only if the goal covers more than one
        environment. A deployment to two environments is two events.

        - `data.datasets` lists the datasets that have the telemetry of the
        service. It is required only if the dataset name is different from the
        service name. Each dataset opens its own case.

        - Field names are case-sensitive, and each key can appear only one time.
        A key that differs from a field name only in case, such as `TYPE`, is an
        unknown field.

        - `data.attributes` accepts any key, with string values. We recommend
        `commit_sha` and `previous_version`, so the agent run can compare the
        deployed commit with telemetry and with the previous version.


        ## Retries


        A retry must send the same `id`. If the goal already holds an event with
        that `id`, the outcome is `duplicate`, so a retry never opens a second
        case.

        A new deployment must send a new `id`. Honeycomb finds a duplicate by
        the `id`, the service, the environment, and the dataset, but not by
        `service_version`. If a new deployment sends an `id` that the goal
        already holds, the outcome is `duplicate` and no case opens, even if the
        version is different.

        If one pipeline run deploys more than one service, put the service name
        in the `id`.


        ## Status codes


        Each error response is an RFC 7807 problem (`application/problem+json`)
        with `status`, `type`, `title`, and `detail`.

        It also has the `error` field, with the same text as `detail`, so a
        script can print one field for every error.


        - **`200`**: Honeycomb stored the event.

        - **`400`**: The body is not one JSON object, or it is not valid UTF-8.
        Correct the request.

        - **`401`**: The webhook key is missing, malformed, unknown, or revoked.
        Correct the key.

        - **`403`**: Goal events are not enabled for the team, or Honeycomb
        Intelligence is turned off for the team. Ask Honeycomb for access, or
        ask a team owner to turn on Honeycomb Intelligence.

        - **`408`**: The request stopped sending its body before Honeycomb read
        all of it. This response has no body. Send the event again with the same
        `id`.

        - **`413`**: The body is larger than 16 KB. Correct the request.

        - **`422`**: The `type`, the `version`, or a field is unknown or
        invalid, or a required field is missing. This includes a missing
        `environment` for a goal that covers more than one environment, and an
        `environment` that no goal of the webhook key covers. `type_detail` has
        one entry for each bad field that Honeycomb found, with the field path
        (such as `data.datasets.1`), a code, and a description. An unknown
        field, a repeated key, or a value of the wrong type is reported alone,
        and `data` is checked only after the other fields are valid, so a
        correction can show the next problem. Correct the request.

        - **`429`**: The team is over the rate limit. Send the event again after
        the time in the `Retry-After` header, with the same `id`.

        - **`503`**: Honeycomb could not store the event. Send the event again
        with the same `id`.


        ## Send the event from GitHub Actions


        Add this step after the step that deploys your service. Set
        `HONEYCOMB_GOAL_WEBHOOK` as a repository secret, and replace `checkout`
        with the name of your service.


        ```yaml

        - name: Report the deployment to Honeycomb
          if: success()
          continue-on-error: true
          env:
            HONEYCOMB_GOAL_WEBHOOK: ${{ secrets.HONEYCOMB_GOAL_WEBHOOK }}
          run: |
            curl --fail-with-body --silent --show-error \
              --retry 8 --retry-max-time 300 --retry-connrefused --max-time 30 \
              -X POST https://api.honeycomb.io/1/goals/events \
              -H "Authorization: Bearer $HONEYCOMB_GOAL_WEBHOOK" \
              -H "Content-Type: application/json" \
              -d '{
                "type": "deployment.finished",
                "version": 1,
                "id": "gha-${{ github.run_id }}-${{ github.run_attempt }}-checkout",
                "data": {
                  "service": "checkout",
                  "service_version": "${{ github.sha }}",
                  "attributes": {
                    "commit_sha": "${{ github.sha }}",
                    "repository": "${{ github.repository }}",
                    "deploy_url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
                  }
                }
              }'
        ```


        If Honeycomb responds with `429` or `503`, or curl cannot connect, the
        step sends the event again for approximately four minutes.

        The step never fails the pipeline. It prints the response body in the
        job log, so read the log of the first run to confirm that the response
        is `200`.
      operationId: createGoalEvent
      requestBody:
        description: The event. The body can be at most 16 KB.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GoalEvent'
            examples:
              minimal:
                summary: The smallest valid event
                value:
                  type: deployment.finished
                  version: 1
                  id: gha-9182734512-1
                  data:
                    service: checkout
                    service_version: 2026.11.12-4f2a9c1
              all_fields:
                summary: An event with each optional field
                value:
                  type: deployment.finished
                  version: 1
                  id: gha-9182734512-1
                  time: 1794506651000
                  environment: production
                  data:
                    service: checkout
                    service_version: 2026.11.12-4f2a9c1
                    datasets:
                      - checkout-api
                      - checkout-worker
                    attributes:
                      region: us-east-1
                      previous_version: 2026.11.11-9be01aa
                      commit_sha: 4f2a9c1d
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoalEventResponse'
              examples:
                opened:
                  summary: The goal opened a case in each dataset
                  value:
                    outcomes:
                      - goal_id: hcagl_01m7984sdz4kcccerwsxcn1nxr
                        dataset: checkout-api
                        outcome: opened
                      - goal_id: hcagl_01m7984sdz4kcccerwsxcn1nxr
                        dataset: checkout-worker
                        outcome: opened
                unknown_dataset:
                  summary: No goal of the webhook key covers one dataset
                  value:
                    outcomes:
                      - goal_id: hcagl_01m7984sdz4kcccerwsxcn1nxr
                        dataset: checkout-api
                        outcome: opened
                      - dataset: checkout-old
                        outcome: ignored
                        reason: unknown_dataset
                no_matching_goal:
                  summary: The goal is paused, archived, or deleted
                  value:
                    outcomes: []
                    reason: no_matching_goal
        '400':
          description: The body is not one JSON object.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/DetailedError'
              examples:
                not_json:
                  summary: The body is not JSON
                  value:
                    status: 400
                    type: https://api.honeycomb.io/problems/unparseable
                    title: The request body could not be parsed.
                    detail: the body is not valid JSON
                    error: the body is not valid JSON
                second_value:
                  summary: The body has a second value after the object
                  value:
                    status: 400
                    type: https://api.honeycomb.io/problems/unparseable
                    title: The request body could not be parsed.
                    detail: the body must be one JSON object
                    error: the body must be one JSON object
        '401':
          description: The webhook key is missing, malformed, unknown, or revoked.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/DetailedError'
              example:
                status: 401
                type: https://api.honeycomb.io/problems/unauthenticated
                title: Unknown API key
                detail: the webhook key is missing, malformed, unknown or revoked
                error: the webhook key is missing, malformed, unknown or revoked
        '403':
          description: >-
            Goal events are not enabled for the team, or Honeycomb Intelligence
            is turned off for the team.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/DetailedError'
              example:
                status: 403
                type: https://api.honeycomb.io/problems/not-enabled
                title: This action is not enabled for your team.
                detail: goal events are not enabled for this team
                error: goal events are not enabled for this team
        '408':
          description: >-
            The request stopped sending its body before Honeycomb read all of
            it. Send the event again with the same `id`.
        '413':
          description: The body is larger than 16 KB.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/DetailedError'
              example:
                status: 413
                type: https://api.honeycomb.io/problems/payload-too-large
                title: Request body is too large.
                detail: Body size is larger than maximum size of 16384 bytes
                error: Body size is larger than maximum size of 16384 bytes
        '422':
          description: >
            The `type`, the `version`, or a field is unknown or invalid, or a
            required field is missing. `type_detail` has one entry for each bad
            field that Honeycomb found. `detail` and `error` list the same
            entries, sorted by field.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ValidationError'
              examples:
                unknown_type:
                  summary: Unknown event type
                  value:
                    status: 422
                    type: https://api.honeycomb.io/problems/validation-failed
                    title: The provided input is invalid.
                    detail: 'type must be one of: deployment.finished'
                    error: 'type must be one of: deployment.finished'
                    type_detail:
                      - field: type
                        code: invalid
                        description: 'must be one of: deployment.finished'
                unknown_field:
                  summary: Unknown field
                  value:
                    status: 422
                    type: https://api.honeycomb.io/problems/validation-failed
                    title: The provided input is invalid.
                    detail: data.dataset is not a known field
                    error: data.dataset is not a known field
                    type_detail:
                      - field: data.dataset
                        code: invalid
                        description: is not a known field
                duplicate_field:
                  summary: Repeated key
                  value:
                    status: 422
                    type: https://api.honeycomb.io/problems/validation-failed
                    title: The provided input is invalid.
                    detail: data.service appears more than once
                    error: data.service appears more than once
                    type_detail:
                      - field: data.service
                        code: invalid
                        description: appears more than once
                missing_fields:
                  summary: Missing fields
                  value:
                    status: 422
                    type: https://api.honeycomb.io/problems/validation-failed
                    title: The provided input is invalid.
                    detail: >-
                      data.service cannot be blank, data.service_version cannot
                      be blank
                    error: >-
                      data.service cannot be blank, data.service_version cannot
                      be blank
                    type_detail:
                      - field: data.service
                        code: missing
                        description: cannot be blank
                      - field: data.service_version
                        code: missing
                        description: cannot be blank
                wrong_type:
                  summary: A value of the wrong type
                  value:
                    status: 422
                    type: https://api.honeycomb.io/problems/validation-failed
                    title: The provided input is invalid.
                    detail: time must be a whole number
                    error: time must be a whole number
                    type_detail:
                      - field: time
                        code: incorrect_type
                        description: must be a whole number
                missing_environment:
                  summary: The goal covers more than one environment
                  value:
                    status: 422
                    type: https://api.honeycomb.io/problems/validation-failed
                    title: The provided input is invalid.
                    detail: >-
                      environment is required because the goal covers more than
                      one environment, or none
                    error: >-
                      environment is required because the goal covers more than
                      one environment, or none
                    type_detail:
                      - field: environment
                        code: missing
                        description: >-
                          is required because the goal covers more than one
                          environment, or none
                unknown_environment:
                  summary: No goal of the webhook key covers the environment
                  value:
                    status: 422
                    type: https://api.honeycomb.io/problems/validation-failed
                    title: The provided input is invalid.
                    detail: >-
                      environment does not exist, or no goal of the webhook key
                      covers it
                    error: >-
                      environment does not exist, or no goal of the webhook key
                      covers it
                    type_detail:
                      - field: environment
                        code: invalid
                        description: >-
                          does not exist, or no goal of the webhook key covers
                          it
                time_in_seconds:
                  summary: The time is in seconds
                  value:
                    status: 422
                    type: https://api.honeycomb.io/problems/validation-failed
                    title: The provided input is invalid.
                    detail: >-
                      time is before 2001-01-01; send milliseconds since the
                      Unix epoch, not seconds
                    error: >-
                      time is before 2001-01-01; send milliseconds since the
                      Unix epoch, not seconds
                    type_detail:
                      - field: time
                        code: invalid
                        description: >-
                          is before 2001-01-01; send milliseconds since the Unix
                          epoch, not seconds
                too_many_datasets:
                  summary: Too many datasets
                  value:
                    status: 422
                    type: https://api.honeycomb.io/problems/validation-failed
                    title: The provided input is invalid.
                    detail: data.datasets the length must be no more than 10
                    error: data.datasets the length must be no more than 10
                    type_detail:
                      - field: data.datasets
                        code: invalid
                        description: the length must be no more than 10
        '429':
          description: The team is over the rate limit.
          headers:
            Retry-After:
              $ref: '#/components/headers/RetryAfter'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/DetailedError'
              example:
                status: 429
                type: https://api.honeycomb.io/problems/rate-limited
                title: You have exceeded your rate limit.
                detail: >-
                  the team is over the rate limit for goal events; send the
                  event again after Retry-After
                error: >-
                  the team is over the rate limit for goal events; send the
                  event again after Retry-After
        '503':
          description: >-
            Honeycomb could not store the event. Send the event again with the
            same `id`.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/DetailedError'
              example:
                status: 503
                type: https://api.honeycomb.io/problems/unavailable
                title: The service is unavailable.
                detail: >-
                  goal events are unavailable right now; send the event again
                  with the same id
                error: >-
                  goal events are unavailable right now; send the event again
                  with the same id
      security:
        - goal_webhook_key: []
components:
  schemas:
    GoalEvent:
      type: object
      description: One event for a goal.
      required:
        - type
        - version
        - id
        - data
      additionalProperties: false
      properties:
        type:
          type: string
          description: What occurred.
          enum:
            - deployment.finished
        version:
          type: integer
          description: >
            The schema version of `data` for this `type`. A new version is added
            only if a field is removed, renamed, or changes its meaning.
          enum:
            - 1
        id:
          type: string
          description: >
            Your ID for this event. A retry must send the same `id`. A new
            deployment must send a new `id`.
          minLength: 1
          maxLength: 200
          example: gha-9182734512-1
        time:
          type: integer
          format: int64
          description: >
            When the deployment finished, as the number of milliseconds since
            the Unix epoch (UTC). The default is the time when Honeycomb
            receives the event. The value must be at least 978307200000
            (2001-01-01 UTC), so a time in seconds is refused, and at most 5
            minutes after the time when Honeycomb receives the event. Write it
            as a whole number, without a fraction or an exponent.
          minimum: 978307200000
          example: 1794506651000
        environment:
          type: string
          description: >
            The slug of the environment where the deployment occurred. Required
            only if the goal covers more than one environment.
          minLength: 1
          example: production
        data:
          $ref: '#/components/schemas/DeploymentFinishedData'
    GoalEventResponse:
      type: object
      description: The outcomes of a Goal Event.
      required:
        - outcomes
      properties:
        outcomes:
          type: array
          description: One outcome for each dataset of the event.
          items:
            $ref: '#/components/schemas/GoalEventOutcome'
        reason:
          type: string
          description: >
            Set if the goal did not take part in the event.

            - **`no_matching_goal`**: The goal is paused, archived, or deleted.
            `outcomes` is empty or has only `unknown_dataset` outcomes.
          enum:
            - no_matching_goal
    DetailedError:
      x-tags:
        - Errors
      description: An RFC7807 'Problem Detail' formatted error message.
      type: object
      required:
        - error
        - status
        - type
        - title
      properties:
        error:
          type: string
          readOnly: true
          default: something went wrong!
        status:
          type: number
          readOnly: true
          description: The HTTP status code of the error.
        type:
          type: string
          readOnly: true
          description: Type is a URI used to uniquely identify the type of error.
        title:
          type: string
          readOnly: true
          description: >-
            Title is a human-readable summary that explains the `type` of the
            problem.
        detail:
          type: string
          readOnly: true
          description: The general, human-readable error message.
        instance:
          type: string
          readOnly: true
          description: The unique identifier (ID) for this specific error.
        metadata:
          type: object
          readOnly: true
          additionalProperties:
            type: string
          description: >-
            Additional endpoint-specific information about the error. The keys
            vary by endpoint and error.
          example:
            requested_duration: 1209600.00 seconds
    ValidationError:
      x-tags:
        - Errors
      allOf:
        - $ref: '#/components/schemas/DetailedError'
        - type: object
          properties:
            status:
              type: number
              readOnly: true
              default: 422
            type:
              type: string
              readOnly: true
              default: https://api.honeycomb.io/problems/validation-failed
            title:
              type: string
              readOnly: true
              default: The provided input is invalid.
            type_detail:
              type: array
              items:
                type: object
                properties:
                  field:
                    type: string
                    readOnly: true
                  code:
                    type: string
                    readOnly: true
                    enum:
                      - invalid
                      - missing
                      - incorrect_type
                      - already_exists
                  description:
                    type: string
                    readOnly: true
    DeploymentFinishedData:
      type: object
      description: The data of a `deployment.finished` event, version 1.
      required:
        - service
        - service_version
      additionalProperties: false
      properties:
        service:
          type: string
          description: The service that was deployed.
          minLength: 1
          maxLength: 200
          example: checkout
        service_version:
          type: string
          description: The version of the service that is now deployed.
          minLength: 1
          maxLength: 191
          example: 2026.11.12-4f2a9c1
        datasets:
          type: array
          description: >
            The datasets that have the telemetry of the service. Each entry is a
            dataset name or slug. Required only if the dataset name is different
            from the service name. The default is one dataset with the name of
            the service. Each dataset opens its own case. Honeycomb removes
            duplicate entries.
          maxItems: 10
          items:
            type: string
            minLength: 1
          example:
            - checkout-api
            - checkout-worker
        attributes:
          type: object
          description: >
            Other context about the deployment, such as the commit, the region,
            or the previous version. Honeycomb accepts any key. We recommend
            `commit_sha` and `previous_version`. Each value is a string. A
            maximum of 20 keys.
          maxProperties: 20
          propertyNames:
            maxLength: 2048
          additionalProperties:
            type: string
            maxLength: 2048
          example:
            region: us-east-1
            previous_version: 2026.11.11-9be01aa
            commit_sha: 4f2a9c1d
    GoalEventOutcome:
      type: object
      description: What the goal did with the event for one dataset.
      required:
        - dataset
        - outcome
      properties:
        goal_id:
          type: string
          description: >-
            The unique identifier (ID) of the goal. Not set if the reason is
            `unknown_dataset`.
          example: hcagl_01m7984sdz4kcccerwsxcn1nxr
        dataset:
          type: string
          description: The dataset of this outcome.
          example: checkout-api
        outcome:
          type: string
          description: >
            What the goal did with the event.

            - **`opened`**: The event opened a new case.

            - **`joined`**: The event joined an open case for the same service,
            dataset, and version.

            - **`duplicate`**: The goal already holds an event with this `id`
            for this service and dataset.

            - **`ignored`**: The goal did not take the event. The `reason` field
            says why.
          enum:
            - opened
            - joined
            - duplicate
            - ignored
        reason:
          type: string
          description: >
            Why the goal ignored the event. Set only if `outcome` is `ignored`.

            - **`out_of_scope`**: The goal does not cover the dataset of the
            event, but another goal of the webhook key does.

            - **`missing_subject_fields`**: The event does not have the fields
            that the goal needs.

            - **`too_old`**: The event `time` is older than the case window of
            the goal.

            - **`unknown_dataset`**: No goal of the webhook key covers a dataset
            with this name or slug in the environment, or the dataset does not
            exist.
          enum:
            - out_of_scope
            - missing_subject_fields
            - too_old
            - unknown_dataset
  headers:
    RetryAfter:
      description: |
        The RFC7231 header used to indicate when a client should retry requests.
      schema:
        type: string
      example: Fri, 22 Mar 2024 18:37:53 GMT
  securitySchemes:
    goal_webhook_key:
      type: http
      scheme: bearer
      description: >
        Authenticate using the webhook key of a goal.


        Pass the key as a Bearer token in the `Authorization` header:

        ```http

        Authorization: Bearer <webhook key>

        ```


        To get the key, open a **Watch a release** goal, turn on **Listen for
        webhook event** in the section that says when the goal runs, enter a
        label, and select **Save**.

        Honeycomb shows the key one time. If you generate a new key, the
        previous key stops working immediately.

````