API Keys

Create and manage API keys for authenticating with the AppStore Copilot API.

Endpoints

Get a list of all API keys for your account. Key values are partially redacted for security.

GET /api/v1/keys

Authentication

Requires API key with Authorization: Bearer <api_key> header

Response Example

{
"success": true,
"data": {
"keys": [
{
"id": "key_abc123",
"name": "Production API Key",
"prefix": "asc_live_xxxx",
"lastFour": "7890",
"scopes": ["read", "write"],
"lastUsed": "2024-01-20T14:30:00Z",
"createdAt": "2024-01-15T10:00:00Z",
"expiresAt": null
},
{
"id": "key_def456",
"name": "CI/CD Key",
"prefix": "asc_live_xxxx",
"lastFour": "1234",
"scopes": ["read", "write", "delete"],
"lastUsed": "2024-01-20T12:00:00Z",
"createdAt": "2024-01-10T08:00:00Z",
"expiresAt": "2024-12-31T23:59:59Z"
}
]
}
}

Code Examples

curl -X GET https://api.appstorecopilot.com/v1/keys \
-H "Authorization: Bearer $ASC_API_KEY"

Create a new API key. The full key value is only shown once upon creation.

POST /api/v1/keys

Authentication

Requires API key with Authorization: Bearer <api_key> header

Request Body

NameTypeRequiredDescription
namestringYesA friendly name for the key
scopesstring[]NoPermission scopes: read, write, delete (default: ["read", "write"])
expiresAtstringNoISO 8601 expiration date (optional)

Response Example

{
"success": true,
"data": {
"id": "key_ghi789",
"name": "New API Key",
"key": "asc_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"scopes": ["read", "write"],
"createdAt": "2024-01-20T15:00:00Z",
"expiresAt": null
},
"warning": "Store this key securely. It will not be shown again."
}

Code Examples

curl -X POST https://api.appstorecopilot.com/v1/keys \
-H "Authorization: Bearer $ASC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "New API Key",
"scopes": ["read", "write"]
}'

Permanently revoke an API key. This action cannot be undone and will immediately invalidate the key.

DELETE /api/v1/keys/:keyId

Authentication

Requires API key with Authorization: Bearer <api_key> header

URL Parameters

NameTypeRequiredDescription
keyIdstringYesThe key ID to revoke

Response Example

{
"success": true,
"message": "API key revoked successfully"
}

Code Examples

curl -X DELETE https://api.appstorecopilot.com/v1/keys/key_abc123 \
-H "Authorization: Bearer $ASC_API_KEY"

Permission Scopes

ScopePermissions
readRead projects, metadata, screenshots, and usage data
writeCreate/update projects, metadata, translations, and screenshots
deleteDelete projects, credentials, and API keys