---
title: "Create new verification task"
method: POST
path: "/verifications"
tags: ["Verifications"]
---

# Create new verification task

`POST /verifications`

## Request

- Base URL: `https://api-sandbox.noonlight.com/tasks/v1`
- URL: `https://api-sandbox.noonlight.com/tasks/v1/verifications`
- Auth: HTTP bearer

A verification task is an object in the API to request verification with the context of the provided attachments. Once the task has been completed, either conclusively or inconclusively, the webhook is invoked.

## Request body

- object
  - `id` string: If one is not provided, one will be generated and returned in the response. This must be unique.
  - `owner_id` string: The end-user's account ID.
  - `location_id` string: The location ID for the location of the camera or device.
  - `device_id` string: The device ID of the camera or device.
  - `prompt` string, required: The text that will be displayed to the verifier. They will select `yes` or `no` in response to the prompt.
  - `expiration` object, required
    - `timeout` integer, required: The amount of time, in seconds, allotted to complete the verification task.
  - `attachments` union, required: The attachments array must either - Contain one or more images (Option 1) OR - Contain a single video (Option 2)
    - object[]
      - `url` string, required
      - `media_type` 'image/jpeg' | 'image/png' | 'image/jpg', required: The media type (formally MIME type) of the attachment. For images, the alllowed types are `image/jpeg`, `image/png`, and `image/jpg`
      - `points_of_interest` object[], required: The coordinate system for the `points_of_interest` field has the origin starting at the top left of the image. The positive x-axis moves right, and the positive y-axis moves down. Coordinates and distances must be non-negative integers.
        - `x` integer, required: The x coordinate, in pixels, for the top left corner of the bounding box. Must be a non-negative integer.
        - `dx` integer, required: The distance from the `x` field, in pixels, for the bounding box. Must be a non-negative integer.
        - `y` integer, required: The y coordinate, in pixels, for the top left corner of the bounding box. Must be a non-negative integer.
        - `dy` integer, required: The distance from the `y` field, in pixels, for the bounding box. Must be a non-negative integer.
    - object[]
      - `url` string, required
      - `media_type` 'video/mp4' | 'application/x-mpegURL', required: The media type (formally MIME type) of the attachment. For MP4 videos, the alllowed type is `video/mp4`. For HLS, use `application/x-mpegURL`.
      - `points_of_interest` object[], required: While the empty array must be present, points of interests are not supported on videos.
  - `webhook_url` string: The url of the webhook that will be invoked. If one is not provided, the preconfigured webhook url will be used.

## Response `201`

Created

- object
  - `id` string
  - `prompt` string
  - `expiration` object
    - `timeout` number, required
  - `attachments` object[]
    - `url` string, required
    - `media_type` string, required
    - `points_of_interest` object[], required
      - `x` number
      - `dx` number
      - `y` number
      - `dy` number
  - `webhook_url` string

---

[API](https://skmtc.dev/noonlight/apis/tasks-api.md) - [All operations](https://skmtc.dev/noonlight/apis/tasks-api/llms.txt) - [OpenAPI document](https://skmtc.dev/noonlight/apis/tasks-api/revisions/880b39aa1227?raw)
