# Get an advisory

GET

/projects/{projectId}/advisories/{publicId}

```js
const url = 'https://zkao.io/api/v1/projects/example/advisories/example';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};


try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```sh
curl --request GET \
  --url https://zkao.io/api/v1/projects/example/advisories/example \
  --header 'Authorization: Bearer <token>'
```

* Production`zkao.io/api/v1/projects/{projectId}/advisories/{publicId}`
* Staging`staging.zkao.io/api/v1/projects/{projectId}/advisories/{publicId}`

Requires scope: `read`. The advisory, the software it concerns, the versions it affects, and the notices planned for it. Every associated repository must be in the token’s allowlist.

`software` is what decides the audience: a contact is notified about an advisory only when they run some of it. `affected` is a separate statement about versions, and is often empty.

A notice the plan is holding back carries `blockedReason`. The commonest one is that no affected range names a fixed version, which only the people who shipped the release can supply; record it in the app and the notice becomes schedulable.

## Authorizations

* **[bearerAuth](https://docs.zkao.io/api/#bearerauth)**

## Parameters

### Path Parameters

* **projectId**

  required

  string

* **publicId**

  required

  string

  The advisory’s readable identifier.

## Responses

### 200

OK

application/json

object

* **advisory**

  required

  object

  * **publicId**

    required

    Readable identifier, e.g. `ADVISORY-ADV-2026-0045`.

    string

  * **title**

    required

    string

  * **severity**

    required

    string

    Allowed values: CRITICAL HIGH MEDIUM LOW INFO

  * **status**

    required

    string

    Allowed values: DRAFT SCHEDULED UNDER_EMBARGO PUBLISHED WITHDRAWN

  * **disclosureAt**

    When the embargo lifts. Null until a date is set.

    string | null format: date-time

  * **publishedAt**

    string | null format: date-time

  * **cveId**

    string | null

  * **ghsaId**

    The GitHub advisory, once one has been filed.

    string | null

  * **ghsaUrl**

    string | null

  * **ghsaState**

    required

    What GitHub reports. A created entry is a DRAFT, which is private and reaches no scanner; only a published one is public.

    string

  * **createdAt**

    required

    string format: date-time

  * **summary**

    required

    string

  * **description**

    required

    string

  * **impact**

    required

    string

  * **cwe**

    string | null

  * **software**

    required

    The software the advisory is about. A contact hears about it only when they run some of it.

    Array\<object>

    object

    * **owner**

      required

      string

    * **name**

      required

      string

  * **affected**

    required

    Array\<object>

    object

    * **id**

      required

      string

    * **repository**

      required

      object

      * **owner**

        required

        string

      * **name**

        required

        string

    * **introducedIn**

      required

      First version carrying the defect.

      string

    * **fixedIn**

      required

      Version that closes the range. Null while no patch exists, which is what holds a patch notice back.

      string | null

  * **notices**

    required

    Array\<object>

    object

    * **label**

      required

      string

    * **offsetDays**

      required

      Days relative to disclosure. Negative is before it, 0 is the day itself.

      integer

    * **scheduledFor**

      required

      string format: date-time

    * **status**

      required

      string

      Allowed values: DRAFT SCHEDULED BLOCKED SENDING SENT CANCELLED

    * **blockedReason**

      required

      Why the plan is holding this notice back, if it is.

      string | null

    * **sentAt**

      required

      string | null format: date-time

    * **recipientCount**

      required

      Contacts written to, as recorded when it went.

      integer

##### Example

```json
{
  "advisory": {
    "severity": "CRITICAL",
    "status": "DRAFT",
    "notices": [
      {
        "status": "DRAFT"
      }
    ]
  }
}
```

### 401

Missing, malformed, expired, or revoked token

application/json

object

* **error**

  required

  object

  * **code**

    required

    string

    Allowed values: unauthorized forbidden not_found bad_request conflict insufficient_credits budget_below_minimum repository_initializing diff_base_required diff_base_not_allowed diff_base_invalid diff_empty rate_limited internal

  * **message**

    required

    string

  * **minimumCredits**

    Budget_below_minimum only: the least the launch could have reserved, in credits. A diff scan’s first scan of a repository also builds its overview, so its minimum is higher.

    integer

##### Example

```json
{
  "error": {
    "code": "unauthorized"
  }
}
```

### 403

The token lacks the required scope

application/json

object

* **error**

  required

  object

  * **code**

    required

    string

    Allowed values: unauthorized forbidden not_found bad_request conflict insufficient_credits budget_below_minimum repository_initializing diff_base_required diff_base_not_allowed diff_base_invalid diff_empty rate_limited internal

  * **message**

    required

    string

  * **minimumCredits**

    Budget_below_minimum only: the least the launch could have reserved, in credits. A diff scan’s first scan of a repository also builds its overview, so its minimum is higher.

    integer

##### Example

```json
{
  "error": {
    "code": "unauthorized"
  }
}
```

### 404

Resource not in this token’s project or repo allowlist

application/json

object

* **error**

  required

  object

  * **code**

    required

    string

    Allowed values: unauthorized forbidden not_found bad_request conflict insufficient_credits budget_below_minimum repository_initializing diff_base_required diff_base_not_allowed diff_base_invalid diff_empty rate_limited internal

  * **message**

    required

    string

  * **minimumCredits**

    Budget_below_minimum only: the least the launch could have reserved, in credits. A diff scan’s first scan of a repository also builds its overview, so its minimum is higher.

    integer

##### Example

```json
{
  "error": {
    "code": "unauthorized"
  }
}
```
