API Reference › Basics
Keys and permissions
Send the key on every call as Authorization: Bearer pt_key_…. A key is pt_key_ and 32 letters and digits. Each key also has an ID such as ak_7Hq2Ld, which Settings shows and which is safe to share.
| Kind | Made by | Starts | Stops working |
|---|---|---|---|
agent | An agent, with POST /api/v1/access-requests | Pending, until the person approves it | After the expiry date the person chose when approving it, if any, when denied, when nobody approves it within an hour, or when revoked |
personal | The person, in Settings, Your keys | Active | After the expiry date the person chose, if any, or when revoked |
| Permission | Lets the key | Endpoints |
|---|---|---|
read | Read listings, offers, sales, leases, the account and the inbox. Always included. | Every GET |
listings | List, change, pause, check and remove domains, and change the DNS records Ported.io keeps for them | PUT and DELETE /api/v1/listings/{domain}, POST …/check, PUT …/records |
offers | Answer offers. Accepting one starts a sale. | PUT /api/v1/offers/{offerId}/answer |
A key without a permission gets PERMISSION_MISSING. An agent then asks for a new key with the permission it needs, which the person approves like the first. A personal key's permissions are fixed, so the person makes a new one in Settings, Your keys. The person can revoke any key in Settings.