cURL
curl --request PUT \ --url https://api.example.com/v1/organizations/{organizationId}/projects/{projectId}/api-keys/{id} \ --header 'Content-Type: application/json' \ --data ' { "name": "<string>", "status": "<string>" } '
Update API key name or status
active
revoked
{ "name": "Updated Name", "status": "active" }
{ "id": "afd8012b-d81e-41c6-92cd-eed0c6cb3676", "projectId": "70093272-90ef-43df-807b-b66dd0a0b322", "name": "Updated Name", "status": "active", "createdAt": "2024-03-20T10:00:00Z", "updatedAt": "2024-03-22T14:00:00Z", "lastUsed": "2024-03-21T15:30:00Z" }
{ "error": { "code": "NOT_FOUND", "message": "API key not found" } }
curl -X PUT "https://api.metabind.ai/v1/organizations/org123/projects/proj456/api-keys/key123" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Updated Name", "status": "active" }'