Authentication
Every request is authenticated with an API key, sent as a bearer token:
Authorization: Bearer sk_live_...curl 'https://api.presscloud.ai/v1/articles' \ -H "Authorization: Bearer $PRESSCLOUD_API_KEY"Keys begin with sk_live_. No other credentials, cookies or session state are involved.
Base URLs
Section titled “Base URLs”| Base URL | Use |
|---|---|
https://api.presscloud.ai/v1 |
Recommended. |
https://presscloud.ai/api/v1 |
Alternative for environments that only allow the primary hostname. |
Both serve the same API. Choose one and use it consistently.
Obtaining a key
Section titled “Obtaining a key”API access is provisioned with a plan. Request access and you will receive a response within two working days, including a sample dataset of 1,000 recent articles and a proposal matched to your expected volume.
Once your account is active, keys are managed in the API console at /dashboard/api, where you can create and revoke keys and monitor usage for the current period.
Handling keys
Section titled “Handling keys”A key is displayed once, when it is created. It cannot be retrieved afterwards; if a key is lost, revoke it and create a new one.
Treat keys as server-side secrets. Store them in environment configuration, never in source control, and never expose them to browsers or mobile clients.
PRESSCLOUD_API_KEY=sk_live_...Authentication errors
Section titled “Authentication errors”| Code | Status | Meaning |
|---|---|---|
missing_token |
401 |
No Authorization header was sent. |
invalid_token |
401 |
The key is not valid. |
too_many_failed_attempts |
429 |
Too many rejected requests from this IP address. Retry after the interval in Retry-After. |
A revoked key returns invalid_token.
too_many_failed_attempts applies per IP address and counts only rejected requests, so normal use of a valid key does not contribute to it. If several systems share one outbound address, a key that has authenticated successfully from that address within the past hour continues to work while the limit is in effect.
Example: Laravel
Section titled “Example: Laravel”'presscloud_news' => [ 'key' => env('PRESSCLOUD_API_KEY'), 'base_url' => env('PRESSCLOUD_API_URL', 'https://api.presscloud.ai/v1'),],$response = Http::withToken(config('services.presscloud_news.key')) ->baseUrl(config('services.presscloud_news.base_url')) ->get('/articles', ['country' => 'NL', 'has_author' => 'true']);