Skip to main content

Send a credential

Put the credential in the Authorization header of every request.
The API accepts two kinds of credential:
  • An OAuth access token from Pointed sign-in. You get one by running pointed auth login in the Pointed CLI.
  • An API key.
Both identify one Pointed workspace. Every request reads and writes that workspace only.

OAuth access tokens

An OAuth token must have been issued to the Pointed CLI for the API resource https://app.usepointed.ai/api/cli. A token issued to another application, or for another resource, is rejected with 401. pointed auth login asks for the scopes pointed:read, pointed:write, pointed:evidence and pointed:setup, plus user:org:read, which every OAuth token needs here. The token is bound to the workspace you choose when you sign in. OAuth tokens expire. They suit interactive use on your own computer. For a server or an unattended agent, use an API key.

API keys

Use an API key only if you already have a Pointed-compatible API key authorized for your workspace. If you need one, contact Pointed to confirm availability and provisioning. This API has no route that creates a key. Keep the key in a secret store. The examples in this reference read it from the POINTED_API_KEY environment variable, the same variable the Pointed CLI reads. Do not put a key in source files, issues or chat messages.

User-backed and organization-backed keys

An API key belongs either to one person in the workspace or to the workspace itself. An OAuth token is always user-backed. These routes refuse an organization-backed key with 403: An organization-backed key can call the read routes for accounts, contacts, campaigns and story templates, the invitation email preview, GET /auth/whoami, and the export routes if it has pointed:evidence. GET /auth/whoami tells you which kind you hold. See Check a credential.

Scopes

A scope is a permission carried by the credential. An OAuth token gets its scopes at sign-in. An API key gets them when it is issued. Those write routes need both pointed:read and pointed:write. An export route needs both pointed:read and pointed:evidence. The workspace and setup routes need both pointed:read and pointed:setup, and do not need pointed:write. Each endpoint in this reference states the scopes it needs.

Roles

A user-backed credential has the workspace role of its person: admin, member or viewer. Scopes never give a person more than their role allows. A viewer cannot write, whatever scopes the token or key was granted. Pointed removes pointed:write from a viewer’s credential when it checks it, and write routes check the role as well. A write request from a viewer returns 403. Write routes also need a workspace administrator to have accepted the current Terms of Service in the Pointed app. Until then, write requests are refused.

Authentication errors

A missing scope looks like this:
A read-only role looks like this:
An organization-backed key on a write route looks like this:
The setup and workspace routes report the same failures with their own codes. See Workspace and setup.

Check a credential

Authorization: scope pointed:read. Any credential. Returns who the credential acts as. It takes no parameters. Response: 200 OK
Errors: the authentication errors above. Example

Sign-in settings for the CLI

Authorization: none. Returns the sign-in server and client ID that pointed auth login uses. You do not need this route when you use an API key. Response: 200 OK. The body is a bare object, not the standard data and meta format.
Errors Example