2021-07-05
1import requests23url = "https://withpersona.com/api/v1/api-keys/api-key-id/expire"45payload = {}6headers = {7 "Authorization": "<apiKey>",8 "Content-Type": "application/json"9}1011response = requests.post(url, json=payload, headers=headers)1213print(response.json())
1{2 "data": {3 "type": "api-key",4 "id": "api_eENJtyj61qWGLWCd2X7vHyAf",5 "attributes": {6 "name": {},7 "note": {},8 "value": {},9 "api-version": "2021-07-05",10 "api-key-inflection": "kebab",11 "permissions": [12 "account.read",13 "account.write",14 "api_log.read",15 "..."16 ],17 "api-attributes-allowlist": [18 "address_*",19 "allowed_users",20 "..."21 ],22 "ip-address-allowlist": [23 "*"24 ],25 "last-used-at": "2022-08-17T23:44:00.000Z",26 "expires-at": "2022-08-17T23:45:00.000Z",27 "created-at": "2022-08-17T23:18:13.000Z"28 }29 }30}
API key’s ID (starts with “api_”)