Partner API
Developer Reference
GUIDE

Authentication

How partners get and use credentials. One model covers the whole API.

Method

The API uses the OAuth 2.0 client credentials flow. Your integration exchanges its client ID and client secret for a short-lived access token, then sends that token as a bearer token in the Authorization header of every request.

Requesting credentials

Credentials are created in Partner Hub, under Settings → System & Security → API credentials. You need the Manage API keys permission. View API keys only lets you see existing credentials. When you generate a credential you choose a name, the scopes it may request and an optional expiration date. The client secret is shown once, when the credential is created. Copy it then and store it securely.

If the API credentials page is not available in your Partner Hub, your Customer Success Manager or BetterUp Support can enable it or issue a credential for you. Either way, the credential is bound to your organization and can only access your organization's data.

A credential with no expiration date stays active until someone revokes it. Revoking a credential invalidates every access token issued with it. For the step-by-step walkthrough, see Getting Started with BetterUp's Partner API.

Token endpoints

POST /oauth/token

Request access token

Exchange credentials for an access token. For partner integrations, use the client_credentials grant type with your client ID and secret.

Request body

Parameter Type Required Description
grant_type string required OAuth 2.0 grant type
client_id string required Your OAuth client ID
client_secret string required Your OAuth client secret
scope string optional Requested scope (space-delimited)

Responses

Status Reason Schema
200 OK object
401 Unauthorized object

Response fields

Parameter Type Required Description
access_token string required The issued access token
token_type string required Token type (always "Bearer")
expires_in integer required Token lifetime in seconds
scope string optional Granted scope
created_at integer required Token creation timestamp (Unix epoch)
Example request
curl -X POST "https://api.betterup.co/oauth/token" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode 'grant_type=client_credentials' \
  --data-urlencode 'client_id=<client_id>' \
  --data-urlencode 'client_secret=<client_secret>' \
  --data-urlencode 'scope=api:partner:organizations:read'
Example response
{
  "access_token": "<access_token>",
  "token_type": "Bearer",
  "expires_in": 7200,
  "scope": "api:partner:organizations:read",
  "created_at": 0
}
GET /oauth/token/info

Token info

Returns metadata about the access token used in the request. The token is passed via the Authorization header.

Requires any one of api:partner:organizations:read

Responses

Status Reason Schema
200 OK object
401 Unauthorized No body

Response fields

Parameter Type Required Description
resource_owner_id integer | null optional ID of the resource owner (null for client credentials)
scope string[] optional Granted scopes
expires_in_seconds integer | null optional Seconds until token expiration
application object optional
application.uid string optional OAuth application client ID
created_at integer optional Token creation timestamp (Unix epoch)
Example request
curl -X GET "https://api.betterup.co/oauth/token/info" \
  -H "Authorization: Bearer <access_token>"
Example response
{
  "resource_owner_id": 0,
  "scope": [
    "<scope>"
  ],
  "expires_in_seconds": 0,
  "application": {
    "uid": "<uid>"
  },
  "created_at": 0
}
POST /oauth/introspect

Introspect token

Determine the active state and metadata of a token per RFC 7662.

Request body

Parameter Type Required Description
token string required The token to introspect
client_id string required Your OAuth client ID
client_secret string required Your OAuth client secret

Responses

Status Reason Schema
200 OK object

Response fields

Parameter Type Required Description
active boolean required Whether the token is currently active
scope string optional Granted scope (present when active)
client_id string optional Client ID the token was issued to (present when active)
token_type string optional Token type (present when active)
exp integer optional Expiration timestamp in Unix epoch (present when active)
Example request
curl -X POST "https://api.betterup.co/oauth/introspect" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode 'token=<token>' \
  --data-urlencode 'client_id=<client_id>' \
  --data-urlencode 'client_secret=<client_secret>'
Example response
{
  "active": true,
  "scope": "<scope>",
  "client_id": "<client_id>",
  "token_type": "Bearer",
  "exp": 0
}
POST /oauth/revoke

Revoke token

Revoke an access or refresh token per RFC 7009. After revocation the token can no longer be used.

Request body

Parameter Type Required Description
token string required The token to revoke
client_id string required Your OAuth client ID
client_secret string required Your OAuth client secret

Responses

Status Reason Schema
200 OK No body
Example request
curl -X POST "https://api.betterup.co/oauth/revoke" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode 'token=<token>' \
  --data-urlencode 'client_id=<client_id>' \
  --data-urlencode 'client_secret=<client_secret>'

Scopes

Each operation lists the scopes that satisfy it. A token that holds any one of them can call the operation.

Scope Description
api:partner:organizations:read Read partner organization resources
api:partner:organizations:write Read and write partner organization resources
api:partner:accounts:read Read partner account/member resources
api:partner:accounts:write Read and write partner account/member resources
api:partner:entitlements:read Read partner entitlement/license resources
api:partner:entitlements:write Read and write partner entitlement/license resources
api:partner:reporting:read Read partner reporting/analytics resources
api:partner:reporting:write Read and write partner reporting/analytics resources
api:partner:organizations:audit_logs:read Read partner security audit-log events
Token URL
https://api.betterup.co/oauth/token

For most resources, a write scope also satisfies the matching read operations. Audit logs are the exception: they accept only api:partner:organizations:audit_logs:read. Request only the scopes your integration needs.

To request several scopes, separate them with spaces in the scope parameter of the token request. If the token request has no scope parameter, the token gets every scope granted to your credential.

Token lifetime and renewal

An access token stays valid for the time stated in the token response's expires_in field, in seconds. When a token expires, request a new one with the same client credentials. The client credentials flow issues no refresh token.

Access token lifetime
2 hours (7200 seconds)

Keeping credentials safe

Treat the client secret like a password. Keep it on your servers, never in browser or mobile code, and rotate it if it may have been exposed. To rotate, create a new credential, switch your integration to it, confirm it works, then revoke the old one. Both steps are on the API credentials page in Partner Hub, or ask Support to do them for you.