Identity: presets
This identity’s own preset bundles, and which have been edited
Section titled “This identity’s own preset bundles, and which have been edited”GET /v1/identities/{slug}/presets · operation listIdentityPresets
Requires the batondeck:contacts:read permission (action contact:read).
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
slug |
path | string | yes |
Responses
| Status | Meaning |
|---|---|
| 200 | This identity’s own preset bundles, and which have been edited |
| 401 | No portal session, and no live API key. |
| 403 | The policy refused, or the request was cross-site. |
| 404 | No such resource, or none this session may see. |
200 response schema
{ "type": "object", "properties": { "presets": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "permissions": { "type": "array", "items": { "type": "string" } }, "edited": { "type": "boolean" } }, "required": [ "name", "permissions", "edited" ], "additionalProperties": false } } }, "required": [ "presets" ], "additionalProperties": false}curl -X GET 'https://api.batondeck.com/v1/identities/:slug/presets' \ -H "Authorization: Bearer $BATONDECK_API_KEY"Change what a preset grants, for this identity
Section titled “Change what a preset grants, for this identity”PATCH /v1/identities/{slug}/presets/{name} · operation setIdentityPreset
Requires the batondeck:contacts:manage permission (action contact:write).
Refused while the workspace is suspended or on deletion hold.
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
slug |
path | string | yes | |
name |
path | string | yes |
Request body (application/json)
| Field | Type | Required | Notes |
|---|---|---|---|
permissions |
array of string | yes |
Request schema
{ "type": "object", "properties": { "permissions": { "maxItems": 64, "type": "array", "items": { "type": "string" } } }, "required": [ "permissions" ], "additionalProperties": false}Responses
| Status | Meaning |
|---|---|
| 200 | Change what a preset grants, for this identity |
| 400 | The arguments did not validate. |
| 401 | No portal session, and no live API key. |
| 403 | The policy refused, or the request was cross-site. |
| 404 | No such resource, or none this session may see. |
200 response schema
{ "type": "object", "properties": { "name": { "type": "string" }, "permissions": { "type": "array", "items": { "type": "string" } } }, "required": [ "name", "permissions" ], "additionalProperties": false}curl -X PATCH 'https://api.batondeck.com/v1/identities/:slug/presets/:name' \ -H "Authorization: Bearer $BATONDECK_API_KEY" \ -H 'content-type: application/json' \ -d @body.json