{"files":{"SKILL.md":"---\nname: control-api-v1\ndescription: \"Control API v1 API skill. Use when working with Control API v1 for accounts, apps, me. Covers 22 endpoints.\"\nversion: 1.0.0\ngenerator: lapsh\n---\n\n# Control API v1\nAPI version: 1.0.32\n\n## Auth\nBearer bearer\n\n## Base URL\nhttps://control.ably.net/v1\n\n## Setup\n1. Set Authorization header with your Bearer token\n2. GET /me -- verify access\n3. POST /accounts/{account_id}/apps -- create first apps\n\n## Endpoints\n\n22 endpoints across 3 groups. See references/api-spec.lap for full details.\n\n### accounts\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /accounts/{account_id}/apps | Lists account apps |\n| POST | /accounts/{account_id}/apps | Creates an app |\n\n### apps\n| Method | Path | Description |\n|--------|------|-------------|\n| PATCH | /apps/{id} | Updates an app |\n| DELETE | /apps/{id} | Deletes an app |\n| POST | /apps/{id}/pkcs12 | Updates app's APNs info from a `.p12` file |\n| GET | /apps/{app_id}/keys | Lists app keys |\n| POST | /apps/{app_id}/keys | Creates a key |\n| PATCH | /apps/{app_id}/keys/{key_id} | Updates a key |\n| POST | /apps/{app_id}/keys/{key_id}/revoke | Revokes a key |\n| GET | /apps/{app_id}/namespaces | Lists namespaces |\n| POST | /apps/{app_id}/namespaces | Creates a namespace |\n| PATCH | /apps/{app_id}/namespaces/{namespace_id} | Updates a namespace |\n| DELETE | /apps/{app_id}/namespaces/{namespace_id} | Deletes a namespace |\n| GET | /apps/{app_id}/queues | Lists queues |\n| POST | /apps/{app_id}/queues | Creates a queue |\n| DELETE | /apps/{app_id}/queues/{queue_id} | Deletes a queue |\n| GET | /apps/{app_id}/rules | Lists rules |\n| POST | /apps/{app_id}/rules | Creates a rule |\n| GET | /apps/{app_id}/rules/{rule_id} | Gets a rule using a rule ID |\n| PATCH | /apps/{app_id}/rules/{rule_id} | Updates a Rule |\n| DELETE | /apps/{app_id}/rules/{rule_id} | Deletes a rule |\n\n### me\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /me | Get token details |\n\n## Common Questions\n\nMatch user requests to endpoints in references/api-spec.lap. Key patterns:\n- \"List all apps?\" -> GET /accounts/{account_id}/apps\n- \"Create a app?\" -> POST /accounts/{account_id}/apps\n- \"Partially update a app?\" -> PATCH /apps/{id}\n- \"Delete a app?\" -> DELETE /apps/{id}\n- \"Create a pkcs12?\" -> POST /apps/{id}/pkcs12\n- \"List all keys?\" -> GET /apps/{app_id}/keys\n- \"Create a key?\" -> POST /apps/{app_id}/keys\n- \"Partially update a key?\" -> PATCH /apps/{app_id}/keys/{key_id}\n- \"Create a revoke?\" -> POST /apps/{app_id}/keys/{key_id}/revoke\n- \"List all namespaces?\" -> GET /apps/{app_id}/namespaces\n- \"Create a namespace?\" -> POST /apps/{app_id}/namespaces\n- \"Partially update a namespace?\" -> PATCH /apps/{app_id}/namespaces/{namespace_id}\n- \"Delete a namespace?\" -> DELETE /apps/{app_id}/namespaces/{namespace_id}\n- \"List all queues?\" -> GET /apps/{app_id}/queues\n- \"Create a queue?\" -> POST /apps/{app_id}/queues\n- \"Delete a queue?\" -> DELETE /apps/{app_id}/queues/{queue_id}\n- \"List all rules?\" -> GET /apps/{app_id}/rules\n- \"Create a rule?\" -> POST /apps/{app_id}/rules\n- \"Get rule details?\" -> GET /apps/{app_id}/rules/{rule_id}\n- \"Partially update a rule?\" -> PATCH /apps/{app_id}/rules/{rule_id}\n- \"Delete a rule?\" -> DELETE /apps/{app_id}/rules/{rule_id}\n- \"List all me?\" -> GET /me\n- \"How to authenticate?\" -> See Auth section\n\n## Response Tips\n- Check response schemas in references/api-spec.lap for field details\n- Create/update endpoints typically return the created/updated object\n\n## CLI\n\n```bash\n# Update this spec to the latest version\nnpx @lap-platform/lapsh get control-api-v1 -o references/api-spec.lap\n\n# Search for related APIs\nnpx @lap-platform/lapsh search control-api-v1\n```\n\n## References\n- Full spec: See references/api-spec.lap for complete endpoint details, parameter tables, and response schemas\n\n> Generated from the official API spec by [LAP](https://lap.sh)\n","references/api-spec.lap":"@lap v0.3\n# Machine-readable API spec. Each @endpoint block is one API call.\n@api Control API v1\n@base https://control.ably.net/v1\n@version 1.0.32\n@auth Bearer bearer\n@endpoints 22\n@hint download_for_search\n@toc accounts(2), apps(19), me(1)\n\n@group accounts\n@endpoint GET /accounts/{account_id}/apps\n@desc Lists account apps\n@required {account_id: str # The account ID for which to retrieve the associated applications.}\n@returns(200) List of apps for the specified account are returned\n@errors {401: Authentication failed, 404: Account not found, 500: Internal server error}\n\n@endpoint POST /accounts/{account_id}/apps\n@desc Creates an app\n@required {account_id: str # The account ID of the account in which to create the application., name: str # The name of the application for your reference only.}\n@optional {status: str # The status of the application. Can be `enabled` or `disabled`. Enabled means available to accept inbound connections and all services are available., tlsOnly: bool # Enforce TLS for all connections., fcmKey: str # The Firebase Cloud Messaging key., fcmServiceAccount: str # Used to specify the Firebase Cloud Messaging(FCM) service account credentials used for authentication and enabling communication with FCM to send push notifications to devices., fcmProjectId: str # The unique identifier for the Firebase Cloud Messaging(FCM) project. This ID is used to specify the Firebase project when configuring FCM or other Firebase services., apnsCertificate: str # The Apple Push Notification service certificate., apnsPrivateKey: str # The Apple Push Notification service private key., apnsUseSandboxEndpoint: bool # Use the Apple Push Notification service sandbox endpoint.}\n@returns(201) {accountId: str, id: str, name: str, status: str, tlsOnly: bool?, apnsUseSandboxEndpoint: bool?, _links: map?} # App created\n@errors {400: Bad request, 401: Authentication failed, 404: Account not found, 422: Invalid request, 500: Internal server error}\n\n@endgroup\n\n@group apps\n@endpoint PATCH /apps/{id}\n@desc Updates an app\n@required {id: str # The ID of application to be updated.}\n@optional {name: str # The name of the application for your reference only., status: str # The status of the application. Can be `enabled` or `disabled`. Enabled means available to accept inbound connections and all services are available., tlsOnly: bool # Enforce TLS for all connections., fcmKey: str # The Firebase Cloud Messaging key., fcmServiceAccount: str # Used to specify the Firebase Cloud Messaging(FCM) service account credentials used for authentication and enabling communication with FCM to send push notifications to devices., fcmProjectId: str # The unique identifier for the Firebase Cloud Messaging(FCM) project. This ID is used to specify the Firebase project when configuring FCM or other Firebase services., apnsCertificate: str # The Apple Push Notification service certificate., apnsPrivateKey: str # The Apple Push Notification service private key., apnsUseSandboxEndpoint: bool # Use the Apple Push Notification service sandbox endpoint.}\n@returns(200) {accountId: str, id: str, name: str, status: str, tlsOnly: bool?, apnsUseSandboxEndpoint: bool?, _links: map?} # App updated\n@errors {400: Bad request, 401: Authentication failed, 404: App not found, 422: Invalid resource, 500: Internal server error}\n\n@endpoint DELETE /apps/{id}\n@desc Deletes an app\n@required {id: str # The ID of the application to be deleted.}\n@returns(204) App deleted\n@errors {401: Authentication failed, 404: App not found, 422: Invalid request, 500: Internal server error}\n\n@endpoint POST /apps/{id}/pkcs12\n@desc Updates app's APNs info from a `.p12` file\n@required {id: str # The application ID.}\n@returns(200) {accountId: str, id: str, name: str, status: str, tlsOnly: bool?, apnsUseSandboxEndpoint: bool?, _links: map?} # App updated\n@errors {400: Bad request, 401: Authentication failed, 404: App not found, 500: Internal server error}\n\n@endpoint GET /apps/{app_id}/keys\n@desc Lists app keys\n@required {app_id: str # The application ID.}\n@returns(200) Key list\n@errors {401: Authentication failed, 404: App not found, 500: Internal server error, 504: Gateway timeout}\n\n@endpoint POST /apps/{app_id}/keys\n@desc Creates a key\n@required {app_id: str # The application ID., name: str # The name for your API key. This is a friendly name for your reference., capability: map # These are the capability operations described in the <a href=\"https://ably.com/docs/auth/capabilities\">capabilities docs</a>.}\n@returns(201) {appId: str, id: str, name: str, status: int, key: str, capability: map, created: int, modified: int} # Key created\n@errors {400: Bad request, 401: Authentication failed, 404: App not found, 422: Invalid request, 500: Internal server error}\n\n@endpoint PATCH /apps/{app_id}/keys/{key_id}\n@desc Updates a key\n@required {app_id: str # The application ID., key_id: str # The API key ID.}\n@optional {name: str # The name for your API key. This is a friendly name for your reference., capability: map # These are the capability operations described in the Ably <a href=\"https://ably.com/docs/auth/capabilities\">capabilities docs</a>.}\n@returns(200) {appId: str, id: str, name: str, status: int, key: str, capability: map, created: int, modified: int} # Key updated\n@errors {400: Bad request, 401: Authentication failed, 404: App not found, 422: Invalid request, 500: Internal server error, 504: Gateway timeout}\n\n@endpoint POST /apps/{app_id}/keys/{key_id}/revoke\n@desc Revokes a key\n@required {app_id: str # The application ID., key_id: str # The key ID.}\n@returns(200) Key revoked\n@errors {401: Authentication failed, 404: Not found, 500: Internal server error, 504: Gateway timeout}\n\n@endpoint GET /apps/{app_id}/namespaces\n@desc Lists namespaces\n@required {app_id: str # The application ID.}\n@returns(200) Namespace list\n@errors {401: Authentication failed, 404: App not found, 500: Internal server error, 504: Gateway timeout}\n\n@endpoint POST /apps/{app_id}/namespaces\n@desc Creates a namespace\n@required {app_id: str # The application ID., id: str # The namespace or channel name that the channel rule will apply to. For example, if you specify `namespace` the namespace will be set to `namespace` and will match with channels `namespace:*` and `namespace`.}\n@optional {authenticated: bool=False # If `true`, clients will not be permitted to use (including to attach, publish, or subscribe) any channels within this namespace unless they are identified, that is, authenticated using a client ID. See the documentation for <a href=\"https://ably.com/docs/auth/identified-clients\">identified clients</a> for more details., persisted: bool=False # If `true`, all messages on a channel will be stored for 24 hours. You can access stored messages via the History API. Please note that for each message stored, an additional message is deducted from your monthly allocation., persistLast: bool=False # If `true`, the last message published on a channel will be stored for 365 days. You can access the stored message only by using the channel rewind mechanism and attaching with rewind=1. Please note that for each message stored, an additional message is deducted from your monthly allocation., pushEnabled: bool=False # If `true`, publishing messages with a push payload in the extras field is permitted and can trigger the delivery of a native push notification to registered devices for the channel., batchingEnabled: bool=False # If `true`, channels within this namespace will start batching inbound messages instead of sending them out immediately to subscribers., batchingPolicy: str=simple # If `true`, groups multiple incoming messages into a single batch., batchingInterval: int=20 # If `true`, the batching interval, configurable from 20ms to 1s, temporarily holds and aggregates incoming messages. These messages are then combined and delivered as a single batch once the interval elapses or a size limit is reached (before the interval elapses)., tlsOnly: bool=False # If `true`, only clients that are connected using TLS will be permitted to subscribe to any channels within this namespace., exposeTimeserial: bool=False # If `true`, messages received on a channel will contain a unique `timeserial` that can be referenced by later messages for use with message interactions.}\n@returns(201) {authenticated: bool, created: int, modified: int, id: str, persisted: bool, persistLast: bool, pushEnabled: bool, batchingEnabled: bool, batchingPolicy: str, batchingInterval: int, tlsOnly: bool, exposeTimeserial: bool} # Namespace created\n@errors {400: Bad request, 401: Authentication failed, 404: App not found, 422: Invalid request, 500: Internal server error}\n\n@endpoint PATCH /apps/{app_id}/namespaces/{namespace_id}\n@desc Updates a namespace\n@required {app_id: str # The application ID., namespace_id: str # The namespace ID.}\n@optional {authenticated: bool=False # If `true`, clients will not be permitted to use (including to attach, publish, or subscribe) any channels within this namespace unless they are identified, that is, authenticated using a client ID. See the documentation for <a href=\"https://ably.com/docs/auth/identified-clients\">identified clients</a> for more details., persisted: bool=False # If `true`, all messages on a channel will be stored for 24 hours. You can access stored messages via the History API. Please note that for each message stored, an additional message is deducted from your monthly allocation., persistLast: bool=False # If `true`, the last message published on a channel will be stored for 365 days. You can access the stored message only by using the channel rewind mechanism and attaching with rewind=1. Please note that for each message stored, an additional message is deducted from your monthly allocation., pushEnabled: bool=False # If `true`, publishing messages with a push payload in the extras field is permitted and can trigger the delivery of a native push notification to registered devices for the channel., batchingEnabled: bool=False # If `true`, channels within this namespace will start batching inbound messages instead of sending them out immediately to subscribers., batchingPolicy: str=simple # If `true`, groups multiple incoming messages into a single batch., batchingInterval: int=20 # If `true`, the batching interval, configurable from 20ms to 1s, temporarily holds and aggregates incoming messages. These messages are then combined and delivered as a single batch once the interval elapses or a size limit is reached (before the interval elapses)., tlsOnly: bool=False # If `true`, only clients that are connected using TLS will be permitted to subscribe to any channels within this namespace., exposeTimeserial: bool # If `true`, messages received on a channel will contain a unique `timeserial` that can be referenced by later messages for use with message interactions.}\n@returns(200) {authenticated: bool, created: int, modified: int, id: str, persisted: bool, persistLast: bool, pushEnabled: bool, batchingEnabled: bool, batchingPolicy: str, batchingInterval: int, tlsOnly: bool, exposeTimeserial: bool} # Namespace updated\n@errors {400: Bad request, 401: Authentication failed, 404: Not found, 500: Internal server error, 504: Gateway timeout}\n\n@endpoint DELETE /apps/{app_id}/namespaces/{namespace_id}\n@desc Deletes a namespace\n@required {app_id: str # The application ID., namespace_id: str # The namespace ID.}\n@returns(204) Namespace deleted\n@errors {401: Authentication failed, 404: Not found, 500: Internal server error, 504: Gateway timeout}\n\n@endpoint GET /apps/{app_id}/queues\n@desc Lists queues\n@required {app_id: str # The application ID.}\n@returns(200) Queue list\n@errors {401: Authentication failed, 404: App not found, 500: Internal server error, 503: 503 Service unavailable, 504: Gateway timeout}\n\n@endpoint POST /apps/{app_id}/queues\n@desc Creates a queue\n@required {app_id: str # The application ID., name: str # A friendly name for your queue., ttl: int # TTL in minutes., maxLength: int # Message limit in number of messages., region: str # The data center region. US East (Virginia) or EU West (Ireland). Values are `us-east-1-a` or `eu-west-1-a`.}\n@returns(201) {id: str, appId: str, name: str, region: str, amqp: map{uri: str, queueName: str}, stomp: map{uri: str, host: str, destination: str}, state: str, messages: map{ready: int?, unacknowledged: int?, total: int?}, stats: map{publishRate: num?, deliveryRate: num?, acknowledgementRate: num?}, ttl: int, maxLength: int, deadletter: bool, deadletterId: str?} # Queue created\n@errors {400: Bad request, 401: Authentication failed, 404: App not found, 422: Invalid request, 500: Internal server error}\n\n@endpoint DELETE /apps/{app_id}/queues/{queue_id}\n@desc Deletes a queue\n@required {app_id: str # The application ID., queue_id: str # The queue ID.}\n@returns(204) Queue deleted\n@errors {400: Bad request, 401: Authentication failed, 404: App not found, 500: Internal server error, 503: 503 Service unavailable}\n\n@endpoint GET /apps/{app_id}/rules\n@desc Lists rules\n@required {app_id: str # The application ID.}\n@returns(200) Rule list\n@errors {401: Authentication failed, 404: App not found, 500: Internal server error, 504: Gateway timeout}\n\n@endpoint POST /apps/{app_id}/rules\n@desc Creates a rule\n@required {app_id: str # The application ID.}\n@returns(201) Rule created\n@errors {400: Bad request, 401: Authentication failed, 404: App not found, 422: Invalid request, 500: Internal server error, 504: Gateway timeout}\n\n@endpoint GET /apps/{app_id}/rules/{rule_id}\n@desc Gets a rule using a rule ID\n@required {app_id: str # The application ID., rule_id: str # The rule ID.}\n@returns(200) Rule\n@errors {401: Authentication failed, 404: Not found, 500: Internal server error, 504: Gateway timeout}\n\n@endpoint PATCH /apps/{app_id}/rules/{rule_id}\n@desc Updates a Rule\n@required {app_id: str # The application ID., rule_id: str # The rule ID.}\n@returns(200) Rule updated\n@errors {400: Bad request, 401: Authentication failed, 404: App not found, 422: Invalid request, 500: Internal server error, 504: Gateway timeout}\n\n@endpoint DELETE /apps/{app_id}/rules/{rule_id}\n@desc Deletes a rule\n@required {app_id: str # The application ID., rule_id: str # The rule ID.}\n@returns(204) Rule deleted\n@errors {401: Authentication failed, 404: App not found, 500: Internal server error, 504: Gateway timeout}\n\n@endgroup\n\n@group me\n@endpoint GET /me\n@desc Get token details\n@returns(200) {token: map{id: int, name: str, capabilities: [str]}, user: map{id: int, email: str}, account: map{id: str, name: str}} # Token details\n@errors {401: Authentication failed, 500: Internal server error}\n\n@endgroup\n\n@end\n"}}