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

# List Jobs

> Retrieve a paginated list of jobs with optional filtering and sorting.



## OpenAPI

````yaml /api-reference/openapi.json get /v2/jobs
openapi: 3.0.1
info:
  title: Hamsa API
  description: Trying out our transcription and media-to-text APIs
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.tryhamsa.com
security: []
paths:
  /v2/jobs:
    get:
      summary: List Jobs
      description: Retrieve a paginated list of jobs with optional filtering and sorting.
      parameters:
        - in: query
          name: projectId
          required: true
          description: The unique identifier of the project
          schema:
            type: string
            format: uuid
            example: b8f820ac-2830-4eb8-be86-b7af9c8b92f0
        - in: query
          name: page
          required: true
          description: Current page number
          schema:
            type: integer
            example: 1
        - in: query
          name: perPage
          required: true
          description: Number of jobs per page
          schema:
            type: integer
            example: 10
        - in: query
          name: sortBy
          required: false
          description: Field to sort by
          schema:
            type: string
            enum:
              - totalCost
              - usageTime
              - createdAt
              - updatedAt
            example: usageTime
        - in: query
          name: orderBy
          required: false
          description: Sort direction
          schema:
            type: string
            enum:
              - asc
              - desc
            example: asc
        - in: query
          name: status
          required: false
          description: Job status to filter by (e.g., PENDING, COMPLETED)
          schema:
            type: string
            example: PENDING
        - in: query
          name: type
          required: true
          description: Job type to filter by (e.g., TRANSCRIPTION, AI_CONTENT)
          schema:
            type: string
            example: TRANSCRIPTION
        - in: query
          name: search
          required: false
          description: Free text search on job fields
          schema:
            type: string
            example: AI_CONTENT
      responses:
        '200':
          description: Successful response with job list
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/SuccessResponse'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/ListJobsResponse'
        '400':
          description: Validation/Bad request error response
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ValidationErrorResponse'
                  - properties:
                      message:
                        type: string
                        example: projectId is required
        '500':
          description: Internal server error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
      security:
        - BearerAuth: []
        - ApiKeyAuth: []
components:
  schemas:
    SuccessResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        message:
          type: string
          example: Operation completed successfully
        messageKey:
          type: string
          example: OPERATION_SUCCESSFUL
    ListJobsResponse:
      type: object
      properties:
        jobs:
          type: array
          items:
            $ref: '#/components/schemas/ListJobs'
        page:
          type: integer
          example: 1
        totalCount:
          type: integer
          example: 50
        totalPages:
          type: integer
          example: 5
    ValidationErrorResponse:
      type: object
      properties:
        code:
          type: integer
          example: 9400
        message:
          type: string
          example: Field must be a string!
        messageKey:
          type: string
          example: FieldMustBeString
    InternalServerErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        code:
          type: integer
          example: 500
        message:
          type: string
          example: Internal server error
    ListJobs:
      type: object
      required:
        - id
        - title
        - mediaUrl
        - totalCost
        - status
        - createdAt
        - mediaType
      properties:
        id:
          type: string
          format: uuid
          example: 5b171552-c5f7-42a9-ad92-c7945460dbb5
        title:
          type: string
          example: >-
            كلام البيزنس اللي كلنا بنستناه في اي Deal | شارك تانك مصر | الموسم
            الرابع
          description: Title of the media or job
        mediaUrl:
          type: string
          format: uri
          example: https://www.youtube.com/watch?v=dLIKa3TimOM
          description: Source media URL
        mediaType:
          type: string
          enum:
            - YOUTUBE
            - FILE
            - URL
          example: YOUTUBE
          description: Type of the media source
        totalCost:
          type: number
          example: 7
          description: Total cost charged for processing this media
        status:
          type: string
          enum:
            - PENDING
            - PROCESSING
            - COMPLETED
            - FAILED
          example: COMPLETED
          description: Current job status
        createdAt:
          type: string
          format: date-time
          example: '2025-12-21T01:27:45.979Z'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Pass the API key in the Authorization header, You need to put Token
        keyword before the API key. e.g. 'Authorization: Token <api-key>'

````