Access
Preview

Change when a role binding ends

Moves the end of a grant in place, or removes it (`expiresAt` null), so the grant keeps its id and who made it. The new end must be in the future. Owners and leads, which come from the team or thing itself, are changed there. Writes an Activity entry with the old and the new end.

PATCH
/role-bindings/{bindingId}
cookiebetter-auth.session_token<token>

Better Auth session cookie. Production uses the __Secure- prefixed name.

bindingId*string
Formatuuid
application/json
  1. body
expiresAt*|

When the grant ends; null for never.

Formatdate-time

Response Body

The binding after the change.

application/json
  1. response
id*string
Formatuuid
roleId*string
Formatuuid
roleName*string
scope*
subject*
expiresAt?|
Formatdate-time
createdAt*string
Formatdate-time
createdBy?string
Example Request
curl -X PATCH 'https://wardn.example.com/api/v1/role-bindings/497f6eca-6276-4993-bfeb-53cbbbba6f08' \  -H 'Content-Type: application/json' \  -d '{  "expiresAt": "2019-08-24T14:15:22Z"}'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "roleId": "7382d58e-652a-4905-b7c9-bcca1e0e5391",  "roleName": "string",  "scope": {    "kind": "org",    "id": "string",    "label": "string"  },  "subject": {    "kind": "team",    "id": "string",    "label": "string"  },  "expiresAt": "2019-08-24T14:15:22Z",  "createdAt": "2019-08-24T14:15:22Z",  "createdBy": "string"}