Connection

Change this connection's access

Change what this AI-assistant connection may do, from the chat, after the person has said yes. Send grants, one per business to change (organization_id, or null for the person's own account) with access none, read or write, and or new_organization_access for businesses the person joins later (none, read, or role). Applies at once; the connection stays live. The person is emailed what changed, with the link to undo it.

Use it when a write was refused with code insufficient_access and the person wants to allow it: offer to switch this connection to read and write in that business, and call this only once they agree in the chat. A grant can never exceed the person's own role in that business (owner, admin and manager can allow writes; contractor and viewer only reads); a 422 says which. Every gate a write passes applies here too: a connection without the write scope (one made before 2026-10-09, or a client that asked for less) is refused with code insufficient_access, and the person widens it from the manage_url link instead. There is no id: a token changes itself only. Only the grants named change; the others stand.

patch/connection

Request

  • Base URL: https://api.purplegrain.com/api/v1
  • URL: https://api.purplegrain.com/api/v1/connection
  • Auth: HTTP bearer

Request body

new_organization_access'none' | 'read' | 'role'

Response

The connection, with its grants as they now stand and the access overview in meta.

Example response

{
  "data": {
    "type": "oauth-token"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.