Developer docs menu

PACE Partner API

API reference

Every endpoint, request and response in /api/v1/.

Base URL

https://mypacehub.com

Specification

OpenAPI 3 (JSON)

Authentication

Get an access token (client credentials)

POST/api/v1/oauth/token/

No bearer token. Authenticate with your client credentials.

Exchange your client_id and client_secret for a bearer token valid for one hour. Send the credentials with HTTP Basic auth (preferred) or as form fields. scope is optional and space-separated; it may only narrow the scopes granted to your client.

Request body application/x-www-form-urlencoded

  • grant_type"client_credentials"required

    Always client_credentials.

  • scopestring

    Space separated. Narrows the token to fewer scopes than your client holds. Omit to receive all of them.

  • client_idstring

    Only when not using HTTP Basic.

  • client_secretstring

    Only when not using HTTP Basic.

Response 200

  • access_tokenstringrequired

    Send as Authorization: Bearer <access_token>.

  • token_typestring

    Always Bearer.

  • expires_inintegerrequired

    Lifetime in seconds (3600).

  • scopestringrequired

    Space separated scopes this token carries. Empty if none.

Status codes

  • 200Success
  • 400invalid_request / unsupported_grant_type / invalid_scope
  • 401invalid_client
  • 429too many attempts
curl -s -X POST https://mypacehub.com/api/v1/oauth/token/ \
  -u "$PACE_CLIENT_ID:$PACE_CLIENT_SECRET" \
  -d grant_type=client_credentials

Response 200

JSON
{
  "access_token": "pace_at_2Vh0yQm7c1...",
  "token_type": "Bearer",
  "expires_in": 3600,
  "scope": "programme.metrics.read"
}

Response 401

JSON
{
  "error": "invalid_client",
  "error_description": "Client authentication failed."
}

Client

Describe the calling client

GET/api/v1/me/

Requires Authorization: Bearer <access_token>.

Returns the client this token belongs to, its organisation, the environment (sandbox for a simulation organisation: demo data only, no real patients) and the token's scopes. Use it to check your credentials work.

Response 200

  • api_versionstringrequired

    Major API version, "1".

  • client_idstringrequired

    Your client identifier.

  • namestringrequired

    The name PACE gave this client.

  • audience"pharma" | "hospital" | "psp_partner"required

    Which kind of partner this client is.

  • organizationobjectrequired

    The one organisation this client belongs to.

    • organization.namestringrequired

      Organisation name.

    • organization.slugstringrequired

      Stable organisation identifier.

  • environment"sandbox" | "live"required

    sandbox: demo data only, never real patients.

  • scopesstring[]required

    This token's scopes.

  • token_expires_atstring (date-time)required

    When this access token stops working.

  • rate_limit_per_minuteintegerrequired

    Requests per minute allowed for this client.

Status codes

  • 200Success
  • 401Missing, invalid, expired or revoked token
  • 429Rate limit exceeded, see Retry-After
curl -s -X GET https://mypacehub.com/api/v1/me/ \
  -H "Authorization: Bearer $PACE_ACCESS_TOKEN"

Response 200

JSON
{
  "api_version": "1",
  "client_id": "pc_3f9a1c27b84e0d5a6c19f2e7",
  "name": "Sandbox CRM",
  "audience": "pharma",
  "organization": {
    "name": "Demo Pharma",
    "slug": "demo-pharma"
  },
  "environment": "sandbox",
  "scopes": [],
  "token_expires_at": "2026-10-16T19:00:00Z",
  "rate_limit_per_minute": 120
}