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

# Create a Job

> Create a new job from the Deck API. Jobs can also be created in the Dashboard.



## OpenAPI

````yaml /api-reference/v1.json post /jobs
openapi: 3.0.4
info:
  title: Deck API
  description: "# Deck API makes it straightforward for users to connect to any portal securely and quickly.\r\n\r\n### Welcome! Looking for a quick introduction to our API? Check out the 🚀[Quickstart guide](https://docs.deck.co/guides/guides/quickstart).\r\n\r\nGetting started is easy:\r\n\r\n1. Create an account using the [dashboard](https://dashboard.deck.co) to get your client id and secret\r\n2. Enter your client id and secret in the Authentication section below\r\n3. Hit the \"Try\" buttons below for each endpoint.\r\n\r\nHappy querying!"
  contact:
    name: Ready to start building? Contact us!
    url: https://deck.co
  version: v1
servers:
  - url: https://live.deck.co/api/v1
    description: Deck API
  - url: https://sandbox.deck.co/api/v1
    description: Deck Sandbox API (Enterprise only)
security: []
tags:
  - name: Agents
    description: Agent management
  - name: Connection
    description: Manage connections
  - name: Connections
    description: Endpoints for creating and managing workflow connections.
  - name: Decks
    description: Endpoints related to decks.
  - name: Jobs
    description: Endpoints related to jobs.
  - name: Sources
    description: Endpoints for managing and searching data sources
  - name: Link
    description: >-
      These endpoints are used by the Link widget. They can also be used for
      creating your own UX experience and connecting data from utility data
      sources.
paths:
  /jobs:
    post:
      tags:
        - Jobs
      summary: Create a Job
      description: >-
        Create a new job from the Deck API. Jobs can also be created in the
        Dashboard.
      requestBody:
        description: Job definition details including schemas
        content:
          application/json:
            schema:
              allOf:
                - $ref: >-
                    #/components/schemas/Datadeck_Api_WebModels_Models_Api_V1_Jobs_CreateJobDefinitionRequest
          text/json:
            schema:
              allOf:
                - $ref: >-
                    #/components/schemas/Datadeck_Api_WebModels_Models_Api_V1_Jobs_CreateJobDefinitionRequest
          application/*+json:
            schema:
              allOf:
                - $ref: >-
                    #/components/schemas/Datadeck_Api_WebModels_Models_Api_V1_Jobs_CreateJobDefinitionRequest
      responses:
        '200':
          description: Job definition created successfully
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Datadeck_Api_WebModels_Models_Api_V1_Jobs_CreateJobDefinitionResponse
            text/json:
              schema:
                $ref: >-
                  #/components/schemas/Datadeck_Api_WebModels_Models_Api_V1_Jobs_CreateJobDefinitionResponse
            application/json+encrypted:
              schema:
                $ref: >-
                  #/components/schemas/Datadeck_Api_WebModels_Models_Api_V1_Jobs_CreateJobDefinitionResponse
        '400':
          description: Invalid request or schema validation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Microsoft_AspNetCore_Mvc_ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/Microsoft_AspNetCore_Mvc_ProblemDetails'
            application/json+encrypted:
              schema:
                $ref: '#/components/schemas/Microsoft_AspNetCore_Mvc_ProblemDetails'
        '401':
          description: Unauthorized - Invalid API key
      security:
        - client_id: []
          secret: []
components:
  schemas:
    Datadeck_Api_WebModels_Models_Api_V1_Jobs_CreateJobDefinitionRequest:
      required:
        - code
        - input_schema
        - name
        - output_schema
      type: object
      properties:
        name:
          type: string
        code:
          type: string
        input_schema: {}
        output_schema: {}
        prompts:
          nullable: true
      additionalProperties: false
    Datadeck_Api_WebModels_Models_Api_V1_Jobs_CreateJobDefinitionResponse:
      required:
        - input_schema
        - job_code
        - name
        - output_schema
      type: object
      properties:
        name:
          type: string
        job_code:
          type: string
        input_schema: {}
        output_schema: {}
        prompts:
          nullable: true
        created_at:
          type: integer
          format: int64
        updated_at:
          type: integer
          format: int64
      additionalProperties: false
    Microsoft_AspNetCore_Mvc_ProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      additionalProperties: {}
  securitySchemes:
    client_id:
      type: apiKey
      description: Enter your client id
      name: x-deck-client-id
      in: header
    secret:
      type: apiKey
      description: Enter your secret
      name: x-deck-secret
      in: header

````