Skip to content

Revoke every API token of the verified domains

DELETE
/v1/companies/{id}/sso/tokens
curl --request DELETE \
--url https://beta-api.plune.ai/v1/companies/example/sso/tokens \
--header 'Content-Type: application/json' \
--cookie plune_session=<plune_session> \
--data '{ "confirm": 0 }'

Owner and managers (#1610). confirm must equal the number of tokens that would be revoked; when the list changed since it was read the answer is 409 sso_confirm_mismatch with the fresh count, and nothing is revoked. A revoked token answers 401 on its next request. One row of the company’s log (counts only). CI pipelines that use these tokens will fail: see affectedProjects. 20 a minute a person.

id
required
string
Media type application/json
object
confirm
required

The number of tokens the caller was shown (total of the list). Refused with the fresh count when it differs.

integer
Example
{
"confirm": 0
}

How many were revoked

Media type application/json
object
affectedProjects
required

The distinct projects the tokens write to.

Array<object>
object
id
required
string
name
required
string
unboundTokens
required

Tokens that belong to no project of their own: they follow their owner’s default project.

integer
revoked
required
integer
Example generated
{
"affectedProjects": [
{
"id": "example",
"name": "example"
}
],
"unboundTokens": 1,
"revoked": 1
}

confirm is missing or not a whole number

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}

No / invalid session

No such company, or the caller is not its owner or a manager

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}

sso_confirm_mismatch: the body has the fresh count and the impact

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}

Rate-limited: the per-route throttle, or the per-minute request limit of the plan an API token counts by (#1442; the body names the plan, #2092). Retry-After carries the seconds until the window rolls over.

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}
Retry-After
integer

Seconds until the window rolls over