Upwork Reports API

Financial and engagement reports for teams and organizations.

OpenAPI Specification

upwork-reports-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Upwork GraphQL Authentication Reports API
  description: The primary Upwork API surface, providing GraphQL queries and mutations for job search, profile access, contract management, and messaging. The API is accessed at a single GraphQL endpoint using POST requests with JSON bodies containing queries and variables. Authentication uses OAuth 2.0 authorization code flow with Bearer tokens. GraphQL subscriptions are supported for real-time webhook event notifications.
  version: 1.0.0
  contact:
    name: Upwork Developer Support
    url: https://support.upwork.com/hc/en-us/sections/17976982721555-Upwork-API
  termsOfService: https://www.upwork.com/legal
  x-generated-from: documentation
servers:
- url: https://api.upwork.com
  description: Upwork Production API
security:
- oauth2AuthCode: []
tags:
- name: Reports
  description: Financial and engagement reports for teams and organizations.
paths:
  /v3/reports/companies/{company_id}/hours/hours_worked:
    get:
      operationId: getCompanyHoursWorked
      summary: Upwork Get Company Hours Worked Report
      description: Retrieve hours worked report for a company within a date range.
      tags:
      - Reports
      parameters:
      - name: company_id
        in: path
        required: true
        description: The company identifier
        schema:
          type: string
        example: company-abc123
      - name: tq
        in: query
        description: Table query for filtering (Upwork Query Language)
        schema:
          type: string
        example: SELECT worked_on, hours WHERE worked_on >= '2025-01-01'
      responses:
        '200':
          description: Hours worked report data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportResponse'
              examples:
                getCompanyHoursWorked200Example:
                  summary: Default getCompanyHoursWorked 200 response
                  x-microcks-default: true
                  value:
                    table:
                      cols:
                      - id: worked_on
                        label: Worked On
                        type: date
                      - id: hours
                        label: Hours
                        type: number
                      rows:
                      - c:
                        - v: '2025-01-15'
                        - v: 8.0
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    APIError:
      type: object
      description: API error response
      properties:
        error:
          type: string
          example: unauthorized
        message:
          type: string
          example: Authentication failed.
        code:
          type: integer
          example: 401
    ReportResponse:
      type: object
      description: A report response in Google Visualization data table format
      properties:
        table:
          type: object
          description: Data table containing report results
          properties:
            cols:
              type: array
              description: Column definitions
              items:
                type: object
                properties:
                  id:
                    type: string
                    example: worked_on
                  label:
                    type: string
                    example: Worked On
                  type:
                    type: string
                    example: date
            rows:
              type: array
              description: Data rows
              items:
                type: object
                properties:
                  c:
                    type: array
                    items:
                      type: object
                      properties:
                        v:
                          description: Cell value
  securitySchemes:
    oauth2AuthCode:
      type: oauth2
      description: OAuth 2.0 authorization code flow for Upwork API access. Obtain an authorization code by redirecting users to the Upwork OAuth consent page, then exchange for access and refresh tokens.
      flows:
        authorizationCode:
          authorizationUrl: https://www.upwork.com/ab/account-security/oauth2/authorize
          tokenUrl: https://www.upwork.com/api/v3/oauth2/token
          scopes:
            openid: Access to user identity information
            email: Access to user email
            profile: Access to user profile data
            jobs:read: Read job postings
            contracts:read: Read contract data
            messages:read: Read messages
            messages:write: Send messages
            profiles:read: Read freelancer profiles
            reports:read: Read financial reports
externalDocs:
  description: Upwork GraphQL API Documentation
  url: https://www.upwork.com/developer/documentation/graphql/api/docs/index.html