curl --request POST \
--url https://api.example.com/organizations/{organizationId}/invitations/{invitationId}/revoke \
--header 'Authorization: <authorization>'{
"invitationId": "inv_abc123",
"organizationId": "019525fd-4c38-7e30-a5c1-b6e3f4d8a9c2",
"inviterUserId": "019525fd-56a8-7db4-8c3e-2a1b4d6f8e0c",
"acceptedUserId": null,
"email": "jane@example.com",
"token": "tok_abc123",
"acceptInvitationUrl": "https://app.awsales.com/invite?token=tok_abc123",
"roleSlug": "member",
"state": "REVOKED",
"expiresAt": "2026-04-25T14:00:00.000Z",
"acceptedAt": null,
"revokedAt": "2026-03-25T15:00:00.000Z",
"createdAt": "2026-03-25T14:00:00.000Z",
"updatedAt": "2026-03-25T15:00:00.000Z"
}
Revogar permanentemente um convite pendente, invalidando o link do convite.
curl --request POST \
--url https://api.example.com/organizations/{organizationId}/invitations/{invitationId}/revoke \
--header 'Authorization: <authorization>'{
"invitationId": "inv_abc123",
"organizationId": "019525fd-4c38-7e30-a5c1-b6e3f4d8a9c2",
"inviterUserId": "019525fd-56a8-7db4-8c3e-2a1b4d6f8e0c",
"acceptedUserId": null,
"email": "jane@example.com",
"token": "tok_abc123",
"acceptInvitationUrl": "https://app.awsales.com/invite?token=tok_abc123",
"roleSlug": "member",
"state": "REVOKED",
"expiresAt": "2026-04-25T14:00:00.000Z",
"acceptedAt": null,
"revokedAt": "2026-03-25T15:00:00.000Z",
"createdAt": "2026-03-25T14:00:00.000Z",
"updatedAt": "2026-03-25T15:00:00.000Z"
}
invitations:revoke.{
"invitationId": "inv_abc123",
"organizationId": "019525fd-4c38-7e30-a5c1-b6e3f4d8a9c2",
"inviterUserId": "019525fd-56a8-7db4-8c3e-2a1b4d6f8e0c",
"acceptedUserId": null,
"email": "jane@example.com",
"token": "tok_abc123",
"acceptInvitationUrl": "https://app.awsales.com/invite?token=tok_abc123",
"roleSlug": "member",
"state": "REVOKED",
"expiresAt": "2026-04-25T14:00:00.000Z",
"acceptedAt": null,
"revokedAt": "2026-03-25T15:00:00.000Z",
"createdAt": "2026-03-25T14:00:00.000Z",
"updatedAt": "2026-03-25T15:00:00.000Z"
}
curl -X POST https://api.awsales.io/admin/organizations/019525fd-4c38-7e30-a5c1-b6e3f4d8a9c2/invitations/inv_01HQZE7N9K4RW2X6MTJP8YCDF3/revoke \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
| Status | Codigo | Descricao |
|---|---|---|
400 | validation_error | Entrada invalida ou campos obrigatorios ausentes |
401 | unauthorized | Autenticacao ausente ou invalida |
403 | forbidden | Permissoes insuficientes |
403 | auth.invitation_not_pending | O convite nao esta em estado pendente |
404 | organization.not_found | Organizacao nao encontrada |
404 | invitation.not_found | Convite nao encontrado |
500 | internal_server_error | Ocorreu um erro inesperado |