---
title: "create code_scan_result"
method: POST
path: "/apps/{app_id}/code_scan_results"
tags: ["CodeScanResults"]
---

# create code_scan_result

`POST /apps/{app_id}/code_scan_results`

## Request

- Base URL: `https://api.aptible.com`
- URL: `https://api.aptible.com/apps/{app_id}/code_scan_results`
- Auth: API key in header `Authorization`

Creates a new code scan result for the specified app.

## Path parameters

- `app_id` integer, required

## Query parameters

- `no_embed` boolean

## Headers

- `Prefer` 'no_sensitive_extras=true'

## Request body

- CreateCodeScanResultRequest
  - `operation` integer: Alternate name for `operation_id`
  - `operation_id` integer, required
  - `dockerfile_present` boolean
  - `procfile_present` boolean
  - `aptible_yml_present` boolean
  - `git_ref` string, required
  - `git_commit` string, required

## Response `201`

successful

- CodeScanResult
  - `id` integer, required
  - `dockerfile_present` boolean, required
  - `procfile_present` boolean, required
  - `aptible_yml_present` boolean, required
  - `_type` string, required
  - `created_at` string, dateTime, required
  - `updated_at` string, dateTime, required
  - `_links` CodeScanResultLinks
    - `app` ListAccountsForStack200ResponseLinksStack
      - `href` string, uri
    - `operation` ListAccountsForStack200ResponseLinksStack
      - `href` string, uri
    - `self` ListAccountsForStack200ResponseLinksStack
      - `href` string, uri

## Other responses

- `default`: Error response. Often a 4xx or 5xx status code

## Changes

- **2026-07-24** `1dc1e5b8c6eb`: 2 info
  - added the new optional `header` request parameter `Prefer`
  - added the new optional `query` request parameter `no_embed`

[Operation history](https://skmtc.dev/aptible/apis/aptible-api-v1/changes/apps/:app_id/code_scan_results/post.md)

---

[API](https://skmtc.dev/aptible/apis/aptible-api-v1.md) - [All operations](https://skmtc.dev/aptible/apis/aptible-api-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/aptible/apis/aptible-api-v1/revisions/a21f6b1bc6fe?raw)
