Sign out with a refresh token

End a terminal sign-in, both its tokens at once

POST/v1/cli/tokens/revoke

Ends the sign-in a refresh token belongs to, both its tokens at once. Any refresh token the sign-in was answered ends it. There is no bearer, and the route reads no x-mapier-version. The answer is always a 204, for an unknown token too, so it says nothing about the token.

Use it once the access token has expired. While the access token is live, POST /v1/personal-tokens/current/revoke does the same.

Example request

curl -X POST https://api.mapier.ai/v1/cli/tokens/revoke \
  -H "Content-Type: application/json" \
  -d '{ "refreshToken": "mp_refresh_example-not-a-real-token" }'

Response

204 No Content, with no body.

Errors

StatusCodeReasonWhenChannels
400bad_requestThe body is not valid JSON, the channel rejected the request as malformed, or a header the call needs is missing.All
413payload_too_largeThe body is over 65,536 bytes.All
422validation_failedA field is wrong, and details names each one at its path.All
429rate_limitedToo many requests for this route's budget.All
500internal_errorMapier failed on its side, and has been alerted.All
503upstream_unavailableThe channel did not take the command, or gave no answer Mapier could use.All