GraphQL API

The GraphQL API gives you access to all of your organization’s data in Metric — projects, employees, time logs, invoices, expenses, deals, and more. You can build custom integrations, automate reporting, or sync data with external systems.

Endpoint

POST https://api.psa.metric.ai/api/

Authentication

Include your API access token in the Authorization header. See the API Overview for details on how to obtain a token.

Authorization: Bearer <your_access_token>

Request Format

All requests use the standard GraphQL query format. Send a JSON body with a query field:

{ "query": "query { organization { id projects { id name } } }" }

Organization Query

All data in Metric is scoped to your organization. Use the organization root query to access your data:

query { organization { id # your requested fields here } }

Examples

Get All Projects

query { organization { id projects { id name } } }

Get Employees

query { organization { id employees { id firstName lastName email } } }

Get Projects with Budget Details

query { organization { id projects { id name client { id name } budget budgetSpent } } }

Accessing Report Data

You can fetch the data of any organization report via the reportData query by providing the report ID and a date range. You can find the report ID in the Metric app URL when viewing a report.

query getReportData($id: ID, $startDate: Date, $endDate: Date) { reportData(id: $id, startDate: $startDate, endDate: $endDate) { columns { name columnType } rows { order objects { ... on ReportDataObject { id name } } values { value } } } }

Variables:

{ "id": "123", "startDate": "2026-01-01", "endDate": "2026-03-31" }

The response includes the report’s column definitions and rows, where each row contains its order, the related objects, and the column values.

Discovering Available Fields

GraphQL supports introspection, which means you can query the API itself to discover all available types, fields, and relationships. Any GraphQL client will automatically use introspection to autocomplete your queries and show what data is available.

We recommend using a GraphQL client such as Altair  or GraphQL Playground  to explore the API interactively. Simply point your client to the endpoint above with your authorization header, and it will load the full schema for you.

To learn more about introspection, see the GraphQL introspection documentation .

Tips

  • Start small — query just the fields you need. GraphQL lets you request exactly the data you want, which keeps responses fast and focused.
  • Use introspection — instead of guessing field names, let your GraphQL client autocomplete and show the full schema.
  • Permissions apply — the API respects the same permissions as the Metric app. If you can’t see certain data in the UI, you won’t be able to access it via the API either.