Bundles
Named sets of entitlements, such as a plan, granted together.
Entitlements explains bundles, grants, and who holds an entitlement.
Paths are relative to https://api.agentpost.tools/v1/identity, and every request follows the API basics. Who may call explains each kind of caller.
Create a bundle
POST /bundles
Creates a bundle of entitlements from the catalog.
- Who may call: Your server or a signed-in principal.
- Access: Needs
identity.bundle:manage. - Credential: the examples send your project’s
devsecret key,sk_test_…, asAuthorization: Bearer <token>. - SDK:
client.bundles.create(input) - Idempotency-Key: optional. Retrying a write has the rule.
Body
| Name | Type | Required | Description |
|---|---|---|---|
key |
string |
Yes | |
name |
string |
Yes | 1–120 characters. |
items |
object[] |
Yes | |
items[]. |
string |
Yes | |
items[]. |
object |
No | |
items[]. |
string |
Yes | |
items[]. |
string |
Yes |
Response
201 Created, with:
| Name | Type | Present | Description |
|---|---|---|---|
bundle |
Bundle |
Always |
Errors
conflict(409)entitlement_unknown(422)forbidden(403)
Any operation can also answer with the codes Conventions lists.
List bundles
GET /bundles
Every bundle.
- Who may call: Your server or a signed-in principal.
- Access: Needs
identity.bundle:view. - Credential: the examples send your project’s
devsecret key,sk_test_…, asAuthorization: Bearer <token>. - SDK:
client.bundles.list()
Response
200 OK, with:
| Name | Type | Present | Description |
|---|---|---|---|
bundles |
Bundle array |
Always |
Errors
forbidden(403)
Any operation can also answer with the codes Conventions lists.
Get a bundle
GET /bundles/:key
One bundle.
- Who may call: Your server or a signed-in principal.
- Access: Needs
identity.bundle:view. - Credential: the examples send your project’s
devsecret key,sk_test_…, asAuthorization: Bearer <token>. - SDK:
client.bundles.get(key)
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
key |
string |
Yes | A bundle key, such as pro. The key of a Bundle. |
Response
200 OK, with:
| Name | Type | Present | Description |
|---|---|---|---|
bundle |
Bundle |
Always |
Errors
Any operation can also answer with the codes Conventions lists.
Update a bundle
PATCH /bundles/:key
Renames a bundle or changes its items. Existing grants follow the bundle’s new items.
- Who may call: Your server or a signed-in principal.
- Access: Needs
identity.bundle:manage. - Credential: the examples send your project’s
devsecret key,sk_test_…, asAuthorization: Bearer <token>. - SDK:
client.bundles.patch(key, patch) - Idempotency-Key: optional. Retrying a write has the rule.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
key |
string |
Yes | A bundle key, such as pro. The key of a Bundle. |
Body
| Name | Type | Required | Description |
|---|---|---|---|
name |
string |
No | 1–120 characters. |
items |
object[] |
No | |
items[]. |
string |
Yes | |
items[]. |
object |
No | |
items[]. |
string |
Yes | |
items[]. |
string |
Yes |
Response
200 OK, with:
| Name | Type | Present | Description |
|---|---|---|---|
bundle |
Bundle |
Always |
Errors
bundle_retired(409)conflict(409)entitlement_unknown(422)forbidden(403)not_found(404)
Any operation can also answer with the codes Conventions lists.
Retire a bundle
POST /bundles/:key/retire
Retires a bundle. New grants can’t use it, and existing grants of it stay as history but give nothing.
- Who may call: Your server or a signed-in principal.
- Access: Needs
identity.bundle:manage. - Credential: the examples send your project’s
devsecret key,sk_test_…, asAuthorization: Bearer <token>. - SDK:
client.bundles.retire(key) - Idempotency-Key: optional. Retrying a write has the rule.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
key |
string |
Yes | A bundle key, such as pro. The key of a Bundle. |
Response
200 OK, with:
| Name | Type | Present | Description |
|---|---|---|---|
bundle |
Bundle |
Always |
Errors
bundle_retired(409)forbidden(403)not_found(404)
Any operation can also answer with the codes Conventions lists.
The Bundle object
A named, editable set of entitlements (ih_bundles). Its key is its ID.
| Name | Type | Present | Description |
|---|---|---|---|
key |
string |
Always | |
name |
string |
Always | |
items |
object[] |
Always | |
items[]. |
string |
Always | |
items[]. |
object |
When set | |
items[]. |
string |
Always | |
items[]. |
string |
Always | |
status |
"active" or "retired" |
Always | A retired bundle grants nothing; its grants stay as history. |
version |
number |
Always | |
createdAt |
string |
Always | An ISO 8601 date and time. |
updatedAt |
string |
Always | An ISO 8601 date and time. |
updatedBy |
string |
Always | A principal ID, prn_…, or "trusted_caller". |