Subscriptions
The subscriptions that renew plans.
/api/v1/subscriptions List subscriptions
GET /api/v1/subscriptionsThe subscriptions that renew your plans, for the services this key may read.
Requires the read level on at least one service.
limitinteger50.offsetinteger0.curl https://api.datafuel.ai/api/v1/subscriptions \ --header 'Authorization: Bearer df_live_your_key_here'
OK.
{ "results": [ { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "service": "static", "product": "isp", "plan_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "status": "pending", "auto_renew": false, "period_ends_at": "2026-01-01T00:00:00Z", "period_days": 0, "price": 0, "currency": "usd", "payment": { "method": "balance", "card_id": "string" } } ], "count": 0, "limit": 0, "offset": 0 }
The request is malformed: message maps each invalid field to its problem, or is a sentence when the body cannot be read at all.
{ "error": "string", "message": "string", "meta": {} }
The API key is missing, invalid, expired or revoked.
{ "error": "string", "message": "string", "meta": {} }
The key lacks the scope named in meta.required (or the level in meta.required_level), is used from an IP it does not allow, or the account is suspended.
{ "error": "string", "message": "string", "meta": {} }
Too many requests for this key; retry after the Retry-After seconds.
{ "error": "string", "message": "string", "meta": {} }
Something failed on our side and was logged; read the resource again before retrying a change.
{ "error": "string", "message": "string", "meta": {} }
/api/v1/subscriptions/{subscription}/auto-renew Turn auto-renew on or off
PUT /api/v1/subscriptions/{subscription}/auto-renewNeeds manage on the subscription's service. Turning it off keeps the plan until period_ends_at; turning it on again before then resumes renewals. Asking for the state the subscription is already in changes nothing and answers it. For a subscription paid by card, card_id switches the card renewals are charged to. 409 subscription_ended once it has expired, no_saved_card when a card subscription has no card left to resume on.
Requires the manage level on at least one service.
subscription REQUIREDstringenabled REQUIREDbooleancard_idstringcurl https://api.datafuel.ai/api/v1/subscriptions/{subscription}/auto-renew \ --request PUT \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer df_live_your_key_here' \ --data '{ "enabled": false, "card_id": "string" }'
OK.
{ "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "service": "static", "product": "isp", "plan_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "status": "pending", "auto_renew": false, "period_ends_at": "2026-01-01T00:00:00Z", "period_days": 0, "price": 0, "currency": "usd", "payment": { "method": "balance", "card_id": "string" } }
The request is malformed: message maps each invalid field to its problem, or is a sentence when the body cannot be read at all.
{ "error": "string", "message": "string", "meta": {} }
The API key is missing, invalid, expired or revoked.
{ "error": "string", "message": "string", "meta": {} }
The key lacks the scope named in meta.required (or the level in meta.required_level), is used from an IP it does not allow, or the account is suspended.
{ "error": "string", "message": "string", "meta": {} }
No such resource, or it does not belong to the key's owner.
{ "error": "string", "message": "string", "meta": {} }
The request conflicts with the resource's current state; error names why.
{ "error": "string", "message": "string", "meta": {} }
Too many requests for this key; retry after the Retry-After seconds.
{ "error": "string", "message": "string", "meta": {} }
Something failed on our side and was logged; read the resource again before retrying a change.
{ "error": "string", "message": "string", "meta": {} }