Account¶
The plan and its use, the account's webhook receiver.
The plan and its use¶
GET /v1/accounts/{a}/plan
Parameters
| Name | In | Type | Description |
|---|---|---|---|
a (required) |
path | string | Your account's id (the panel's URL, or account in a move). |
Responses
| Status | Description | Body |
|---|---|---|
200 |
The plan. | Plan |
401 |
Unauthorized: No valid API key (or session). login_url is for the panel. |
Error |
429 |
TooMany: rate_limited: over the key's or the address's rate (see Rate limits); wait Retry-After seconds. |
Error |
404 |
NotFound: No such object in your account (another account's ids answer the same). | Error |
Organizations in use per day¶
GET /v1/accounts/{a}/usage
Parameters
| Name | In | Type | Description |
|---|---|---|---|
a (required) |
path | string | Your account's id (the panel's URL, or account in a move). |
from |
query | string (date) | Default 29 days ago. |
to |
query | string (date) | Default today; at most 400 days after from. |
Responses
| Status | Description | Body |
|---|---|---|
200 |
One row per day. | object |
400 |
BadRequest: A field is missing or wrong. | Error |
401 |
Unauthorized: No valid API key (or session). login_url is for the panel. |
Error |
429 |
TooMany: rate_limited: over the key's or the address's rate (see Rate limits); wait Retry-After seconds. |
Error |
404 |
NotFound: No such object in your account (another account's ids answer the same). | Error |
The account's webhook receiver¶
GET /v1/accounts/{a}/webhook
Parameters
| Name | In | Type | Description |
|---|---|---|---|
a (required) |
path | string | Your account's id (the panel's URL, or account in a move). |
Responses
| Status | Description | Body |
|---|---|---|
200 |
The receiver (url null when none). The secret is never shown again. |
WebhookEndpoint |
401 |
Unauthorized: No valid API key (or session). login_url is for the panel. |
Error |
429 |
TooMany: rate_limited: over the key's or the address's rate (see Rate limits); wait Retry-After seconds. |
Error |
404 |
NotFound: No such object in your account (another account's ids answer the same). | Error |
Set the account's webhook receiver¶
PUT /v1/accounts/{a}/webhook
Moves without their own callback_url are posted here, signed with this receiver's
secret. The secret (whs_…) is in the answer of the first PUT and of a PUT with
rotate: true, and nowhere else.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
a (required) |
path | string | Your account's id (the panel's URL, or account in a move). |
Body (application/json)
| Field | Type | Description |
|---|---|---|
url (required) |
string (uri) | |
events |
array of string: move.state, org.attention, runner.state, agent.state, alert |
Empty means all. |
rotate |
boolean |
Responses
| Status | Description | Body |
|---|---|---|
200 |
The receiver. | WebhookEndpoint |
400 |
BadRequest: A field is missing or wrong. | Error |
401 |
Unauthorized: No valid API key (or session). login_url is for the panel. |
Error |
429 |
TooMany: rate_limited: over the key's or the address's rate (see Rate limits); wait Retry-After seconds. |
Error |
403 |
Forbidden: The account is pending (account_pending, activated by us after "request access"), suspended, or the route is the owner's, or the key is read-only. |
Error |
404 |
NotFound: No such object in your account (another account's ids answer the same). | Error |
Remove the account's webhook receiver¶
DELETE /v1/accounts/{a}/webhook
Parameters
| Name | In | Type | Description |
|---|---|---|---|
a (required) |
path | string | Your account's id (the panel's URL, or account in a move). |
Responses
| Status | Description | Body |
|---|---|---|
204 |
Removed. | |
401 |
Unauthorized: No valid API key (or session). login_url is for the panel. |
Error |
429 |
TooMany: rate_limited: over the key's or the address's rate (see Rate limits); wait Retry-After seconds. |
Error |
403 |
Forbidden: The account is pending (account_pending, activated by us after "request access"), suspended, or the route is the owner's, or the key is read-only. |
Error |
404 |
NotFound: No such object in your account (another account's ids answer the same). | Error |