API reference

Access

Check what the key you're using is and what it may do.

Check your key

GET/v1/access

Says what the key you call with is and what it may do, so a script or the CLI can check its setup before relying on it. A send key gets the one source it sends to, which a send already reveals. An API token gets its label, access level, and the sources it reads. A terminal signed in with ripple login also gets the account's email address.

AuthSend keyorAPI token

Responses

  • 200

    The key you called with

    Response fields

    One of

    • kindstringRequired

      send_key

    • sourceobjectRequired

      The source the key sends to, the only one it reaches.

      Fields
      • sourceIdstring · starts with src_Required
      • namestringRequired

    Or

    • kindstringRequired

      api_token

    • labelstringRequired

      The token's name, as Settings → Developer → API tokens shows it.

    • accessstringRequired

      read_onlysend_onlyread_and_sendeverything

      What an API token or a connected app can do. read_only lists, reads, and searches messages, threads, sources, and Trash. send_only sends to Inbox or any source and sees source names, nothing else. read_and_send does both, and tidies: marks read, archives, snoozes, and moves. everything also creates and changes sources and their send keys, moves messages to Trash, restores them, and deletes them for good.

    • sourcesstring or list of stringsRequired

      The sources an API token or a connected app reads: all, which includes sources added later, or a list of source IDs. A token's list grows only when the token creates a source. Sending reaches every source whatever this says, and send_only always has all.

    Or

    • kindstringRequired

      sign_in

    • emailstringRequired

      The account's contact email, or the address it signed in with when it has none.

    • accessstringRequired

      read_onlysend_onlyread_and_sendeverything

      What an API token or a connected app can do. read_only lists, reads, and searches messages, threads, sources, and Trash. send_only sends to Inbox or any source and sees source names, nothing else. read_and_send does both, and tidies: marks read, archives, snoozes, and moves. everything also creates and changes sources and their send keys, moves messages to Trash, restores them, and deletes them for good.

    • sourcesstring or list of stringsRequired

      The sources an API token or a connected app reads: all, which includes sources added later, or a list of source IDs. A token's list grows only when the token creates a source. Sending reaches every source whatever this says, and send_only always has all.

  • 401

    The request has no valid API token or sign-in (unauthorized)

  • 429

    Your IP address sent 20 invalid keys within a minute (invalid_key_rate_limited), so Ripple refuses every key from it, valid or not, until that minute ends. Retry-After says how many seconds that is.

  • 503

    Ripple is busy right now (database_busy). Wait the number of seconds in Retry-After, then try again.

curl https://api.ripple.do/v1/access \
  -H "Authorization: Bearer $RIPPLE_KEY"
{
  "kind": "api_token",
  "label": "Home server",
  "access": "read_and_send",
  "sources": [
    "src_06gnkvcmntkp91yv"
  ]
}