cURL
curl --request POST \ --url https://api.unkey.dev/v1/ratelimits.limit \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "namespace": "email.outbound", "identifier": "user_123", "limit": 10, "duration": 60000, "cost": 2, "async": false, "meta": {}, "resources": [ { "type": "project", "id": "p_123", "name": "dub" } ] }'
{ "success": true, "limit": 10, "remaining": 9, "reset": 1709804263654 }
Ratelimit an action based on an identifier.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
The response is of type object.
object
Was this page helpful?