Overview
PUT
/bucket/access-groups/{groupId}/grantsbucketUpsert a grant (bucket / bucket_type / row : crud) for an access group
Replace a record in grants by groupId.
Auth: bearerAuth — calls run as the authenticated user.
Parameters
- groupIdpathstring
Request body
application/json · optional
- targetType"bucket" | "bucket_type" | "row"
- targetIdstring
- crudstring
comma-separated CRUD subset (or '' for none)
Example
{
"targetType": "bucket",
"targetId": "string",
"crud": "string"
}Responses
200
Upserted grant
- idstring
- ecosystemIdstring
- accessGroupIdstring
- targetType"bucket" | "bucket_type" | "row"
- targetIdstring
- crudstring
comma-separated CRUD subset, e.g. 'C,R,U,D' or '' (none)
- grantedByoptionalstring?
- createdAtstring
- updatedAtstring
Example
{
"id": "string",
"ecosystemId": "string",
"accessGroupId": "string",
"targetType": "bucket",
"targetId": "string",
"crud": "string",
"grantedBy": "string",
"createdAt": "string",
"updatedAt": "string"
}400
Error
- erroroptionalobject
Example
{
"error": {
"message": "string",
"code": "string"
}
}401
Error
- erroroptionalobject
Example
{
"error": {
"message": "string",
"code": "string"
}
}404
Error
- erroroptionalobject
Example
{
"error": {
"message": "string",
"code": "string"
}
}Code examples
cURL
curl -X PUT "https://api.agenticdeveloperhub.com/bucket/access-groups/{groupId}/grants" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"targetType": "bucket",
"targetId": "string",
"crud": "string"
}'JavaScript
const res = await fetch("https://api.agenticdeveloperhub.com/bucket/access-groups/{groupId}/grants", {
method: "PUT",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: "{\n \"targetType\": \"bucket\",\n \"targetId\": \"string\",\n \"crud\": \"string\"\n}",
});
const data = await res.json();