import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.oauthGrants.revoke(
'650e8400-e29b-41d4-a716-446655440001',
);
use resend_rs::{Resend, Result};
#[tokio::main]
async fn main() -> Result<()> {
let resend = Resend::new("re_xxxxxxxxx");
let _data = resend
.oauth
.revoke("650e8400-e29b-41d4-a716-446655440001")
.await?;
Ok(())
}
curl -X DELETE 'https://api.resend.com/oauth/grants/650e8400-e29b-41d4-a716-446655440001' \
-H 'Authorization: Bearer re_xxxxxxxxx'
{
"object": "oauth_grant",
"id": "650e8400-e29b-41d4-a716-446655440001",
"revoked_at": "2026-04-08T00:11:13.110Z",
"revoked_reason": "revoked_from_api"
}
Revoke Grant
Revoke an OAuth grant for the authenticated team.
DELETE
/
oauth
/
grants
/
:oauth_grant_id
import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.oauthGrants.revoke(
'650e8400-e29b-41d4-a716-446655440001',
);
use resend_rs::{Resend, Result};
#[tokio::main]
async fn main() -> Result<()> {
let resend = Resend::new("re_xxxxxxxxx");
let _data = resend
.oauth
.revoke("650e8400-e29b-41d4-a716-446655440001")
.await?;
Ok(())
}
curl -X DELETE 'https://api.resend.com/oauth/grants/650e8400-e29b-41d4-a716-446655440001' \
-H 'Authorization: Bearer re_xxxxxxxxx'
{
"object": "oauth_grant",
"id": "650e8400-e29b-41d4-a716-446655440001",
"revoked_at": "2026-04-08T00:11:13.110Z",
"revoked_reason": "revoked_from_api"
}
Revoking a grant invalidates every access and refresh token issued under it. Any
team API key can revoke any of the team’s grants. Returns
404 if the grant
does not exist or was already revoked.
Path Parameters
import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.oauthGrants.revoke(
'650e8400-e29b-41d4-a716-446655440001',
);
use resend_rs::{Resend, Result};
#[tokio::main]
async fn main() -> Result<()> {
let resend = Resend::new("re_xxxxxxxxx");
let _data = resend
.oauth
.revoke("650e8400-e29b-41d4-a716-446655440001")
.await?;
Ok(())
}
curl -X DELETE 'https://api.resend.com/oauth/grants/650e8400-e29b-41d4-a716-446655440001' \
-H 'Authorization: Bearer re_xxxxxxxxx'
{
"object": "oauth_grant",
"id": "650e8400-e29b-41d4-a716-446655440001",
"revoked_at": "2026-04-08T00:11:13.110Z",
"revoked_reason": "revoked_from_api"
}
Was this page helpful?
⌘I