---
title: "POST /v1/functions/{functionId}/samples"
method: POST
path: "/v1/functions/{functionId}/samples"
tags: ["Samples"]
---

# POST /v1/functions/{functionId}/samples

`POST /v1/functions/{functionId}/samples`

## Path parameters

- `functionId` string, required

## Request body

- WritableSample
  - `annotation` Annotation
    - `labelId` string, nullable
    - `labelName` string, nullable
  - `data` IFunctionInput
    - `size` integer
  - `externalId` string, nullable
  - `sampleSets` SampleSetRelationship[], nullable
    - `sampleSetId` string, nullable
    - `weight` integer, nullable

## Response `200`

Success

- Sample
  - `annotation` Annotation
    - `labelId` string, nullable
    - `labelName` string, nullable
  - `data` IFunctionInput
    - `size` integer
  - `externalId` string, nullable
  - `sampleSets` SampleSetRelationship[], nullable
    - `sampleSetId` string, nullable
    - `weight` integer, nullable
  - `id` string, nullable
  - `prediction` Prediction
    - `labelId` string, nullable
    - `confidence` number, double

---

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