Set a company API key's expiry

Schedule an API key to stop working.

Use this endpoint to retire a company API key. It stops working in expireInHours hours, from 0 to 24; with 0 it stops now. The response shows the key with its expiresAt.

A key that already has an expiry scheduled can't be given another. Cancel the first, then set the new one.

Errors

StatusMeaning
400The key already has an expiry scheduled.
401The API key is missing, malformed or expired.
404No company with this ID belongs to your partner account, or the company has no key with this ID.
412Custom API integrations aren't enabled for this company.
422expireInHours is missing, or isn't from 0 to 24.
📘

Part of Company API keys. Authenticate with your partner API key, as for every endpoint in this section: see Authentication.

Path Params
integer
required

The company's ID, as returned when the company was created.

string
required

The key's ID.

Body Params
integer
required
0 to 24

Hours until the key stops working, from 0 to 24. 0 ends it now.

Responses

Language
Credentials
Header
LoadingLoading…
Response
Choose an example:
application/json