For AI agents: markdown of this page — /docs-content-en/infra/access/audience-proposals-cancel.md documentation index — /llms.txt

Cancel an access request

POST /v1/infra/servers/:id/audience-proposals/:proposalId/cancel

Cancels your own access change request. Cancellation does not change application access.

Use the original API key that created the request. Another key belonging to the same owner cannot access it.

Parameters

Parameter In Type Required Description
Parameterid Inpath Typestring (UUID) Requiredyes DescriptionServer ID from the original operation. See List servers
ParameterproposalId Inpath Typestring (UUID) Requiredyes DescriptionRequest ID from error.details.proposalId in a 409 AUDIENCE_APPROVAL_REQUIRED response to changing the policy or minting a token

Request fields (body)

The body is optional. If supplied, it must be an empty object {}.

Examples

curl — personal key

Terminal
curl -X POST "https://vibecode.bitrix24.com/v1/infra/servers/SERVER_ID/audience-proposals/PROPOSAL_ID/cancel" \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

Terminal
curl -X POST "https://vibecode.bitrix24.com/v1/infra/servers/SERVER_ID/audience-proposals/PROPOSAL_ID/cancel" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"

JavaScript — personal key

javascript
const response = await fetch(
  `https://vibecode.bitrix24.com/v1/infra/servers/${serverId}/audience-proposals/${proposalId}/cancel`,
  {
    method: 'POST',
    headers: {
      'X-Api-Key': 'YOUR_API_KEY',
    },
  },
)
const { proposal } = await response.json()
console.log(proposal.state)

JavaScript — OAuth application

javascript
const response = await fetch(
  `https://vibecode.bitrix24.com/v1/infra/servers/${serverId}/audience-proposals/${proposalId}/cancel`,
  {
    method: 'POST',
    headers: {
      'X-Api-Key': 'YOUR_APP_KEY',
      'Authorization': 'Bearer USER_SESSION_TOKEN',
    },
  },
)
const { proposal } = await response.json()
console.log(proposal.state)

Response fields

A successful response is { "proposal": ... }, without a success or data envelope. The table lists the main fields. The response also includes the operation under review, the original, proposed and current access snapshots, participant labels and the differences between them.

Field Type Description
Fieldproposal.id Typestring (UUID) DescriptionRequest ID
Fieldproposal.state Typestring DescriptionPENDING, APPROVED, APPLIED, REJECTED, CANCELLED, EXPIRED or STALE
Fieldproposal.baseRevision Typestring DescriptionAccess revision when the request was created; a decimal string
Fieldproposal.currentRevision Typestring DescriptionCurrent access revision; a decimal string
Fieldproposal.expiresAt Typestring DescriptionRequest expiry in ISO 8601
Fieldproposal.canDecide Typeboolean DescriptionAlways false for an API key
Fieldproposal.canCancel Typeboolean DescriptionWhether the request can be cancelled now
Fieldproposal.resultEntityId Typestring (UUID), optional DescriptionID of the record created when applied; not a token or secret URL

Response example

The ID, state and revisions are shown. Other fields are described above.

JSON
{
  "proposal": {
    "id": "00000000-0000-4000-8000-000000000001",
    "state": "CANCELLED",
    "baseRevision": "0",
    "currentRevision": "0"
  }
}

Error response example

404 — server not found:

JSON
{
  "success": false,
  "error": {
    "code": "NOT_FOUND",
    "message": "Server not found"
  }
}

Errors

HTTP Code Description
HTTP400 CodeVALIDATION_ERROR DescriptionInvalid UUID or a non-empty body
HTTP401 CodeMISSING_API_KEY DescriptionNo key was supplied
HTTP401 CodeINVALID_API_KEY DescriptionThe key was not recognized
HTTP403 CodePORTAL_COLLABORATOR_NOT_A_MEMBER DescriptionThe collaborator key was revoked or expired, or their portal membership ended
HTTP403 CodeAUDIENCE_APPROVAL_FORBIDDEN DescriptionThe current key, its owner or portal binding no longer permits the operation
HTTP404 CodeNOT_FOUND DescriptionThe server is missing, deleted or not bound to the portal. Message: Server not found
HTTP404 CodeNOT_FOUND DescriptionThe request is missing for this server and portal, or was created by another caller. Message: Proposal not found
HTTP409 CodeAUDIENCE_APPROVAL_REPLAY DescriptionThe request was already applied, cancelled or completed by another decision
HTTP409 CodeAUDIENCE_APPROVAL_STALE DescriptionThe access revision changed
HTTP410 CodeAUDIENCE_APPROVAL_EXPIRED DescriptionThe request expired

For common API errors, see Errors.

Known limitations

  • Check canCancel before cancelling. Only a current request in the PENDING or APPROVED state can be cancelled.
  • Cancellation does not revoke granted access. After APPLIED, use the original access management methods.

See also