Skip to content

Websites that accept Bage

GET
/v1/sites
curl --request GET \
--url 'https://api.trybage.com/v1/sites?origin=https%3A%2F%2Fshop.example'

Websites whose owners verified their domain in the console and chose to be listed. Agents use it to know where they can sign in as their person before trying. Pass origin to ask about one website: an empty list means it isn’t listed (it may still accept Bage; its /.well-known/agent-login file is the final word).

origin
string

A website’s address. Any path is ignored.

The websites, by name.

Media typeapplication/json
object
sites
required
Array<object>
object
name
required
string
origin
required
string
agent_login_url
required

The site’s agent-login file.

string format: uri
scopes
required

What agents may ask for there - email (always), the standard scopes the site turned on, and its own custom scopes.

Array<string>
custom_scopes
required

The site’s own scopes among them, with what each means. People see the title and description when they approve.

Array<object>
object
name
required
string
/^[a-z][a-z0-9_]{1,39}$/
title
required
string
<= 40 characters
description
required
string
<= 160 characters
agent_access
required

any: every agent the site hasn’t cut off. listed: only agents the site allowed.

string
Allowed values: any listed
verified_at
required

When the domain was verified (Unix seconds).

integer

Example

{
"sites": [
{
"name": "Kestrel Market",
"origin": "https://shop.example",
"agent_login_url": "https://shop.example/.well-known/agent-login",
"scopes": [
"email",
"browse",
"cart",
"returns"
],
"custom_scopes": [
{
"name": "returns",
"title": "Start returns",
"description": "Start a return or exchange for a past order"
}
],
"agent_access": "any"
}
]
}

invalid_origin: origin isn’t a website’s address.

Media typeapplication/json
object
error
required
string
error_description
string

Example

{
"error": "authorization_pending"
}